Skip to Content

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 | bash

Windows (PowerShell)

iwr -useb cmdop.com/install.ps1 | iex

Homebrew (macOS)

brew install cmdop/tap/cmdop

How do I authenticate?

# Opens browser for OAuth login — stores token at ~/.cmdop/auth.json cmdop login # Verify cmdop auth status

Output:

✓ Authenticated as: [email protected] ✓ Workspace: acme-corp ✓ Token expires: 2026-03-14

What 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 ago

Connect to Terminal

# Interactive terminal cmdop terminal prod-server # You're now in a remote shell $ whoami deploy $ pwd /home/deploy

Execute 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.08

File 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.yaml

How 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 current

API 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_xxx

How 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: true

Shell Completion

# Bash cmdop completion bash >> ~/.bashrc # Zsh cmdop completion zsh >> ~/.zshrc # Fish cmdop completion fish > ~/.config/fish/completions/cmdop.fish

What commands and flags are available?

Global Flags

FlagDescription
--workspaceOverride workspace
--outputOutput format (table, json, yaml)
--debugEnable debug logging
--quietSuppress non-error output

Commands

CommandDescription
cmdop loginAuthenticate via browser
cmdop logoutClear authentication
cmdop machinesList machines in workspace
cmdop terminal <host>Interactive terminal
cmdop exec <host> <cmd>Execute single command
cmdop filesFile operations
cmdop workspaceWorkspace management
cmdop authAuthentication/API keys
cmdop statusConnection status
cmdop versionShow 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:8080

Environment 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 ERROR

Multiple 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?

FeatureSSHCMDOP CLI
Connectssh user@ip -p 22cmdop terminal hostname
Executessh user@ip commandcmdop exec hostname command
Copy filescp file user@ip:/pathcmdop files put file hostname:/path
Port forwardssh -L 8080:localhost:80Coming soon
Key managementManual ~/.ssh/OAuth, automatic
Works behind NATNoYes

Troubleshooting

Command Not Found

# Check installation which cmdop # Check PATH echo $PATH # Reinstall if needed curl -sSL cmdop.com/install.sh | bash

Authentication Issues

# Re-login cmdop logout cmdop login # Check token cmdop auth status

Connection Timeout

# Check machine status cmdop machines # Check if agent is running on target # (on the target machine) cmdop status

Next

Last updated on