Turn any machine into a remotely controllable command-execution agent. One-line install, public URL access, cross-platform: Linux / macOS / Windows / Android.
Built on aitun.cc tunnel — no public IP or port forwarding required. Get a public HTTPS URL on startup, controllable from any device.
Auto-detects platform architecture, downloads the correct binary to /usr/local/bin or ~/.local/bin.
Get a public URL in 30 seconds.
All binaries are statically linked — zero runtime dependencies. See checksums-sha256.txt for SHA256.
| Platform | Architecture | File | Size | Download |
|---|---|---|---|---|
| Linux | x86-64 (amd64) | samcommand-linux-amd64 |
7.4 MB | Download |
| Linux | ARM 64-bit (arm64) | samcommand-linux-arm64 |
6.8 MB | Download |
| Linux | ARM 32-bit v7 (armv7l) | samcommand-linux-arm |
7.1 MB | Download |
| Windows | x86-64 (amd64) | samcommand-windows-amd64.exe |
7.5 MB | Download |
| macOS | Intel (amd64) | samcommand-darwin-amd64 |
7.5 MB | Download |
| macOS | Apple Silicon (arm64) | samcommand-darwin-arm64 |
6.9 MB | Download |
| Install script | Linux / macOS | install.sh |
2.1 KB | Download |
| Install script | Windows PowerShell | install.ps1 |
2.0 KB | Download |
All endpoints (except /health) require Authorization: Bearer <token> or X-SamCommand-Token: <token> header. Command endpoints also accept JSON, raw text/plain commands and the Samai Command Envelope body (see the Envelope section below).
| Method | Path | Purpose |
|---|---|---|
GET | /health | Liveness probe (no auth) |
GET | /info | Host info (OS, CPU, IP, uptime) |
GET | /status | samcommand version, host and process status |
POST | /exec | Run shell command (bash on Linux / cmd on Windows; JSON / raw text / envelope body) |
POST | /exec/async | Run in background, returns job_id immediately (no ~120s tunnel limit) |
GET | /exec/stream | Streaming execution, real-time output |
GET | /cmd?c64=...&token=... | Run a command via GET (?c= plain or ?c64= base64url — built for AI agents) |
POST | /ps1 | Run PowerShell (written to a temp .ps1 file run via -File — immune to quote mangling) |
POST | /ps1/async | Run PowerShell in background |
GET | /ps1/stream | Streaming PowerShell |
POST | /ssh | Run command on remote host via SSH (jump host) |
GET | /jobs | List all background jobs (running + recently finished) |
GET | /job/{id}?wait=1 | Poll job status / output (?wait=1 blocks until finished) |
POST | /job/{id}/kill | Kill a background job |
GET | /service | Service autonomy: list persisted services (/start /stop /remove /log to manage) |
GET | /ls?path=... | List directory |
GET | /stat?path=... | File info + SHA256 |
POST | /upload?path=... | Upload file (raw body or multipart) |
GET | /download?path=... | Download file (streaming) |
IM/chat gateways eat quotes, strip backslashes and re-wrap lines — by arrival time the command is destroyed; the Envelope keeps the command body to base64url-safe characters only, which no gateway can mangle.
Usage: wrap the command in an envelope body and POST it straight to /exec or /ps1 (Content-Type: text/plain) — samaicmdbegin / v=1 / enc=b64url / crc=CRC32 / payload / samaicmdend.
Add ?respenc=b64url to any command endpoint and the response (stdout / stderr / command) comes back base64url-encoded too; legacy JSON bodies stay 100% backward compatible.