Crush (Charm) with a local model: setup for Ollama, LM Studio or llama.cpp
Crush is Charm's terminal coding agent, with LSP integration and MCP support. It is configured with a crushrc file (Bash with Crush builtins) and auto-discovers models from Ollama, LM Studio and llama.cpp when you add them as providers. It suits terminal users who want a local model without writing a JSON provider config.
At a glance
- Type
- cli
- Licence
- FSL-1.1-MIT
- Latest release
- 0.98.1 (2026-10-09)
- Status
- Maintained
- Local backends
- ollama, lmstudio, openai-compatible
- Needs native tool calling
- Not verified
- MCP support
- Yes
- Recommended minimum context
- Not stated in its docs
- Start-up prompt
- Not measured
- GitHub stars
- 27.9k (2026-10-19)
How to set it up with a local model
Pick your backend. Each command has its own Copy button. Where a step uses an example model, swap in the one you run; the table below lists the ones that fit your machine.
Install it (Homebrew):
brew install charmbracelet/tap/crushPull a coding model that supports tool calling (replace qwen3-coder:30b with your choice).
ollama pull qwen3-coder:30bRaise Ollama's context window (Ollama's docs ask for at least 64K for coding agents); or set the context slider in the Ollama app's Settings instead.
OLLAMA_CONTEXT_LENGTH=64000 ollama serveAdd Ollama as a provider in your crushrc; with no model list, Crush discovers your pulled models.
~/.config/crush/crushrcprovider add ollama \ --name Ollama \ --type ollama \ --base-url "http://localhost:11434/v1/"Optionally pin the model and tell Crush its context window (match the value Ollama serves).
~/.config/crush/crushrcmodel add ollama/qwen3-coder:30b \ --name "Qwen3 Coder 30B" \ --context-window 64000Run crush in your project and pick the Ollama model.
crush
Other ways to install
npm
npm install -g @charmland/crushWindows (winget)
winget install charmbracelet.crushGo
go install github.com/charmbracelet/crush@latestCheck that it works
Start crush in a project, select the local model and ask it to read a file. If requests fail, read the log (stored in ./.crush/logs/crush.log).
crush logs --tail 500Which local models fit, by machine
Checked by this site's engine at the context Crush needs, with 32 GB of system RAM for MoE offload. A Mac counts three quarters of unified memory as usable.
| Machine | Model | Quant | Context | Fit | Ollama |
|---|---|---|---|---|---|
| 12 GB GPU | Qwen 3.5 9B | Q4_K_M | 32,768 | Comfortable (7.4 GB of 12 GB) | qwen3.5:9b |
| Qwen 3.6 35B-A3B | Q4_K_M | 32,768 | With CPU offload (MoE) (22.7 GB of 12 GB) | qwen3.6:35b-a3b | |
| 16 GB GPU | Qwen 3.5 9B | Q4_K_M | 32,768 | Comfortable (7.4 GB of 16 GB) | qwen3.5:9b |
| Qwen 3.6 35B-A3B | Q4_K_M | 32,768 | With CPU offload (MoE) (22.7 GB of 16 GB) | qwen3.6:35b-a3b | |
| 24 GB GPU | Qwen3.8 27B | Q4_K_M | 32,768 | Comfortable (19.9 GB of 24 GB) | qwen3.8:27b |
| Qwen 3.6 27B | Q4_K_M | 32,768 | Comfortable (19.9 GB of 24 GB) | qwen3.6:27b | |
| Devstral Small 2 24B | Q4_K_M | 32,768 | Comfortable (20.7 GB of 24 GB) | devstral-small-2:24b | |
| Qwen 3.6 35B-A3B | Q4_K_M | 65,536 | Tight (23.3 GB of 24 GB) | qwen3.6:35b-a3b | |
| 32 GB GPU | Qwen3.8 27B | Q4_K_M | 32,768 | Comfortable (19.9 GB of 32 GB) | qwen3.8:27b |
| Qwen 3.6 27B | Q4_K_M | 32,768 | Comfortable (19.9 GB of 32 GB) | qwen3.6:27b | |
| Devstral Small 2 24B | Q4_K_M | 32,768 | Comfortable (20.7 GB of 32 GB) | devstral-small-2:24b | |
| Qwen 3.6 35B-A3B | Q4_K_M | 65,536 | Comfortable (23.3 GB of 32 GB) | qwen3.6:35b-a3b | |
| Qwen3-Coder 30B-A3B (MoE) | Q4_K_M | 65,536 | Comfortable (25.7 GB of 32 GB) | qwen3-coder:30b | |
| Mac, 64 GB | Qwen 3.6 35B-A3B | Q8_0 | 131,072 | Comfortable (40.7 GB of 48 GB) | — |
Your exact machine: filter the matrix or check any model in the analyzer.
Common problems with local models
- Ollama allocates only 4K context on GPUs under 24 GiB unless you raise it; Crush talks to the OpenAI-compatible /v1 endpoint, so set OLLAMA_CONTEXT_LENGTH or the app slider (docs.ollama.com/context-length).
- Auto-discovery runs only when a provider's model list is empty; once you add a model by hand, pass --discover-models true to merge discovered models back in.
- llama-server now listens on port 9931 by default; pass --port so it matches the --base-url in your crushrc.
- Crush is source-available under FSL-1.1-MIT, not an OSI open-source licence.
Other coding agents
How they rank for local models: the best agent harness for local LLMs.
- OpenCode
- Qwen Code
- Codex CLI
- Cline
- Kilo Code
- Aider
- Pi coding agent
- Claude Code
- Goose
- OpenHands
- Zed agent
- GitHub Copilot BYOK
- Continue (discontinued)
- Roo Code (discontinued)
- Void (discontinued)