Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Commands

OpenCrabs has a full CLI with 20+ subcommands for managing every aspect of the agent.

Usage

opencrabs [COMMAND] [OPTIONS]

Commands

CommandDescription
chat (default)Launch the TUI chat interface
daemonRun in background (channels only, no TUI)
agentInteractive multi-turn chat or single-message mode
cronManage scheduled tasks (add/list/remove/enable/disable/test)
channelChannel management (list, doctor)
memoryMemory management (list, get, stats)
sessionSession management (list, get)
dbDatabase management (init, stats, clear)
logsLog management (status, view, clean, open)
serviceSystem service management (install/start/stop/restart/status/uninstall)
statusShow agent status
doctorRun connection health check
onboardRun the setup wizard
completionsGenerate shell completions (bash/zsh/fish/powershell)
versionShow version info
!commandBang operator — Run any shell command instantly without an LLM round-trip. Output shown as system message. e.g. !git status, !ls -la
/evolveAuto-update — Downloads latest release and hot-restarts. Runs automatically on startup when [agent] auto_update = true

Configuration Flags

FlagDefaultDescription
[agent] auto_updatetrueAuto-install new releases on startup and hot-restart. Set to false to keep the manual prompt dialog.

Keyboard Shortcuts (TUI)

ShortcutAction
F12Toggle mouse capture on/off for native terminal text selection

Startup Update Prompt

When a new version is available, a centered dialog appears on the splash screen asking you to accept (Enter) or skip (Esc). Accepting triggers /evolve automatically. After update, the binary restarts and the splash shows the new version.

Channel Commands

/doctor, /help, /usage, /evolve, and system commands work directly on Telegram, Discord, Slack, and WhatsApp without going through the LLM. They execute instantly and return results in the channel.

All channel command logic is centralized in src/channels/commands.rs (847 lines) – a shared handler that eliminates duplicated command logic across 5 channel implementations. Each channel delegates to try_execute_text_command() for consistent behavior.

/evolve on channels now runs directly (downloads + installs the binary) without requiring an LLM round-trip. Previously it was routed through the agent.

Chat Mode

# Default — launch TUI
opencrabs

# Same as above
opencrabs chat

Agent Mode

Non-interactive mode for scripting and automation:

# Interactive multi-turn chat
opencrabs agent

# Single-message mode
opencrabs agent -m "What files changed today?"

Daemon Mode

Run OpenCrabs without the TUI — useful for servers where you only need channel bots. Supports a health endpoint for monitoring.

opencrabs daemon

The agent processes messages from all connected channels (Telegram, Discord, Slack, WhatsApp) but without the terminal UI. Channel bots auto-reconnect on network failures with 5-second backoff.

Health Endpoint

Add to config.toml to expose a health check:

[daemon]
health_port = 8080

Then GET http://localhost:8080/health returns 200 OK with JSON status. Useful for systemd watchdog, uptime monitors, or load balancers.

Service Management

Install OpenCrabs as a system service (launchd on macOS, systemd on Linux):

opencrabs service install
opencrabs service start
opencrabs service stop
opencrabs service restart
opencrabs service status
opencrabs service uninstall

Cron Management

# List all cron jobs
opencrabs cron list

# Add a new cron job
opencrabs cron add \
  --name "Daily Report" \
  --cron "0 9 * * *" \
  --tz "America/New_York" \
  --prompt "Check emails and summarize" \
  --provider anthropic \
  --model claude-sonnet-4-20250514 \
  --thinking off \
  --deliver-to telegram:123456

# Remove a cron job (accepts name or ID)
opencrabs cron remove "Daily Report"

# Enable/disable (accepts name or ID)
opencrabs cron enable "Daily Report"
opencrabs cron disable "Daily Report"

TUI Keyboard Shortcuts

KeyAction
EnterSend message
EscCancel / dismiss
Ctrl+NNew session
Ctrl+LSessions screen
Ctrl+KClear current session
Ctrl+OToggle tool group collapse
|Split pane horizontally
_Split pane vertically
Ctrl+XClose focused pane
TabCycle pane focus / Accept autocomplete
Up/DownNavigate suggestions / sessions
/Start slash command (e.g. /help, /models)
:Start emoji picker