Quick verdict
Quick verdict
- Every
cmdbriefsubcommand runs from the same native binary: usecmdbrief serveandcmdbrief service installto run headless on Linux (systemd user unit) or Windows (Task Scheduler), and control running projects, settings, routines, pairing, and updates from your shell. - Add
--jsonto project commands,settings,routines,update(exceptrollback),computers,unpair,access,builder,approve,deny,handoff, andremote-hostfor structured output; pass--workspace <profile>before any command to target a named profile. - On Linux, write commands are accepted only from a terminal or SSH session outside CmdBrief’s own cgroup so agents spawned by CmdBrief cannot answer their own prompts, approve computers, or edit settings. Off Linux, running-app commands are read-only.
What you get
What you get
Your terminal or SSH session
- Outside CmdBrief’s systemd cgroup
- Runs read and write
cmdbriefcommands - Pipes secrets via stdin (never command-line args)
control-socket commands (--json optional)
human-readable reports or JSON answers
`cmdbrief.service` (`cmdbrief serve`)
- Runs leads, crews, coordination, cloud link, and direct peer line
- Verifies caller PID &
/proc/<pid>/cgroupviaSO_PEERCRED - Refuses write commands from its own cgroup (agents & child shells)
General syntax: cmdbrief [--workspace <profile>] <command> [arguments]. Use cmdbrief version (-V, --version) to print the version and build number, and cmdbrief help (-h, --help) to inspect the built-in command reference on your installed release.
Install and run headless with serve and service
# Install or upgrade ~/.local/bin/cmdbrief (checks Ed25519 signature + SHA-256),
# installs cmdbrief.service, signs in, turns sharing on, and prints a pairing code:
curl -fsSL https://cmdbrief.com/install.sh | sh
# Run headless in the foreground (Linux and Windows):
cmdbrief serve
# Manage the background user service:
cmdbrief service install # Linux: ~/.config/systemd/user/cmdbrief.service
# Windows: Task Scheduler task "CmdBrief" (at sign-in)
cmdbrief service status # State and recent logs (same as bare `cmdbrief service`)
cmdbrief service uninstall # Stop and remove the service
# Linux: keep the systemd user service running after SSH logout:
sudo loginctl enable-linger "$USER"
journalctl --user -u cmdbrief -f # Follow service logs
# Windows only (headless serve):
cmdbrief service start # Start the Task Scheduler task now
cmdbrief service stop # Ask serve to quit cleanly (logs: <app support>\logs\serve.log)| Exit code / Unit detail | Meaning |
|---|---|
Exit code 3 (IN_USE) | Another CmdBrief instance (window or serve) already owns this profile; cmdbrief.service does not restart on exit code 3. |
Exit code 75 | An update finished installing and asked systemd to restart into the new binary cleanly (SuccessExitStatus=75, RestartForceExitStatus=75). |
KillMode=mixed | Only CmdBrief gets SIGTERM first so it runs its normal quit sequence and records interrupted agents cleanly. |
Account sign-in and computer approval
login, logout, and whoami talk to the local account store directly and notify any running CmdBrief instance, so they work before cmdbrief.service exists. Accounts allow up to 5 signed-in computers at once; new computers wait for approval from an existing computer on the account.
cmdbrief login [email] # Prompts for emailed one-time code; waits if approval is needed
cmdbrief logout # Sign out, or stop waiting for approval
cmdbrief whoami # Print signed-in email and subscription plan
# Run on an existing Linux computer (whole computer name or device id — never a prefix):
cmdbrief approve "<computer name>"
cmdbrief approve "<computer name>" --remove "<old computer>" # Free a slot at the 5-computer cap
cmdbrief deny "<computer name>"Pressing Ctrl-C during `cmdbrief login` stops waiting while leaving the approval request open; a running CmdBrief finishes sign-in once approved.
Control projects, agents, models, and handoffs
# Start a new project and lead (--lead: claude, codex, grok, cursor, opencode, or antigravity):
cmdbrief start "Add dark mode" --lead claude --folder ~/src/app
cmdbrief start "Build API" --lead codex --clone https://github.com/org/repo.git --name api --autopilot once
cmdbrief start - --lead opencode --github < brief.txt # "-" reads brief from stdin
# Inspect projects, CLIs, and waiting questions/approvals:
cmdbrief status [project] # Summary of every project or one project
cmdbrief agents # Installed and signed-in agent CLIs, git, and gh
cmdbrief needs-you [project] # Waiting agent asks, host asks (host:<source>:<key>), and sign-in requests
cmdbrief messages <project> [--count N] # Read the lead's recent conversation
# Answer waiting items and message leads:
cmdbrief answer <id> Allow # Answer by option label(s) from needs-you
cmdbrief answer <id> --text "Use option B" # Or pass free text ("-" reads stdin)
cmdbrief tell <project> "Add print styles" # Default: steer working lead at its next step
cmdbrief tell <project> "After this, write tests" --queue
cmdbrief tell <project> "Stop — wrong branch" --interrupt
# Tune models, stop runs, hand off, or remove workspaces:
cmdbrief model <project> Ada # Inspect what Ada runs and can take
cmdbrief model <project> Ada --effort medium # Lower/in-tier effort change (applied after current turn)
cmdbrief model <project> --crew --model sonnet --yes # Model switch or higher tier needs --yes
cmdbrief stop <project> # Stop lead and crew (same as Stop lead & crew)
cmdbrief handoff <project> --to <computer> [--anyway] # Move project to a paired computer (--anyway cuts an active turn)
cmdbrief handoff back <project> # Bring the project back here
cmdbrief remove <workspace> --yes # Remove workspace from CmdBrief (folder stays; omits --yes to preview & exit 1)needs-you also surfaces host dialogs as host:<source>:<key> IDs (dev-stack, mcp-layout, ssh, plan, cli-update, files, account), which you answer with cmdbrief answer <id> <Choice> — for example Allow on a dev-stack or ssh request (allowing ssh via CLI grants that single request only, never “Keep allowing”).
Routines, allowlisted settings, secrets, and updates
# Routines (works offline on routines.json when CmdBrief isn't running, except `run`):
cmdbrief routines
cmdbrief routines add --lead Ada --name "Daily report" --message "Summarize PRs" --daily 09:00 --days mon,tue,wed,thu,fri
cmdbrief routines add --lead Ada --name "One-off check" --message "Check deploy" --once "2026-12-05 14:00"
cmdbrief routines add --lead Ada --name "Monitor" --message "Check queue" --every 2 --between 09:00-18:00
cmdbrief routines edit <id> --off # Accepts any add option plus --on or --off
cmdbrief routines run <id> # Deliver immediately to the lead
cmdbrief routines remove <id>
# Allowlisted settings (same Save path as the Settings window — never hand-edit settings.json):
cmdbrief settings # List every allowlisted key by Settings page with current value
cmdbrief settings get agent_sleep # Print one setting in full (secrets show "set" or "not set")
cmdbrief settings set agent_sleep never # Accepts JSON, on/off, or plain words
# Secrets MUST be piped on stdin (never passed as an argument or typed on a TTY):
printf '%s' "$OPENROUTER_API_KEY" | cmdbrief settings set openrouter
printf '%s' "$DEEPSEEK_API_KEY" | cmdbrief settings set deepseek
printf '%s' "$CONNECTOR_TOKEN" | cmdbrief settings set connector.posthog
cmdbrief settings unset openrouter # Remove openrouter, deepseek, or connector.<id>
# Updates & rollback:
cmdbrief update --check # Check for a newer release without installing
cmdbrief update # Download, install, and follow restart
cmdbrief update auto [on|off] # Headless / Remote host auto-install after 2 min idle (on by default)
cmdbrief update rollback # Linux only: restore cmdbrief.previous and dismiss the rolled-back releaseAdd --json anywhere on the command line (even before the subcommand) to receive structured JSON from project commands (start, status, agents, needs-you, answer, tell, messages, stop, model, remove), settings, routines, update / update --check, computers, unpair, access, builder, approve, deny, handoff, and remote-host. Other commands (serve, login, logout, whoami, service, pair, remote, share, computer, update auto, update rollback, help, version) print human-readable output only (and pair / update rollback reject --json). See Set up Routines, Goal mode, and Autopilot, Connect Grok Bot and answer agents from your phone, Managed SSH and secrets, Features, and the changelog.
How the Linux cgroup security model works
Coding agents run as your Linux user and can read the local control socket token. To stop an agent from approving its own permission prompt, pairing a rogue computer, or modifying settings, CmdBrief enforces a cgroup boundary on every write command:
- Kernel peer verification: when a CLI command connects to the local control socket, CmdBrief reads the caller PID from
SO_PEERCREDand compares/proc/<pid>/cgroupagainst CmdBrief’s own cgroup. - Why agents stay inside: every process CmdBrief spawns — and every child those processes spawn, even if it calls
setsid, double-forks, or reparents — stays inside CmdBrief’s cgroup because only systemd moves a process into a different unit. - Reads vs writes: read commands (
status,needs-you,messages,agents,settings,settings get,builder status) are accepted from any local peer. Write commands (answer,tell,start,stop,model,remove,handoff,pair,unpair,access,approve,deny,remote,share,remote-host,computer,builder on|off|clean,settings set|unset,routines add|edit|remove|run,update, andupdate rollback) are accepted only on Linux and only from outside CmdBrief’s cgroup. - Avoid running `cmdbrief serve` inside your SSH/tmux session: if you launch
servedirectly inside tmux, bothserveand your shell share the same user-session cgroup, so write commands will be refused. Always run headless CmdBrief as the systemd user service (cmdbrief service install) so it gets its owncmdbrief.servicecgroup. - Honest boundary: as documented in the app, this blocks casual and detached child-process self-approval, not a hostile same-user process that asks systemd directly for a separate unit (
systemd-run --user) — the same OS user boundary that applies to0600secret files on Linux. - macOS and Windows: off Linux, running-app CLI commands are read-only (
login/logout/whoami,service, and Windowsbuilder launcherstill work). Make pairing, approval, and settings changes in the desktop window or via a paired computer.
Check it worked
- Linux SSH session
systemctl --user is-active cmdbrief && cmdbrief statusPrintsactiveand lists your workspaces cleanly. - Linux SSH session
cmdbrief settings get remote_host --jsonReturns a valid JSON object showing the currentremote_hostvalue.
If it fails
Write command refused because it came from inside CmdBrief
You do this
Run the command from your own terminal or SSH session outside
cmdbrief.service. If you startedcmdbrief servein tmux, stop it and install the systemd service withcmdbrief service install.cmdbrief serveexits immediately with code3Another CmdBrief window or
serveprocess already owns this profile. Stop the other copy and keep only the service running.cmdbrief settings set openrouter <key>is refusedSecrets (
openrouter,deepseek,connector.<id>) are never accepted as command-line arguments or from a TTY. Pipe them on stdin:printf '%s' "$KEY" | cmdbrief settings set openrouter.cmdbrief remove <workspace>exits1without deleting anythingWithout
--yes,removeonly previews what will be removed. Re-run with--yes(the project folder on disk is never deleted).cmdbrief modelrefuses to switch models or raise effortSwitching to a different model or an effort level higher than a lead may set on its own requires
--yes.cmdbrief update rollbackasks you to quit CmdBrief firstWhen CmdBrief runs as a window or foreground
serveinstead ofcmdbrief.service, quit it first and runcmdbrief update rollbackagain (under the systemd service, rollback restarts the unit automatically).A write command on macOS or Windows says to use Settings
Off Linux, the CLI only reads state from the running app. Make pairing, approval, and settings changes in the desktop window.
Questions
Can I sign coding agent CLIs in with a cmdbrief command?
Sign agent CLIs in with their own commands (claude auth login, codex login --device-auth, gh auth login) over SSH, or from your paired Mac under Settings › Computers › `<server>` › Setup › Sign in.
Does `cmdbrief remove <workspace> --yes` delete my source code folder?
No. Like Delete workspace… in the app, it removes the workspace from CmdBrief while leaving the folder on disk untouched.
How does `cmdbrief update auto` avoid interrupting active agents?
When auto-update is on (the default under serve and Remote host), CmdBrief downloads the signed release in the background and waits until no agent has been busy for 2 minutes before installing and restarting with exit code 75.
Can I run two isolated headless profiles on one Linux machine?
Yes. Pass --workspace <profile> before service install, serve, and every CLI command (for example cmdbrief --workspace staging service install) to keep each profile’s data, socket, and service isolated.
Still unsure? Write to [email protected] or use the contact form. Contact CmdBrief →
Primary sources
Provider terms and product behavior can change. Confirm plan, pricing, model, and permission details in the current official documentation.