Crush
Crush is Charmbracelet's terminal coding agent. Its OpenAI-compatible provider support lets you route requests through ModelGo.
Prerequisites
- Node.js 18+, Go, or Homebrew is available;
crush --versionworks. - A ModelGo API key is available from ModelGo Console.
- You know the logical model ID from the Model Catalog.
1. Install Crush
brew install charmbracelet/tap/crush
crush --versionYou can also use npm install -g @charmland/crush, go install github.com/charmbracelet/crush@latest, or winget install charmbracelet.crush on Windows.
2. Add a ModelGo provider
Crush reads project .crushrc/crushrc files and the global ~/.config/crush/crushrc (Windows: %USERPROFILE%\\.config\\crush\\crushrc).
export MODELGO_API_KEY="sk-your-token"
crush provider add modelgo --type openai-compat \
--base-url "https://api.modelgo.ai/v1" \
--api-key "$MODELGO_API_KEY"
crush model add modelgo/your-model-id --name "your-model-id"Replace your-model-id with a ModelGo logical model ID.
3. Start and verify
crush
curl https://api.modelgo.ai/v1/models -H "Authorization: Bearer $MODELGO_API_KEY"Select the ModelGo model and send a small read-only task.
Troubleshooting
The provider is missing
Check the crushrc filename and path, then restart Crush. Project configuration takes precedence over global configuration.
401 or 404 responses
Confirm MODELGO_API_KEY is available in the same shell and that the Base URL is exactly https://api.modelgo.ai/v1.
Related docs
- First API Call: Create a key, list models, and verify ModelGo.
- Authentication: Learn safe API key handling.
- Crush repository: Read installation, provider, and command references.
- Crush config schema: Check
crushrcfields.