4 <a href="https://stuff.charm.sh/crush/charm-crush.png"><img width="450" alt="Charm Crush Logo" src="https://github.com/user-attachments/assets/adc1a6f4-b284-4603-836c-59038caa2e8b" /></a><br />
5 <a href="https://github.com/charmbracelet/crush/releases"><img src="https://img.shields.io/github/release/charmbracelet/crush" alt="Latest Release"></a>
6 <a href="https://github.com/charmbracelet/crush/actions"><img src="https://github.com/charmbracelet/crush/workflows/build/badge.svg" alt="Build Status"></a>
9<p align="center">Your new coding bestie, now available in your favourite terminal.<br />Your tools, your code, and your workflows, wired into your LLM of choice.</p>
11<p align="center"><img width="800" alt="Crush Demo" src="https://github.com/user-attachments/assets/58280caf-851b-470a-b6f7-d5c4ea8a1968" /></p>
15- **Multi-Model:** choose from a wide range of LLMs or add your own via OpenAI- or Anthropic-compatible APIs
16- **Flexible:** switch LLMs mid-session while preserving context
17- **Session-Based:** maintain multiple work sessions and contexts per project
18- **LSP-Enhanced:** Crush uses LSPs for additional context, just like you do
19- **Extensible:** add capabilities via MCPs (`http`, `stdio`, and `sse`)
20- **Works Everywhere:** first-class support in every terminal on macOS, Linux, Windows (PowerShell and WSL), FreeBSD, OpenBSD, and NetBSD
28brew install charmbracelet/tap/crush
31npm install -g @charmland/crush
37nix run github:numtide/nix-ai-tools#crush
40scoop bucket add charm https://github.com/charmbracelet/scoop-bucket.git
45<summary><strong>Nix (NUR)</strong></summary>
47Crush is available via [NUR](https://github.com/nix-community/NUR) in `nur.repos.charmbracelet.crush`.
49You can also try out Crush via `nix-shell`:
53nix-channel --add https://github.com/nix-community/NUR/archive/main.tar.gz nur
56# Get Crush in a Nix shell.
57nix-shell -p '(import <nur> { pkgs = import <nixpkgs> {}; }).repos.charmbracelet.crush'
63<summary><strong>Debian/Ubuntu</strong></summary>
66sudo mkdir -p /etc/apt/keyrings
67curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
68echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
69sudo apt update && sudo apt install crush
75<summary><strong>Fedora/RHEL</strong></summary>
80baseurl=https://repo.charm.sh/yum/
83gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo
91- [Packages][releases] are available in Debian and RPM formats
92- [Binaries][releases] are available for Linux, macOS, Windows, FreeBSD, OpenBSD, and NetBSD
94[releases]: https://github.com/charmbracelet/crush/releases
96Or just install it with Go:
99go install github.com/charmbracelet/crush@latest
103> Productivity may increase when using Crush and you may find yourself nerd
104> sniped when first using the application. If the symptoms persist, join the
105> [Discord][discord] and nerd snipe the rest of us.
109The quickest way to get started is to grab an API key for your preferred
110provider such as Anthropic, OpenAI, Groq, or OpenRouter and just start
111Crush. You'll be prompted to enter your API key.
113That said, you can also set environment variables for preferred providers.
115| Environment Variable | Provider |
116| -------------------------- | -------------------------------------------------- |
117| `ANTHROPIC_API_KEY` | Anthropic |
118| `OPENAI_API_KEY` | OpenAI |
119| `OPENROUTER_API_KEY` | OpenRouter |
120| `GEMINI_API_KEY` | Google Gemini |
121| `VERTEXAI_PROJECT` | Google Cloud VertexAI (Gemini) |
122| `VERTEXAI_LOCATION` | Google Cloud VertexAI (Gemini) |
123| `GROQ_API_KEY` | Groq |
124| `AWS_ACCESS_KEY_ID` | AWS Bedrock (Claude) |
125| `AWS_SECRET_ACCESS_KEY` | AWS Bedrock (Claude) |
126| `AWS_REGION` | AWS Bedrock (Claude) |
127| `AZURE_OPENAI_ENDPOINT` | Azure OpenAI models |
128| `AZURE_OPENAI_API_KEY` | Azure OpenAI models (optional when using Entra ID) |
129| `AZURE_OPENAI_API_VERSION` | Azure OpenAI models |
133Is there a provider you’d like to see in Crush? Is there an existing model that needs an update?
135Crush’s default model listing is managed in [Catwalk](https://github.com/charmbracelet/catwalk), an community-supported, open source repository of Crush-compatible models, and you’re welcome to contribute.
137<a href="https://github.com/charmbracelet/catwalk"><img width="174" height="174" alt="Catwalk Badge" src="https://github.com/user-attachments/assets/95b49515-fe82-4409-b10d-5beb0873787d" /></a>
141Crush runs great with no configuration. That said, if you do need or want to
142customize Crush, configuration can be added either local to the project itself,
143or globally, with the following priority:
1473. `$HOME/.config/crush/crush.json` (Windows: `%USERPROFILE%\AppData\Local\crush\crush.json`)
149Configuration itself is stored as a JSON object:
153 "this-setting": {"this": "that"},
154 "that-setting": ["ceci", "cela"]
158As an additional note, Crush also stores ephemeral data, such as application state, in one additional location:
162$HOME/.local/share/crush/crush.json
165%LOCALAPPDATA%\crush\crush.json
170Crush can use LSPs for additional context to help inform its decisions, just
171like you would. LSPs can be added manually like so:
175 "$schema": "https://charm.land/crush.json",
181 "command": "typescript-language-server",
193Crush also supports Model Context Protocol (MCP) servers through three
194transport types: `stdio` for command-line servers, `http` for HTTP endpoints,
195and `sse` for Server-Sent Events. Environment variable expansion is supported
196using `$(echo $VAR)` syntax.
200 "$schema": "https://charm.land/crush.json",
205 "args": ["/path/to/mcp-server.js"],
207 "NODE_ENV": "production"
212 "url": "https://example.com/mcp/",
214 "Authorization": "$(echo Bearer $EXAMPLE_MCP_TOKEN)"
217 "streaming-service": {
219 "url": "https://example.com/mcp/sse",
221 "API-Key": "$(echo $API_KEY)"
230Crush respects `.gitignore` files by default, but you can also create a
231`.crushignore` file to specify additional files and directories that Crush
232should ignore. This is useful for excluding files that you want in version
233control but don't want Crush to consider when providing context.
235The `.crushignore` file uses the same syntax as `.gitignore` and can be placed
236in the root of your project or in subdirectories.
240By default, Crush will ask you for permission before running tool calls. If
241you'd like, you can allow tools to be executed without prompting you for
242permissions. Use this with care.
246 "$schema": "https://charm.land/crush.json",
253 "mcp_context7_get-library-doc"
259You can also skip all permission prompts entirely by running Crush with the
260`--yolo` flag. Be very, very careful with this feature.
264Local models can also be configured via OpenAI-compatible API. Here are two common examples:
273 "base_url": "http://localhost:11434/v1/",
277 "name": "Qwen 3 30B",
279 "context_window": 256000,
280 "default_max_tokens": 20000
295 "base_url": "http://localhost:1234/v1/",
299 "name": "Qwen 3 30B",
300 "id": "qwen/qwen3-30b-a3b-2507",
301 "context_window": 256000,
302 "default_max_tokens": 20000
312Crush supports custom provider configurations for both OpenAI-compatible and
313Anthropic-compatible APIs.
315#### OpenAI-Compatible APIs
317Here’s an example configuration for Deepseek, which uses an OpenAI-compatible
318API. Don't forget to set `DEEPSEEK_API_KEY` in your environment.
322 "$schema": "https://charm.land/crush.json",
326 "base_url": "https://api.deepseek.com/v1",
327 "api_key": "$DEEPSEEK_API_KEY",
330 "id": "deepseek-chat",
331 "name": "Deepseek V3",
332 "cost_per_1m_in": 0.27,
333 "cost_per_1m_out": 1.1,
334 "cost_per_1m_in_cached": 0.07,
335 "cost_per_1m_out_cached": 1.1,
336 "context_window": 64000,
337 "default_max_tokens": 5000
345#### Anthropic-Compatible APIs
347Custom Anthropic-compatible providers follow this format:
351 "$schema": "https://charm.land/crush.json",
353 "custom-anthropic": {
355 "base_url": "https://api.anthropic.com/v1",
356 "api_key": "$ANTHROPIC_API_KEY",
358 "anthropic-version": "2023-06-01"
362 "id": "claude-sonnet-4-20250514",
363 "name": "Claude Sonnet 4",
365 "cost_per_1m_out": 15,
366 "cost_per_1m_in_cached": 3.75,
367 "cost_per_1m_out_cached": 0.3,
368 "context_window": 200000,
369 "default_max_tokens": 50000,
371 "supports_attachments": true
381Crush currently supports running Anthropic models through Bedrock, with caching disabled.
383* A Bedrock provider will appear once you have AWS configured, i.e. `aws configure`
384* Crush also expects the `AWS_REGION` or `AWS_DEFAULT_REGION` to be set
385* To use a specific AWS profile set `AWS_PROFILE` in your environment, i.e. `AWS_PROFILE=myprofile crush`
387### Vertex AI Platform
389Vertex AI will appear in the list of available providers when `VERTEXAI_PROJECT` and `VERTEXAI_LOCATION` are set. You will also need to be authenticated:
392gcloud auth application-default login
395To add specific models to the configuration, configure as such:
399 "$schema": "https://charm.land/crush.json",
404 "id": "claude-sonnet-4@20250514",
405 "name": "VertexAI Sonnet 4",
407 "cost_per_1m_out": 15,
408 "cost_per_1m_in_cached": 3.75,
409 "cost_per_1m_out_cached": 0.3,
410 "context_window": 200000,
411 "default_max_tokens": 50000,
413 "supports_attachments": true
421## A Note on Claude Max and GitHub Copilot
423Crush only supports model providers through official, compliant APIs. We do not
424support or endorse any methods that rely on personal Claude Max and GitHub Copilot
425accounts or OAuth workarounds, which may violate Anthropic and Microsoft’s
428We’re committed to building sustainable, trusted integrations with model
429providers. If you’re a provider interested in working with us,
430[reach out](mailto:vt100@charm.sh).
434Sometimes you need to look at logs. Luckily, Crush logs all sorts of
435stuff. Logs are stored in `./.crush/logs/crush.log` relative to the project.
437The CLI also contains some helper commands to make perusing recent logs easier:
440# Print the last 1000 lines
443# Print the last 500 lines
446# Follow logs in real time
450Want more logging? Run `crush` with the `--debug` flag, or enable it in the
455 "$schema": "https://charm.land/crush.json",
465We’d love to hear your thoughts on this project. Need help? We gotchu. You can find us on:
467- [Twitter](https://twitter.com/charmcli)
469- [Slack](https://charm.land/slack)
470- [The Fediverse](https://mastodon.social/@charmcli)
472[discord]: https://charm.land/discord
476[FSL-1.1-MIT](https://github.com/charmbracelet/crush/raw/main/LICENSE)
480Part of [Charm](https://charm.land).
482<a href="https://charm.land/"><img alt="The Charm logo" width="400" src="https://stuff.charm.sh/charm-banner-next.jpg" /></a>
484<!--prettier-ignore-->
485Charm热爱开源 • Charm loves open source
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list