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.

  1. Install it (Homebrew):

    brew install charmbracelet/tap/crush
  2. Pull a coding model that supports tool calling (replace qwen3-coder:30b with your choice).

    ollama pull qwen3-coder:30b
  3. Raise 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 serve
  4. Add Ollama as a provider in your crushrc; with no model list, Crush discovers your pulled models.

    ~/.config/crush/crushrc
    provider add ollama \
      --name Ollama \
      --type ollama \
      --base-url "http://localhost:11434/v1/"
  5. Optionally pin the model and tell Crush its context window (match the value Ollama serves).

    ~/.config/crush/crushrc
    model add ollama/qwen3-coder:30b \
      --name "Qwen3 Coder 30B" \
      --context-window 64000
  6. Run crush in your project and pick the Ollama model.

    crush
Other ways to install

npm

npm install -g @charmland/crush

Windows (winget)

winget install charmbracelet.crush

Go

go install github.com/charmbracelet/crush@latest

Check 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 500

Which 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.

MachineModelQuantContextFitOllama
12 GB GPUQwen 3.5 9BQ4_K_M32,768Comfortable (7.4 GB of 12 GB)qwen3.5:9b
Qwen 3.6 35B-A3BQ4_K_M32,768With CPU offload (MoE) (22.7 GB of 12 GB)qwen3.6:35b-a3b
16 GB GPUQwen 3.5 9BQ4_K_M32,768Comfortable (7.4 GB of 16 GB)qwen3.5:9b
Qwen 3.6 35B-A3BQ4_K_M32,768With CPU offload (MoE) (22.7 GB of 16 GB)qwen3.6:35b-a3b
24 GB GPUQwen3.8 27BQ4_K_M32,768Comfortable (19.9 GB of 24 GB)qwen3.8:27b
Qwen 3.6 27BQ4_K_M32,768Comfortable (19.9 GB of 24 GB)qwen3.6:27b
Devstral Small 2 24BQ4_K_M32,768Comfortable (20.7 GB of 24 GB)devstral-small-2:24b
Qwen 3.6 35B-A3BQ4_K_M65,536Tight (23.3 GB of 24 GB)qwen3.6:35b-a3b
32 GB GPUQwen3.8 27BQ4_K_M32,768Comfortable (19.9 GB of 32 GB)qwen3.8:27b
Qwen 3.6 27BQ4_K_M32,768Comfortable (19.9 GB of 32 GB)qwen3.6:27b
Devstral Small 2 24BQ4_K_M32,768Comfortable (20.7 GB of 32 GB)devstral-small-2:24b
Qwen 3.6 35B-A3BQ4_K_M65,536Comfortable (23.3 GB of 32 GB)qwen3.6:35b-a3b
Qwen3-Coder 30B-A3B (MoE)Q4_K_M65,536Comfortable (25.7 GB of 32 GB)qwen3-coder:30b
Mac, 64 GBQwen 3.6 35B-A3BQ8_0131,072Comfortable (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.

Sources (7), checked 2026-10-20