cmdop connect — CLI reference
TL;DR
cmdop connect is the CLI surface for reaching machines registered in your CMDOP fleet. Connect interactively, run one-shot commands, list machines, and manage per-machine passwords — no port forwarding or SSH keys required.
cmdop connect is part of the Go cmdop binary. Install the full CLI, then use cmdop connect for machine access. Works on macOS, Linux, and Windows.
For all CLI verbs, see the CLI docs.
Installation
macOS & Linux
curl -sSL cmdop.com/install.sh | bashWindows (PowerShell)
iwr -useb cmdop.com/install.ps1 | iexVerify:
cmdop --versionQuick Start
1. Authenticate
cmdop login2. List registered machines
cmdop connect --list3. Attach to a machine
cmdop connect vps-audi4. Run a one-shot command
cmdop connect exec vps-audi -- uname -aCommand surface
Interactive attach
cmdop connect # fuzzy picker → confirm → PTY
cmdop connect vps-audi # skip picker, direct attachOne-shot exec
cmdop connect exec <host> -- <command...>
# With flags
cmdop connect exec vps-audi --timeout 60 -- systemctl status nginx
cmdop connect exec vps-audi --json -- df -hexec exits with the remote’s status code. With --json it emits:
{"stdout":"...","stderr":"","exit_code":0,"duration_ms":42}Per-machine passwords
cmdop connect password set # store password for this machine
cmdop connect password status # check if a password is stored
cmdop connect password list # list machines with stored passwords
cmdop connect password clear # remove stored passwordMachine inventory
cmdop connect --list # all machines in the active fleet
cmdop connect --list --online # only currently connected machines
cmdop connect --list --json # JSON outputFlags
| Flag | Description |
|---|---|
--api-key, -k <key> | Override API key for this call |
--server, -s <addr> | Override gRPC relay address |
--workspace <name> | Use a named fleet (legacy flag name) |
--json | Structured JSON output |
--no-interactive, -q | Never prompt; fail fast |
--list | Print machine inventory and exit |
--online | With --list, show only online machines |
--timeout, -t <sec> | Command timeout in seconds (exec only, default 30s) |
Platforms
| Platform | Architecture | Supported |
|---|---|---|
| macOS | arm64 (Apple Silicon) | Yes |
| macOS | amd64 (Intel) | Yes |
| Linux | amd64 | Yes |
| Linux | arm64 | Yes |
| Windows | amd64 | Yes |
Environment Variables
| Variable | Description |
|---|---|
CMDOP_API_KEY | API key for non-interactive authentication |
Scripting
Use --json --no-interactive for CI and automation:
# Deploy and verify
cmdop connect exec prod-server --json --no-interactive -- "cd /app && git pull && docker compose up -d"
# Check server health
cmdop connect exec prod-server --json -- "curl -s localhost:3000/health"
# Monitor logs
cmdop connect exec prod-server -- "tail -50 /var/log/app.log"
# List online machines in CI
cmdop connect --list --online --jsonExit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Generic error |
| 2 | Auth failure |
| 3 | Machine offline |
| 4 | Ambiguous hostname |
Related
- cmdop connect full reference — all flags and subcommands
- Fleets — fleet switching and credential management
- Authentication — login, API keys, OAuth
Last updated on