cmdop register
cmdop register is the foreground entry point for first-time machine registration. It walks through OAuth (if needed), registers this host with your workspace, prints a web-terminal URL, and stays attached so you can copy the URL into a browser.
For ongoing background operation, use ./agent (cmdop agent start) instead.
Basic usage
cmdop registerOutput:
✓ Authenticated as: [email protected]
✓ Workspace: acme-prod
✓ Registered: vps-audi
✓ Web terminal: https://app.cmdop.com/t/vps-audi/web
Press Ctrl+C to detach (machine stays registered).When to use register vs agent start
cmdop register | cmdop agent start | |
|---|---|---|
| Mode | Foreground | Background |
| Output | Web terminal URL | Daemon log path |
| Use case | First-time setup, demos | Production, daily use |
| Dies on Ctrl+C | Yes (machine stays registered) | No (daemon detached) |
| Prints reachable URL | Yes | No (use cmdop machines) |
After cmdop register exits cleanly, the machine is registered server-side but no daemon is running locally — the next operator action that needs the daemon will prompt you to cmdop agent start.
Flags
cmdop register --name vps-audi-prod # custom hostname for the relay
cmdop register --no-aliases # skip ccat alias install
cmdop register --workspace acme-prod # explicit workspaceWhat it does
- Checks if a token exists for the active mode; if not, opens OAuth.
- Picks the active workspace (or honors
--workspace). - Calls
machines.Registeron the relay with this host’s metadata. - Prints the web-terminal URL.
- Optionally installs the
ccatshell alias (skip with--no-aliases). - Stays foreground until Ctrl+C — useful for demos / quick checks.
After register
A typical first-time setup looks like:
cmdop register
# → copy the web-terminal URL, share with your team
# → Ctrl+C
cmdop agent start
# → daemon now running in the background; machine stays onlineOr fold both into a single command for production:
cmdop service install # + auto-update + persistence
cmdop service startSee ./service.
Re-registering
Re-registering the same machine is idempotent — the relay updates metadata (hostname, IP, version) but keeps the machine ID. Useful after major OS upgrades or when changing hostname.
Troubleshooting
- “Workspace not found” —
cmdop connect workspace sync, then retry. - OAuth opens but never returns — confirm browser can reach
cmdop.com; on headless boxes use--api-key(an API key for the workspace). - “Machine already registered as X” — that’s fine; the relay reuses the existing machine ID.