Public Welfare · Free · Forever Free

SamCommand

Turn any machine into a remotely controllable command-execution agent. One-line install, public URL access, cross-platform: Linux / macOS / Windows / Android.

Why SamCommand

Built on aitun.cc tunnel — no public IP or port forwarding required. Get a public HTTPS URL on startup, controllable from any device.

🌐
Public URL Access
Get https://<sub>.t.aitun.cc on startup via aitun.cc tunnel. Reachable from any device on the internet.
Remote Shell Execution
POST /exec to run any shell command (bash on Unix, cmd on Windows). Supports cwd, timeout, env overrides.
📁
Bidirectional File Transfer
POST /upload, GET /download, GET /ls, GET /stat with SHA256. Streaming, up to 200MB per file.
🔗
SSH Jump Host
POST /ssh to use the samcommand host as a jump host. Control any SSH-reachable internal machine.
🛡️
Bearer Token Auth
All mutating endpoints require a Bearer token. Auto-generated 256-bit strong token, customizable via --token.
📱
Cross-platform + 32-bit ARM
Linux amd64/arm64/arm (incl. old Android tablets), Windows amd64, macOS amd64/arm64 — all supported.

One-line Install

Auto-detects platform architecture, downloads the correct binary to /usr/local/bin or ~/.local/bin.

Linux / macOS · curl + bash
# One-line install (auto-detects amd64/arm64/arm) curl -fsSL https://samai.cc/samcommand/downloads/install.sh | bash # Re-run this same command anytime to update to the latest version
Windows · PowerShell
# Run in PowerShell (admin installs to Program Files, otherwise %LOCALAPPDATA%) irm https://samai.cc/samcommand/downloads/install.ps1 | iex
Termux (Android) · Turn old tablets/phones into publicly reachable nodes
# In Termux (auto-detects armv7l / aarch64) pkg install -y curl curl -fsSL https://samai.cc/samcommand/downloads/install.sh | bash # Start samcommand (Termux needs proot wrapper for DNS) echo "nameserver 8.8.8.8" > $PREFIX/etc/resolv.conf export SSL_CERT_FILE=$PREFIX/etc/tls/cert.pem proot -b $PREFIX/etc/resolv.conf:/etc/resolv.conf samcommand --no-p2p --verbose

Get a Public URL in 30 Seconds

Three steps after install — you have a public-controllable remote agent.

1️⃣ Start samcommand

samcommand \ --subdomain my-agent \ --token $(openssl rand -hex 32) \ --verbose

Prints Public URL + Auth token on startup. Save them.

2️⃣ Run commands from anywhere

curl -X POST https://my-agent.t.aitun.cc/exec \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"command":"uname -a"}'

Returns JSON: exit_code, stdout, stderr, duration_ms.

3️⃣ Upload / download files

# Upload curl -X POST 'https://my-agent.t.aitun.cc/upload?path=/tmp/x.bin' \ -H "Authorization: Bearer <token>" \ --data-binary @local.bin # Download curl 'https://my-agent.t.aitun.cc/download?path=/tmp/x.bin' \ -H "Authorization: Bearer <token>" -o x.bin

SHA256 auto-verified, atomic rename, crash-safe.

Download Binaries

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

HTTP Endpoints

All endpoints (except /health) require Authorization: Bearer <token> or X-SamCommand-Token: <token> header.

MethodPathPurpose
GET/healthLiveness probe (no auth)
GET/infoHost info (OS, CPU, IP, uptime)
POST/execRun shell command (bash on Linux / cmd on Windows)
POST/ps1Run PowerShell command (Windows only)
POST/sshRun command on remote host via SSH (jump host)
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)