Crush CLI Cheatsheet - Charmbracelet Terminal Multi-Model Coding Agent

For terminal coding agents, weight increasingly comes down to distribution and diagnosability. Crush is a single Rust binary from Charmbracelet that runs on macOS, Linux, WSL on Windows, and the BSDs, so copying one file is the whole install. Its TUI is unusually finished for its class, and the built-in LSP integration means answers land on real symbols and diagnostics instead of text-pattern guesses. This table groups installation and startup, sessions and modes, configuration, and session diagnostics, covering how providers are configured, how to read the logs, and when it is reasonable to skip confirmation gates. The deciding question is how much you trust the working directory: inside a project you know, --yolo removes a lot of friction, while in unfamiliar or sensitive repositories a allowed_tools allowlist is the safer shape. Reach for it when you want a portable agent, when behavior looks wrong and you need the log to explain it, or when you want a few commands exempt from confirmation instead of everything.

AI CLI·23 commands·Last updated 2026-08-26
crushcharmbraceletaicliagentCoding Agentrust

Install & Launch 6

brew install charmbracelet/tap/crush
Install on macOS via Homebrew
npm install -g @charmland/crush
Install globally via npm
winget install charmbracelet.crush
Install on Windows via Winget
go install github.com/charmbracelet/crush@latest
Install via the Go toolchain
crush
Start the first session
export ANTHROPIC_API_KEY="sk-..."
Set the provider API key (or OPENAI/GEMINI, etc.)

Sessions & Modes 4

crush --yolo
Skip all confirmations and execute (use with caution)
/model claude-sonnet-4
Switch the model inside a session
crush logs --follow
Tail logs in real time
crush --help
List all commands and flags

Configuration 4

./.crush.json
Project-level config (highest priority)
./crush.json
Project config (alternate location)
$HOME/.config/crush/crush.json
Global user config
"permissions": { "allowed_tools": ["ls", "rg", "cargo check"] }
Whitelist tools to avoid per-run prompts

Sessions & Diagnostics 9

crush ask "..."
Submit a one-off question non-interactively
crush edit <file>
Ask the agent to edit a specific file
crush config set model <model>
Set the default model
crush history list
List session history
crush init
Initialize project configuration
crush --version
Print the installed version
crush --debug
Enable debug logging
/clear
Clear the current conversation context
/compact
Compact history to free context

Tips

  • Crush is a single binary, cross-platform (including Windows PowerShell/WSL and BSD); first launch prompts for a provider API key, or set an env var directly.
  • crush --yolo skips all confirmations for fast runs in trusted environments; for daily use, an allowed_tools whitelist is safer, exempting only specific commands.
  • Crush has built-in LSP enhancement (gopls/rust-analyzer/pyright) and MCP extensions, so code questions get real symbol tables and diagnostics — more accurate than plain text search.

FAQ

Which model providers does Crush support?

It supports OpenAI, Anthropic, Groq, Gemini, Bedrock, Azure, and any OpenAI/Anthropic-compatible endpoint, and you can switch mid-session with /model without losing context. It auto-detects the env vars you set.

What are Crush LSP and MCP for?

LSP lets Crush call gopls/rust-analyzer/pyright for real-time symbol tables and diagnostics like you would; MCP plugs in Stripe docs, Docker, internal wikis, etc. as first-class context providers to extend capabilities.

Official References

Each command links to its official documentation below, so you can verify the latest usage and read deeper.

Maintained by LaoHand

Publicly updated on Aug 26, 2026, continuously proofread against official docs.

Contact Us

Wrong command or description? Send us corrections, business inquiries or product feedback by email.

Contact Us