Install CLI
TL;DR
Install the Cmdop CLI with curl -sSL cmdop.com/install.sh | bash (macOS/Linux),
iwr -useb cmdop.com/install.ps1 | iex (Windows), or brew install cmdop/tap/cmdop (Homebrew).
The CLI is the same binary as the agent — it provides cmdop terminal, cmdop exec,
and cmdop files commands for remote machine access. Authenticate once via cmdop login.
How do I install the CLI?
macOS / Linux
curl -sSL cmdop.com/install.sh | bashWindows (PowerShell)
iwr -useb cmdop.com/install.ps1 | iexHomebrew (macOS)
brew install cmdop/tap/cmdopHow do I authenticate?
# Opens browser for OAuth login — stores token at ~/.cmdop/auth.json
cmdop login
# Verify
cmdop auth statusOutput:
✓ Authenticated as: [email protected]
✓ Workspace: acme-corp
✓ Token expires: 2026-03-14What are the basic CLI commands?
List Machines
# Show all machines in your workspace (name, status, last seen)
cmdop machines
# Output:
# HOSTNAME STATUS LAST SEEN
# prod-server connected just now
# staging connected 2 minutes ago
# dev-laptop offline 3 hours agoConnect to Terminal
# Interactive terminal
cmdop terminal prod-server
# You're now in a remote shell
$ whoami
deploy
$ pwd
/home/deployExecute Single Command
# Run command and exit
cmdop exec prod-server "uptime"
# Output:
# 14:23:01 up 42 days, 3:15, 2 users, load average: 0.15, 0.10, 0.08File Operations
# List remote directory
cmdop files ls prod-server:/var/log
# Download file
cmdop files get prod-server:/var/log/app.log ./app.log
# Upload file
cmdop files put ./config.yaml prod-server:/app/config.yamlHow do I manage workspaces?
Switch Workspace
# List your workspaces
cmdop workspace list
# Switch to different workspace
cmdop workspace use staging-workspace
# Check current
cmdop workspace currentAPI Keys
# Create personal API key
cmdop auth create-key --name "my-laptop"
# List keys
cmdop auth list-keys
# Revoke key
cmdop auth revoke-key cmd_acme_xxxHow do I configure the CLI?
Config File
Location: ~/.cmdop/config.yaml
# Default settings
defaults:
workspace: acme-corp
shell: /bin/zsh
# Aliases
aliases:
prod: prod-server-1
staging: staging-server
# Output format
output:
format: table # table, json, yaml
colors: trueShell Completion
# Bash
cmdop completion bash >> ~/.bashrc
# Zsh
cmdop completion zsh >> ~/.zshrc
# Fish
cmdop completion fish > ~/.config/fish/completions/cmdop.fishWhat commands and flags are available?
Global Flags
| Flag | Description |
|---|---|
--workspace | Override workspace |
--output | Output format (table, json, yaml) |
--debug | Enable debug logging |
--quiet | Suppress non-error output |
Commands
| Command | Description |
|---|---|
cmdop login | Authenticate via browser |
cmdop logout | Clear authentication |
cmdop machines | List machines in workspace |
cmdop terminal <host> | Interactive terminal |
cmdop exec <host> <cmd> | Execute single command |
cmdop files | File operations |
cmdop workspace | Workspace management |
cmdop auth | Authentication/API keys |
cmdop status | Connection status |
cmdop version | Show version |
What advanced features does the CLI support?
SSH-Style Syntax
# Similar to SSH
cmdop terminal user@hostname
# With port (for local development)
cmdop terminal hostname:8080Environment Variables
# Pass to remote command
cmdop exec prod-server "echo \$HOME"
# Or use env flag
cmdop exec --env "MY_VAR=value" prod-server "echo \$MY_VAR"Pipe Support
# Pipe input
echo "hello" | cmdop exec prod-server "cat"
# Pipe output
cmdop exec prod-server "cat /var/log/app.log" | grep ERRORMultiple Machines
# Execute on multiple machines
cmdop exec prod-server-1,prod-server-2,prod-server-3 "uptime"
# Or use pattern
cmdop exec "prod-*" "uptime"How does Cmdop CLI compare to SSH?
| Feature | SSH | CMDOP CLI |
|---|---|---|
| Connect | ssh user@ip -p 22 | cmdop terminal hostname |
| Execute | ssh user@ip command | cmdop exec hostname command |
| Copy file | scp file user@ip:/path | cmdop files put file hostname:/path |
| Port forward | ssh -L 8080:localhost:80 | Coming soon |
| Key management | Manual ~/.ssh/ | OAuth, automatic |
| Works behind NAT | No | Yes |
Troubleshooting
Command Not Found
# Check installation
which cmdop
# Check PATH
echo $PATH
# Reinstall if needed
curl -sSL cmdop.com/install.sh | bashAuthentication Issues
# Re-login
cmdop logout
cmdop login
# Check token
cmdop auth statusConnection Timeout
# Check machine status
cmdop machines
# Check if agent is running on target
# (on the target machine)
cmdop statusNext
- First Connection — Connect and explore
- First Automation — Use the Python SDK
Last updated on