Skip to content

CLI Commands

All flags, subcommands, and arguments are sourced directly from crates/edgecrab-cli/src/cli_args.rs. Run edgecrab --help or edgecrab <subcommand> --help for live output at any time.


EdgeCrab can be installed via npm, pip (PyPI), or cargo — pick whatever fits your environment. No Rust toolchain is needed for the npm or pip methods.

Terminal window
# Global install — adds `edgecrab` to your PATH
npm install -g edgecrab-cli
# Use without a global install
npx edgecrab-cli setup
npx edgecrab-cli "summarise the git log for today"
Terminal window
pip install edgecrab-cli
# Isolated install with pipx (recommended)
pipx install edgecrab-cli
Terminal window
cargo install edgecrab-cli
Terminal window
edgecrab version
# EdgeCrab 0.1.0 (rustc 1.85.0, 2025-02-20)
# providers: copilot openai anthropic gemini xai deepseek huggingface zai openrouter ollama lmstudio

edgecrab [GLOBAL FLAGS] [PROMPT] -- interactive TUI (default)
|
+-- setup [section] [--force] -- first-run wizard
+-- doctor -- environment diagnostics
+-- migrate [--dry-run] -- import from hermes-agent
+-- acp -- ACP stdio server (VS Code)
+-- version -- build info + provider list
+-- status -- runtime status summary
+-- whatsapp -- pair WhatsApp bridge
|
+-- profile <sub> -- named profile management
+-- sessions <sub> -- session history
+-- config <sub> -- config.yaml management
+-- tools <sub> -- tool/toolset inspection
+-- gateway <sub> -- messaging gateway daemon
+-- completion <shell> -- shell tab-completion script

These flags are accepted by edgecrab and by most subcommands (global = true in clap):

FlagShortDescription
--model <provider/model>-mOverride default model, e.g. openai/gpt-4o
--toolset <list>Comma-separated toolset names or aliases
--profile <name>-pRun under a named profile (does not change sticky default)
--session <id>-sResume a specific session by ID
--continue [title]-CResume the most-recent CLI session (optionally by title)
--resume <id-or-title>-rResume a session by ID or title with fuzzy resolution
--quiet-qSuppress TUI; print only final response (pipe-friendly)
--config <path>-cUse alternate config file instead of ~/.edgecrab/config.yaml
--debugEnable debug logging (RUST_LOG=debug)
--no-bannerSkip the startup ASCII art banner

Agent-only flags (only apply when running in interactive / one-shot mode):

FlagShortDescription
--worktree-wCreate an isolated git worktree for this session
--skill <name>-SPreload a skill (repeatable; comma-separated ok)

Terminal window
edgecrab # Interactive TUI
edgecrab "summarise the git log" # One-shot with initial message
edgecrab -q "explain this codebase" # Quiet/pipe mode
edgecrab -C # Continue the last session
edgecrab -C "my project" # Continue session by title
edgecrab -r abc123 "add more tests" # Resume session abc123
edgecrab -w "refactor auth module" # New isolated worktree
edgecrab -S security-audit "audit payment" # Preload a skill
edgecrab --model anthropic/claude-opus-4 # Override model
edgecrab --toolset coding "write tests" # Use 'coding' toolset only

Interactive first-run wizard. Re-run to reconfigure.

Terminal window
edgecrab setup # Full interactive wizard
edgecrab setup model # Model and provider section only
edgecrab setup tools # Toolsets configuration only
edgecrab setup gateway # Messaging platforms only
edgecrab setup agent # Agent personality and memory only
edgecrab setup --force # Overwrite existing config from scratch

The wizard detects API keys from the environment, lets you choose a provider, and writes ~/.edgecrab/config.yaml.


Full diagnostic health check — no flags required.

Terminal window
edgecrab doctor

Checks:

  • Config file existence and validity
  • EDGECRAB_HOME directories (memories, skills, state db)
  • Provider API key presence for each configured provider
  • Live provider ping (latency test)
  • MCP server reachability
  • Chrome/Chromium binary for browser tools
  • Gateway platform token presence
  • SQLite database integrity (WAL checkpoint)
  • Available disk space

One-way import from ~/.hermes/ (hermes-agent) into ~/.edgecrab/.

Terminal window
edgecrab migrate # Live migration
edgecrab migrate --dry-run # Preview without writing any files

What is imported:

Source (~/.hermes/) Destination (~/.edgecrab/)
------------------------------------------------------------
config.yaml --> config.yaml
memories/ --> memories/
skills/ --> skills/
.env --> .env

Safe to re-run — existing files are skipped or merged, never silently overwritten.


Start an ACP JSON-RPC 2.0 stdio server for editor integration.

Terminal window
edgecrab acp

Reads requests from stdin, writes responses to stdout. Used by the VS Code GitHub Copilot extension and any ACP-compatible runner. See ACP Integration for configuration and manifest details.


Print build info and supported providers.

Terminal window
edgecrab version
# EdgeCrab 0.1.0 (rustc 1.85.0, 2025-02-20, git a1b2c3d)
# providers: copilot openai anthropic gemini xai deepseek
# huggingface zai openrouter ollama lmstudio
edgecrab --version # identical output

High-level runtime status: active profile, model, gateway, and session count.

Terminal window
edgecrab status

Pair and configure the WhatsApp bridge interactively.

Terminal window
edgecrab whatsapp

Run the ACP stdio server for editor integration, or generate workspace-local VS Code onboarding files.

Terminal window
edgecrab acp
edgecrab acp init
edgecrab acp init --workspace /path/to/repo
edgecrab acp init --force

edgecrab acp init creates .edgecrab/acp_registry/agent.json and .vscode/settings.json in the target workspace. This removes the manual registryDir setup that Hermes still requires.


Generate shell tab-completion scripts. Output the script and source it in your shell’s init file.

Terminal window
edgecrab completion bash >> ~/.bashrc
edgecrab completion zsh >> ~/.zshrc

Manage named profiles. Each profile gets its own isolated home directory under ~/.edgecrab/profiles/<name>/ (config, memories, skills, sessions).

Terminal window
edgecrab profile list # List all profiles
edgecrab profile create <name> # Create a new profile
edgecrab profile create <name> --clone # Clone current profile
edgecrab profile use <name> # Switch sticky default profile
edgecrab profile show [name] # Show profile metadata
edgecrab profile path [name] # Print profile home directory
edgecrab profile delete <name> # Delete a profile (requires confirm)

Running edgecrab -p <name> "prompt" overrides the sticky profile for a single invocation without changing the default.


Manage conversation history stored in the SQLite state database.

Terminal window
edgecrab sessions list # List recent sessions (newest first)
edgecrab sessions show <id> # Show messages in a session
edgecrab sessions search <query> # Full-text search via FTS5
edgecrab sessions delete <id> # Delete a session
edgecrab sessions rename <id> <new-title> # Rename a session
edgecrab sessions export <id> [format] # Export: markdown, json, or text
edgecrab sessions prune --older-than 30 # Delete sessions older than N days

Inspect and modify ~/.edgecrab/config.yaml without opening a text editor.

Terminal window
edgecrab config show # Print active config as YAML
edgecrab config edit # Open in $EDITOR
edgecrab config set <key> <value> # Set a config key (dotted path)
edgecrab config path # Print path to config.yaml
edgecrab config env-path # Print path to .env
edgecrab config edit-soul # Open SOUL.md in $EDITOR

Key path examples: model.default_model, tools.enabled_toolsets, memory.auto_flush, display.show_cost.


Inspect registered tools and toolset composition. Useful for debugging toolset configuration.

Terminal window
edgecrab tools list # List all registered tools
edgecrab tools show <name> # Show tool schema and description
edgecrab tools toolsets # List toolset aliases and expansions

Manage the messaging gateway daemon that connects EdgeCrab to external messaging platforms.

Terminal window
edgecrab gateway start # Start gateway daemon (background)
edgecrab gateway start --foreground # Start gateway in foreground (logs to stdout)
edgecrab gateway stop # Stop gateway daemon
edgecrab gateway status # Show daemon + per-platform status
edgecrab gateway logs # Follow live gateway logs
edgecrab gateway restart # Stop then start
edgecrab gateway configure # Interactive platform setup wizard
edgecrab gateway configure telegram # Configure a specific platform

Platforms are enabled and configured via environment variables or config.yaml gateway section — not via gateway start flags. See User Guide → Messaging for per-platform setup.


Re-listed here for clarity — see full entry above.


CodeMeaning
0Success
1General error (configuration, provider error)
2Usage error (bad arguments)
130Interrupted by Ctrl-C

  • edgecrab -q "prompt" | your-tool: The --quiet flag suppresses the TUI and prints only the final response. Combine with pipes for scripting and CI.
  • edgecrab --debug 2>&1 | grep edgecrab_core: Filter debug logs to the agent loop only, cutting out the noise from other crates.
  • edgecrab sessions search "my query": FTS5 full-text search across all conversation history — faster than scrolling session lists.
  • edgecrab config set key value avoids opening the YAML editor for single-value changes.
  • edgecrab completion zsh >> ~/.zshrc adds tab-completion for all subcommands and flags.
  • Worktrees for risky refactors: edgecrab -w "refactor auth module" creates a git worktree so changes don’t land on the current branch until you’re ready.

What’s the difference between --quiet and piping the output? --quiet disables the TUI entirely and streams the final text response to stdout. Without it, the TUI overrides terminal control and can’t be piped reliably.

Can I resume a specific session from the command line? Yes: edgecrab --session <id> opens a specific session. Use edgecrab sessions list to find session IDs, or edgecrab --continue to resume the most recent.

How do I run the agent in a cron job? Use --quiet mode so there’s no TUI, and redirect stderr to a log file:

Terminal window
edgecrab -q "summarise new emails and append to daily-report.md" >> /var/log/edgecrab-cron.log 2>&1

Does edgecrab doctor fix problems it finds? No — it diagnoses and reports. To fix, follow the suggested remediation steps it prints.

What does --no-banner do? Suppresses the ASCII art banner on startup. Useful in narrow terminals or environments where the banner garbles output.