CLI Reference
Complete quick reference for CLI flags, subcommands, and in-TUI slash commands.
What it is
crabcode is the top-level command. Two entry points:
- Subcommands — run from your shell, e.g.
crabcode doctor,crabcode cron list - Slash commands — typed inside the TUI, e.g.
/help,/init,/model
When you see this doc
- Looking up a specific flag or slash command
- Browsing available subcommands
Launching
With no subcommand, crabcode opens the TUI:
crabcode # Launch interactive TUI (default)
crabcode "explain this" # Enter a session with a prompt
crabcode -p "summarize" # One-shot print mode: print and exitcrabcode # Launch interactive TUI (default)
crabcode "explain this" # Enter a session with a prompt
crabcode -p "summarize" # One-shot print mode: print and exitSubcommands
crabcode doctor # Diagnose environment (version / platform / git / gh / bootstrap)
crabcode version # Print version only (same as --version)
crabcode browser ... # Built-in browser automation (crabcode-browser, see [chrome](/en/docs/crabcode/chrome))
crabcode cron ... # Cron job management (see matrix below)
crabcode auth ... # Login / status / logout
crabcode mcp ... # MCP server management
crabcode plugin ... # Plugins, marketplace, install, enable/disable
crabcode server # Start the App Server for desktop / IDE / local integrations
crabcode serve # Native launcher service entry
crabcode open <cc-url> # Open a cc://connect?... deep link
crabcode ssh <host> [dir] # Enter a remote working directory over SSH
crabcode agents # Manage agent configuration
crabcode auto-mode ... # Auto-mode defaults / config / critique
crabcode update # Check and install the latest version (upgrade also works)
crabcode install # Install / reinstall the native build
crabcode --help # Full subcommand + flag listingcrabcode doctor # Diagnose environment (version / platform / git / gh / bootstrap)
crabcode version # Print version only (same as --version)
crabcode browser ... # Built-in browser automation (crabcode-browser, see [chrome](/en/docs/crabcode/chrome))
crabcode cron ... # Cron job management (see matrix below)
crabcode auth ... # Login / status / logout
crabcode mcp ... # MCP server management
crabcode plugin ... # Plugins, marketplace, install, enable/disable
crabcode server # Start the App Server for desktop / IDE / local integrations
crabcode serve # Native launcher service entry
crabcode open <cc-url> # Open a cc://connect?... deep link
crabcode ssh <host> [dir] # Enter a remote working directory over SSH
crabcode agents # Manage agent configuration
crabcode auto-mode ... # Auto-mode defaults / config / critique
crabcode update # Check and install the latest version (upgrade also works)
crabcode install # Install / reinstall the native build
crabcode --help # Full subcommand + flag listingCurrent builds support both installer-script upgrades and CLI
update/upgrade/installflows. If a platform-specific launcher differs, trustcrabcode --help. There is no publiccrabcode uninstallsubcommand; see Install, PATH, and uninstall for program cleanup, PATH cleanup, and data-retention choices.
Account: crabcode auth
| Subcommand | Purpose |
|---|---|
crabcode auth login | Start login |
crabcode auth status | Print account state |
crabcode auth logout | Sign out |
MCP: crabcode mcp
| Subcommand | Purpose |
|---|---|
crabcode mcp serve | Run CrabCode as an MCP server |
crabcode mcp list | List configured MCP servers |
crabcode mcp add <name> <command> [args...] | Add a stdio MCP server |
crabcode mcp add-json <name> '<json>' | Add from JSON config |
crabcode mcp add-from-crabcode-desktop | Import from desktop config |
crabcode mcp get <name> | Show one server config |
crabcode mcp remove <name> | Remove a server |
crabcode mcp reset-project-choices | Reset project-level MCP choices |
Plugins: crabcode plugin / crabcode plugins
| Subcommand | Purpose |
|---|---|
crabcode plugin list | List plugins |
crabcode plugin validate <dir> | Validate a local plugin |
crabcode plugin install <source> | Install a plugin |
crabcode plugin uninstall <id> | Uninstall a plugin |
crabcode plugin enable <id> / disable <id> | Enable or disable |
crabcode plugin update <id> | Update |
crabcode plugin marketplace add <url> | Add a marketplace |
crabcode plugin marketplace list | List marketplaces |
crabcode plugin marketplace remove <id> | Remove a marketplace |
crabcode plugin marketplace update <id> | Update a marketplace |
App Server, deep links, and remote
| Command | Purpose |
|---|---|
crabcode server | Start the local App Server and print a cc://connect?... URL |
crabcode open <cc-url> | Open a cc://connect?transport=tcp-ws... deep link |
crabcode ssh <host> [dir] | Run CrabCode in a remote working directory over SSH |
crabcode remote-control / crabcode rc | Remote-control bridge |
crabcode daemon ... | Daemon management entry |
Background sessions
| Command | Purpose |
|---|---|
crabcode --bg "..." | Run a task in the background |
crabcode ps | List background sessions |
crabcode logs <id> | Show background logs |
crabcode attach <id> | Attach to a background session |
crabcode kill <id> | Stop a background session |
Other management entries
| Command | Purpose |
|---|---|
crabcode wizard | Interactive setup or diagnosis wizard |
crabcode setup-token | Set or refresh a local token |
crabcode agents | Manage custom agents |
crabcode auto-mode defaults | Print auto-mode defaults |
crabcode auto-mode config | Inspect or edit auto-mode config |
crabcode auto-mode critique | Critique auto-mode behavior |
crabcode environment-runner | Environment runner entry |
crabcode self-hosted-runner | Self-hosted runner entry |
crabcode cron subcommand matrix
Cron jobs run via a standalone crabcode-cron daemon that is auto-spawned on first use. Disable with CRABCODE_DISABLE_CRON=1.
| Subcommand | Purpose |
|---|---|
crabcode cron list [--json] | List all cron jobs |
crabcode cron add --name <n> --schedule "<cron>" [--once] [--agent-id <id>] [--message <s>] | Create a recurring job from a 5-field cron expression |
crabcode cron add --name <n> --at <ISO-8601> | Fire once at an absolute time (implies --once) |
crabcode cron add --name <n> --every-ms <ms> | Fire every N milliseconds |
crabcode cron edit <id> [--name ...] [--schedule ...] [--agent-id ...] [--message ...] | Edit selected fields on an existing job |
crabcode cron rm <id> | Remove a job |
crabcode cron enable <id> | Enable a job |
crabcode cron disable <id> | Disable a job |
crabcode cron status [--json] | Daemon status (total / enabled jobs / version) |
crabcode cron run <id> | Fire once immediately |
crabcode cron runs <id> [--limit N] [--json] | View run history |
--schedule/--at/--every-msare mutually exclusive.--atimplies--once.
Common flags
| Flag | Description |
|---|---|
-p, --print | One-shot: prompt → output → exit |
-c, --continue | Continue the most recent session in this directory |
-r, --resume [<id>] | Pick a past session (interactive if no id given) |
--fork-session | When resuming, allocate a fresh session id |
--model <name> | Pick model (semantic alias like best / planmode, or full model id) |
--effort <level> | Thinking effort: low / medium / high / max |
--permission-mode <mode> | Startup mode: default / acceptEdits / plan / bypassPermissions / dontAsk |
--add-dir <path...> | Grant CrabCode extra working directories (repeatable) |
--mcp-config <file...> | Load one or more MCP server configs |
--plugin-dir <path> | Load plugins from a directory for this session (repeatable) |
--settings <file-or-json> | Load additional settings (file path or JSON string) |
--agents <json> | Inline JSON defining custom agents |
--agent <name> | Start with the given agent active |
--session-id <uuid> | Use a specific session id (must be a valid UUID) |
-n, --name <name> | Display name for the session |
--output-format <fmt> | --print output format: text / json / stream-json |
--input-format <fmt> | --print input format: text / stream-json |
--json-schema <schema> | Require JSON output to follow a schema in --print mode |
--include-hook-events | Include hook events in stream-json output |
--include-partial-messages | Include partial messages in stream-json output |
--max-turns <n> | Maximum agentic turns in non-interactive mode (with --print) |
--max-budget-usd <n> | Hard cap on API spend (with --print) |
--allowedTools <tools...> | Tool allowlist (comma- or space-separated, e.g. "Bash(git:*) Edit") |
--disallowedTools <tools...> | Tool denylist |
--tools <tools...> | Explicit tool set ("" disables all, default keeps all) |
--system-prompt <text> / --system-prompt-file <path> | Override the system prompt |
--append-system-prompt <text> / --append-system-prompt-file <path> | Append to the default system prompt |
--fallback-model <name> | Auto-fall back when the primary model is overloaded (with --print) |
--dangerously-skip-permissions | Bypass all permission checks (sandboxed envs only) |
--ide | Auto-connect to IDE on startup if exactly one is available |
--bare | Minimal mode: skip hooks / LSP / plugin sync / auto-memory |
--chrome / --no-chrome | Enable / disable Chrome integration |
-d, --debug [filter] | Enable debug logs (with optional category filter) |
--debug-file <path> | Write debug logs to a file |
--verbose | Override verbose mode from config |
--setting-sources <sources> | Restrict setting sources |
--profile <name> | Use a named config profile |
--session <value> | Select a session entry or alias |
--file <path> | Attach a file to the prompt/session |
-w, --worktree | Run in worktree mode |
--tmux | Use tmux/worktree helper flow |
--version | Print version |
Full list: crabcode --help. Low-frequency flags can be passed verbatim after --:
crabcode -- --max-turns 5 --allowedTools Bashcrabcode -- --max-turns 5 --allowedTools BashSlash command index
Type / in the TUI for autocomplete. Below is a grouped index of the available commands; each one has a live one-liner inside the TUI when you hover it.
Start / help
| Command | Purpose |
|---|---|
/help | Show help and available commands |
/init | Initialize CRABCODE.md from your codebase (with optional skills/hooks) |
/clear | Reset current session, free up context |
/doctor | Diagnose and validate the CrabCode install / config |
/version | Print the version this session is running |
/release-notes | Show release notes |
/status | Show CrabCode status: version, model, account, API, tools |
Model & thinking
| Command | Purpose |
|---|---|
/model | Switch or inspect the current model |
/effort | Cycle thinking tier (off / standard / deep — see thinking-mode) |
/fast | Toggle fast mode |
/smallmodel | Pick the small/fast model used for internal sub-agent / summary work |
/local-models | Check status, install or remove curated local models |
/advisor | Configure the advisor model |
Tools & permissions
| Command | Purpose |
|---|---|
/permissions | Manage tool allow / deny rules |
/sandbox | Toggle sandbox mode (see sandboxing) |
/privacy-settings | View and update privacy settings |
/hooks | Inspect hook configuration for tool events |
/add-dir | Grant the session another working directory |
Git workflow
| Command | Purpose |
|---|---|
/diff | View uncommitted changes and per-turn diffs |
/files | List every file in the current context |
/branch | Branch off from the current session position |
/commit | Create a git commit |
/commit-push-pr | Commit, push, and open a PR |
/pr-comments | Fetch GitHub Pull Request comments |
See git-workflow.
Code review
| Command | Purpose |
|---|---|
/review | Review a Pull Request |
/ultrareview | Web CrabCode finds & verifies bugs on the current branch, ~10–20 min (see crabcode-on-the-web) |
/security-review | Security review of pending changes on the current branch |
See code-review.
Session management
| Command | Purpose |
|---|---|
/session | Show remote session URL + QR |
/resume | Resume a past session |
/rewind | Rewind code or session to an earlier point |
/rename | Rename the current session |
/export | Export the current session to a file or clipboard |
/tag | Toggle searchable tags on the current session |
/compact | Compact session history but keep a summary (optional summary hint) |
See sessions.
Agents & tasks
| Command | Purpose |
|---|---|
/agents | Manage agent configurations |
/tasks | Manage background tasks |
/plan | Enable plan mode or view the current plan |
/brief | Toggle brief mode |
/proactive | Toggle proactive (autonomous) mode |
See agents.
Integrations
| Command | Purpose |
|---|---|
/mcp | Manage MCP servers |
/plugin | Manage CrabCode plugins |
/skills | List available skills |
/reload-plugins | Activate pending plugin changes in the current session |
/install-github-app | Configure CrabCode GitHub Actions on a repo |
/install-slack-app | Install the CrabCode Slack app |
/ide | Manage IDE integrations and show status |
/terminal-setup | Install newline-key support for your terminal (platform variants) |
/web-setup | Set up CrabCode on the web (requires connecting GitHub) |
Remote tasks
| Command | Purpose |
|---|---|
/ultraplan | Web CrabCode drafts an editable high-level plan (~10–30 min) |
/ultrareview | Web CrabCode bug-finding session (see above) |
/remote-control | Attach this terminal to a remote control session (alias /rc) |
/remote-env | Configure the default runtime for remote sessions |
See crabcode-on-the-web and remote-control.
Input modalities
| Command | Purpose |
|---|---|
/chrome | Browser automation and Chrome extension-mode settings (see chrome; extension setup in the browser extension install guide) |
/voice | Toggle voice mode |
/desktop | Continue the current session on the desktop app |
/mobile | Show a QR code to download the mobile app |
See input-modalities.
Personalization
| Command | Purpose |
|---|---|
/theme | Switch theme |
/color | Set the prompt-bar color for the current session |
/vim | Toggle Vim editing mode |
/keybindings | Open or create the key-binding config file |
/statusline | Configure the status-bar UI |
Debug & meta
| Command | Purpose |
|---|---|
/cost | Show total cost and duration of the current session |
/usage | Show plan usage limits |
/extra-usage | Configure overflow usage when the quota runs out |
/stats | Show CrabCode usage statistics and activity |
/insights | Generate an analytical report on your sessions |
/feedback | Send feedback |
/login | Sign in / switch Acosmi account |
/logout | Sign out of Acosmi |
/upgrade | Upgrade to the Max plan |
/update | Check for updates and reinstall the latest (alias of /install latest) |
/install | Install a native CrabCode build |
Misc
| Command | Purpose |
|---|---|
/btw | Ask a side question without interrupting the main thread |
/context | Visualize current context usage as a colored grid |
/copy | Copy CrabCode's last reply (/copy N copies the N-th most recent) |
/passes | Share a free week of CrabCode with friends |
/memory | Edit CrabCode memory files (cross-session) |
/init-verifiers | Create verifier skills that auto-validate code changes |
/exit or Ctrl+D | Quit |
This index covers every publicly shipped slash command. Hidden / debug commands (e.g.
/heapdump,/output-style) are intentionally omitted; use/helpinside the TUI to discover them.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Normal exit |
| 1 | Generic error |
| 2 | CLI argument parse error (unknown flag, etc.) |
| 130 | User Ctrl+C |