v1.1.0 — Now with peer pairing

Run commands on
any machine, anywhere

Agent-first remote execution. JSON output, deterministic responses, zero parsing.
Built for AI agents via SuperCLI.

Get remotecmd-cli View on GitHub
terminal
# Quick start via SuperCLI
$ supercli discover --intent "remotecmd" --human
$ supercli plugins install remotecmd-cli
$ supercli remotecmd execute --target myserver --cmd 'uptime'
{ "ok": true, "stdout": "up 42 days...", "duration_ms": 9 }

Quick start via SuperCLI

$ supercli discover --intent "remotecmd" --human
$ supercli plugins install remotecmd-cli
$ supercli remotecmd execute --target myserver --cmd 'uptime'

SuperCLI handles discovery, installation, and execution — no manual setup.

Features

Everything you need,
nothing you don't

🔗

One-command pairing

Generate a pair code, share one curl one-liner with your peer. They paste it — the binary installs, daemon starts as a systemd service, pair code is sent and destroyed. You're connected.

$ remotecmd-cli pair listen --name friend

Real-time streaming

Add --stream to watch stdout/stderr line-by-line. Pipe it locally.

--stream --timeout 300
🔒

Zero inbound ports

Target daemons connect out to the relay. Works behind NAT, firewalls, CGNAT — no port forwarding ever.

🔑

Token auth

Each target gets a unique secret token. Commands are only routed when the token matches — no open relays.

📦

Single static binary

One Go binary is client, relay, and daemon. No runtime, no dependencies. Copy and run.

📋

Structured JSON output

Every result is a deterministic JSON envelope — stdout, stderr, exit code, duration. Script it, pipe it, parse it with jq.

// Buffered result
{
"ok": true,
"stdout": "myserver\n",
"stderr": "",
"exit_code": 0,
"duration_ms": 8
}
Agent-first

Built for AI agents

remotecmd-cli is designed as a SuperCLI plugin — agents discover, inspect, and execute it without parsing.

📋

Structured JSON output

Every result is a deterministic JSON envelope — stdout, stderr, exit code, duration. No regex, no guessing.

🔍

Self-describing

Agents can inspect the full command schema before execution via SuperCLI's inspect command.

🔗

SuperCLI integration

Install as a SuperCLI plugin with sc plugins install remotecmd-cli. Agents discover it via sc skills search "remote", inspect capabilities, and execute with sc remotecmd execute.

How it works

Three nodes,
infinite reach

1

Start the relay hub

Deploy on any VPS. It's the only machine that needs a public IP or reachable port.

$ remotecmd-cli relay daemon start --port 3032 -daemon
2

Pair a machine

Generate a pair code and share the one-liner. The remote machine installs, connects, and auto-pairs.

$ remotecmd-cli pair listen --name myserver
3

Run commands

Execute anything. Get JSON back. Stream output in real time. Use rcx for speed.

$ rcx myserver 'df -h && uptime'
$ remotecmd-cli --target myserver --cmd 'npm run build' --stream
Install

One line to get started

Linux / amd64

curl -sSL .../remotecmd-cli-linux-amd64 \
  -o ~/.local/bin/remotecmd-cli
chmod +x ~/.local/bin/remotecmd-cli

macOS / Apple Silicon

curl -sSL .../remotecmd-cli-darwin-arm64 \
  -o /usr/local/bin/remotecmd-cli
chmod +x /usr/local/bin/remotecmd-cli

Build from source

$ git clone https://github.com/javimosch/remotecmd-cli.git && cd remotecmd-cli && go build -o remotecmd-cli .
Download latest release