Crush
Connect the Crush terminal AI coding tool to the LMU AI API — add a custom provider in crushrc to use Claude, GPT and Chinese models.
Crush is a terminal AI coding tool from Charm, offering both a CLI and a TUI for code generation, debugging, conversation, file operations, and multitasking from the command line. It supports custom providers — this page covers connecting it to LMU AI.
Install Crush
Pick whichever method suits your system:
brew install charmbracelet/tap/crushnpm install -g @charmland/crushwinget install charmbracelet.crushOr with Scoop:
scoop bucket add charm https://github.com/charmbracelet/scoop-bucket.git
scoop install crushyay -S crush-binnix run github:numtide/nix-ai-tools#crushConfigure LMU AI
Crush is configured with a Bash script. Edit the global config file:
- macOS / Linux:
~/.config/crush/crushrc - Windows:
%USERPROFILE%\.config\crush\crushrc
There are two steps: add LMU AI as a provider with provider add, then register the models you want with model add. Choose the protocol that matches the models you plan to use:
Works for OpenAI models such as gpt-5.6-sol and gpt-5.5. Claude and Chinese models can also go through this protocol (the LMU AI backend handles the protocol conversion).
# Add LMU AI as a provider (OpenAI-compatible protocol)
provider add lmuai \
--type openai-compat \
--base-url "https://api.lmuai.com/v1" \
--api-key "sk-your-lmu-ai-api-key"
# Register the models you want
model add lmuai/gpt-5.6-sol --name "GPT-5.6 Sol" --context-window 400000
model add lmuai/claude-opus-5 --name "Claude Opus 5" --context-window 200000
# Set it as the default large-model slot
model large lmuai/claude-opus-5The type is openai-compat, not openai
Crush has two OpenAI types. Per the official docs, openai is for proxying or routing requests through OpenAI itself, while openai-compat is for non-OpenAI providers that offer OpenAI-compatible APIs. LMU AI is the latter, so use openai-compat.
Works for models served over the Anthropic protocol, such as claude-opus-5, claude-sonnet-5, qwen3.8-max-preview, deepseek-v4-pro, glm-5.2, and kimi-k3.
# Add LMU AI as a provider (Anthropic protocol)
provider add lmuai-anthropic \
--type anthropic \
--base-url "https://api.lmuai.com" \
--api-key "sk-your-lmu-ai-api-key" \
--extra-header anthropic-version 2023-06-01
# Register the models you want
model add lmuai-anthropic/claude-opus-5 \
--name "Claude Opus 5" \
--context-window 200000 \
--can-reason true \
--supports-images true
model add lmuai-anthropic/glm-5.2 --name "GLM-5.2" --context-window 200000
# Set it as the default large-model slot
model large lmuai-anthropic/claude-opus-5Don't add /v1 to the Anthropic base URL
Set --base-url to https://api.lmuai.com — not https://api.lmuai.com/v1. Crush appends /v1/messages itself, so the extra segment makes it request /v1/v1/messages, which fails with:
not found: POST "https://api.lmuai.com/v1/v1/messages": 404 Not FoundThis is the opposite of openai-compat (which does need /v1) — don't mix them up.
Config files are trusted code
An official warning: crushrc runs with your shell privileges before the UI appears, and any $(...) in crush.json runs at load time. Don't launch Crush in a directory whose config you haven't reviewed, and don't source config files of unknown origin.
Start using it
Restart Crush once configured:
crushSwitch models from within a session with:
/modelsLMU AI models missing from /models?
Crush's built-in model list comes from the Catwalk database, which doesn't include LMU AI model IDs. You must register them with model add <provider>/<model-id> first — they'll appear in the /models list after a restart.
Common model IDs
| Model ID | Notes |
|---|---|
claude-opus-5 | Claude Opus 5 (flagship, recommended) |
claude-sonnet-5 | Claude Sonnet 5 (balanced) |
claude-haiku-4-5 | Claude Haiku 4.5 (fast) |
gpt-5.6-sol | GPT-5.6 Sol |
glm-5.2 | GLM-5.2 |
qwen3.8-max-preview | Qwen 3.8 Max Preview |
deepseek-v4-pro | DeepSeek V4 Pro |
kimi-k3 | Kimi K3 |
Not sure which model to enter? Go to the Model Gallery to see every available model ID and copy it with one click.
Legacy JSON config
crush.json is officially deprecated
Crush originally used crush.json, which is now deprecated — the maintainers have said they'll keep supporting it, but new configuration options will only be added to the Bash config (crushrc). Plenty of tutorials still teach the JSON format, but new setups should use crushrc as shown above.
Already have a JSON config and want to migrate? Start Crush and just ask it in plain language to convert it for you.
If you do want to use JSON, the format looks like this (in a crush.json in your project directory or under ~/.config/crush/):
{
"$schema": "https://charm.land/crush.json",
"providers": {
"lmuai": {
"id": "lmuai",
"name": "LMU AI",
"type": "openai-compat",
"base_url": "https://api.lmuai.com/v1",
"api_key": "sk-your-lmu-ai-api-key",
"models": [
{
"id": "claude-opus-5",
"name": "Claude Opus 5",
"context_window": 200000,
"default_max_tokens": 32000
}
]
}
}
}Don't omit type and models in JSON
Just id / name / base_url / api_key won't work: type decides which protocol is used (omitting it falls back to a default guess), and models decides what you can pick under /models. This is the most common reason a copy-pasted minimal example fails.
Notes
- The config file is
~/.config/crush/crushrc(%USERPROFILE%\.config\crush\crushrcon Windows);~/.local/share/crush/crush.jsonis machine-owned state — don't edit it - Use
--type openai-compatfor LMU AI's OpenAI-compatible endpoint (notopenai), and--type anthropicfor the Anthropic protocol - The two types take opposite
--base-urlforms:anthropictakeshttps://api.lmuai.com(no/v1), whileopenai-compattakeshttps://api.lmuai.com/v1(with/v1). Adding/v1on the Anthropic side produces/v1/v1/messagesand a 404 - For the API key, just enter the
sk-key generated in the LMU AI console - LMU AI models aren't in Crush's built-in list, so they must be registered with
model addbefore they appear under/models
Last updated:
Get an LMU AI key and start using Claude, Codex and more
Free sign-up, flexible plans, one key across Claude Code, Codex CLI, Cursor, VS Code, OpenCode, Cherry Studio and other AI tools.
Sign up