Skip to content

DocsCoding agents

Crush

Use Charm's Crush coding agent with your Osarai GPU as an OpenAI-compatible provider, from crush.json or a crushrc file.

Crush is Charm's coding agent for the terminal. It reaches Osarai as an OpenAI-compatible provider over Chat Completions.

Crush answering on qwen3.8-27b served by Osarai
Crush running on an Osarai instance.

Install

Terminal
npm install -g @charmland/crush

Configure

Crush reads JSON (crush.json) or a crushrc file of commands. Both live in its config directory; crush dirs prints where that is (~/.config/crush on macOS and Linux). A crush.json in your project applies to that project only.

~/.config/crush/crush.json
{
  "$schema": "https://charm.land/crush.json",
  "providers": {
    "osarai": {
      "type": "openai-compat",
      "name": "Osarai",
      "base_url": "https://osarai.xyz/v1",
      "api_key": "$OSARAI_API_KEY",
      "models": [
        {
          "id": "qwen3.8-27b",
          "name": "Qwen3.8 27B (Osarai)",
          "context_window": 131072,
          "default_max_tokens": 16384,
          "can_reason": true
        }
      ]
    }
  },
  "models": {
    "large": { "provider": "osarai", "model": "qwen3.8-27b" },
    "small": { "provider": "osarai", "model": "qwen3.8-27b" }
  }
}
  • $OSARAI_API_KEY is read from your environment when Crush starts, so the file holds no secret.
  • large is the model for the main work, small the one for titles and summaries. One instance serves both.
  • context_window tells Crush when to summarise the session; set it to your instance's context window.

Run

Terminal
export OSARAI_API_KEY="qck_your_key_here"
cd your-project
crush

Switch models with Ctrl+P → Switch model. To run one prompt without the interface:

Terminal
crush run "Explain what src/math.ts does"

Crush asks before it runs commands or writes files; crush -y skips those prompts, so use it only in a sandbox.

Troubleshooting

SymptomFix
Crush opens the provider pickerIt did not find the config: check crush dirs and the file name
401OSARAI_API_KEY is not set in the shell that started Crush
The model never calls toolsUse a model with tool calls (qwen3.8-27b)
503 … not ready yetThe instance is still starting; wait for Ready on the instance page