@@ -1,60 +1,101 @@
2−> 🚧 This is a pre-release under heavy, active development. Things are still in flux but we’re excited to share early progress.
7− <img width="450" alt="Charm Crush Art" src="https://github.com/user-attachments/assets/9ab4c30c-9327-46b6-a722-3ad0e20f6976" /><br>
4+ <img width="450" alt="Charm Crush Art" src="https://github.com/user-attachments/assets/4cd517be-476b-4a78-971c-810a0b1af3f6" /><br>
8 <a href="https://github.com/charmbracelet/crush/releases"><img src="https://img.shields.io/github/release/charmbracelet/crush" alt="Latest Release"></a>
5 <a href="https://github.com/charmbracelet/crush/releases"><img src="https://img.shields.io/github/release/charmbracelet/crush" alt="Latest Release"></a>
9 <a href="https://github.com/charmbracelet/crush/actions"><img src="https://github.com/charmbracelet/crush/workflows/build/badge.svg" alt="Build Status"></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>
12−Crush is a tool for building software with AI.
9+Your new coding bestie, available in your favourite terminal. Your tools, your
10+code, and your workflows, wired into your LLM of choice.
12+<img width="800" alt="Crush Demo" src="https://github.com/user-attachments/assets/a67e22a5-167f-4aa0-bcbf-4248740b6fd4" />
16+- **Multi-Model:** choose from a wide range of LLMs or add your own via OpenAI- or Anthropic-compatible APIs
17+- **Flexible:** switch LLMs mid-session while preserving context
18+- **Session-Based:** maintain multiple work sessions and contexts per project
19+- **LSP-Enhanced:** Crush uses LSPs for additional context, just like you do
20+- **Extensible:** add capabilities via MCPs (`http`, `stdio`, and `sse`)
21+- **Works Everywhere:** first-class support in every terminal on macOS, Linux, Windows (PowerShell and WSL), and FreeBSD
14## Installation
23## Installation
16−Crush has first class support for macOS, Linux, and Windows.
25+Use a package manager:
18−Nightly builds are available while Crush is in development.
27+```bash
29+brew install charmbracelet/tap/crush
20−- [Packages](https://github.com/charmbracelet/crush/releases/tag/nightly) are available in Debian, RPM, APK, and PKG formats
31+# NPM
21−- [Binaries](https://github.com/charmbracelet/crush/releases/tag/nightly) are available for Linux, macOS and Windows
32+npm install -g @charmland/crush
23−You can also just install it with go:
34+# Arch Linux (btw)
25−```
37+# Windows (with Winget)
26−git clone git@github.com:charmbracelet/crush.git
38+winget install charmbracelet.crush
41+nix-shell -p nur.repos.charmbracelet.crush
32−<summary>Not a developer? Here’s a quick how-to.</summary>
45+<summary><strong>Debian/Ubuntu</strong></summary>
34−Download the latest [nightly release](https://github.com/charmbracelet/crush/releases) for your system. The [macOS ARM64 one](https://github.com/charmbracelet/crush/releases/download/nightly/crush_0.1.0-nightly_Darwin_arm64.tar.gz) is most likely what you want.
47+```bash
48+sudo mkdir -p /etc/apt/keyrings
49+curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
50+echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
51+sudo apt update && sudo apt install crush
36−Next, open a terminal and run the following commands:
54+</details>
57+<summary><strong>Fedora/RHEL</strong></summary>
39−cd ~/Downloads
60+echo '[charm]
40−tar -xvzf crush_0.1.0-nightly_Darwin_arm64.tar.gz -C crush
61+name=Charm
41−sudo mv ./crush/crush /usr/local/bin/crush
62+baseurl=https://repo.charm.sh/yum/
42−rm -rf ./crush
63+enabled=1
65+gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo
66+sudo yum install crush
45−Then, run Crush by typing `crush`.
69+</details>
47−---
71+Or, download it:
49−</details>
73+- [Packages][releases] are available in Debian and RPM formats
74+- [Binaries][releases] are available for Linux, macOS, Windows, FreeBSD, OpenBSD, and NetBSD
76+[releases]: https://github.com/charmbracelet/crush/releases
78+Or just install it with go:
81+go install github.com/charmbracelet/crush@latest
85+> Productivity may increase when using Crush and you may find yourself nerd
86+> sniped when first using the application. If the symptoms persist, join the
87+> [Discord][discord] and nerd snipe the rest of us.
51## Getting Started
89## Getting Started
53−The quickest way to get started to grab an API key for your preferred
91+The quickest way to get started is to grab an API key for your preferred
54−provider such as Anthropic, OpenAI, or Groq, and just start Crush. You'll be
92+provider such as Anthropic, OpenAI, Groq, or OpenRouter and just start
55−prompted to enter your API key.
93+Crush. You'll be prompted to enter your API key.
57−That said, you can also set environment variables for preferred providers:
95+That said, you can also set environment variables for preferred providers.
98+<summary><strong>Supported Environment Variables</strong></summary>
59| Environment Variable | Provider |
100| Environment Variable | Provider |
60| -------------------------- | -------------------------------------------------- |
101| -------------------------- | -------------------------------------------------- |
@@ -71,17 +112,31 @@ That said, you can also set environment variables for preferred providers:
71| `AZURE_OPENAI_API_KEY` | Azure OpenAI models (optional when using Entra ID) |
112| `AZURE_OPENAI_API_KEY` | Azure OpenAI models (optional when using Entra ID) |
72| `AZURE_OPENAI_API_VERSION` | Azure OpenAI models |
113| `AZURE_OPENAI_API_VERSION` | Azure OpenAI models |
74## Configuration
117## Configuration
76−For many use cases, Crush can be run with no config. That said, if you do need config, it can be added either local to the project itself, or globally. Configuration has the following priority:
119+Crush runs great with no configuration. That said, if you do need or want to
120+customize Crush, configuration can be added either local to the project itself,
121+or globally, with the following priority:
78−1. `.crush.json`
123+1. `./.crush.json`
79−2. `crush.json`
124+2. `./crush.json`
803. `$HOME/.config/crush/crush.json`
1253. `$HOME/.config/crush/crush.json`
127+Configuration itself is stored as a JSON object:
84−Crush can use LSPs for additional context to help inform its decisions, just like you would. LSPs can be added manually like so:
138+Crush can use LSPs for additional context to help inform its decisions, just
139+like you would. LSPs can be added manually like so:
@@ -94,7 +149,7 @@ Crush can use LSPs for additional context to help inform its decisions, just lik
94 "args": ["--stdio"]
149 "args": ["--stdio"]
97− "command": "alejandra"
152+ "command": "nil"
@@ -102,7 +157,10 @@ Crush can use LSPs for additional context to help inform its decisions, just lik
160+Crush also supports Model Context Protocol (MCP) servers through three
161+transport types: `stdio` for command-line servers, `http` for HTTP endpoints,
105−Crush supports Model Context Protocol (MCP) servers through three transport types: `stdio` for command-line servers, `http` for HTTP endpoints, and `sse` for Server-Sent Events. Environment variable expansion is supported using `$(echo $VAR)` syntax.
162+and `sse` for Server-Sent Events. Environment variable expansion is supported
163+using `$(echo $VAR)` syntax.
@@ -133,37 +191,11 @@ Crush supports Model Context Protocol (MCP) servers through three transport type
136−### Logging
194+### Whitelisting Tools
138−Enable debug logging with the `-d` flag or in config. View logs with `crush logs`. Logs are stored in `.crush/logs/crush.log`.
140−# Run with debug logging
143−# View last 1000 lines
146−# Follow logs in real-time
196+By default, Crush will ask you for permission before running tool calls. If
147−crush logs -f
197+you'd like, you can whitelist tools to be executed without prompting you for
148−
198+permissions. Use this with care.
149−# Show last 500 lines
153−Add to your `crush.json` config file:
164−### Configurable Default Permissions
166−Crush includes a permission system to control which tools can be executed without prompting. You can configure allowed tools in your `crush.json` config file:
@@ -172,27 +204,25 @@ Crush includes a permission system to control which tools can be executed withou
175− "edit:write",
207+ "edit",
176 "mcp_context7_get-library-doc"
208 "mcp_context7_get-library-doc"
182−The `allowed_tools` array accepts:
184−- Tool names (e.g., `"view"`) - allows all actions for that tool
185−- Tool:action combinations (e.g., `"edit:write"`) - allows only specific actions
187−You can also skip all permission prompts entirely by running Crush with the `--yolo` flag.
214+You can also skip all permission prompts entirely by running Crush with the
215+`--yolo` flag. Be very, very careful with this feature.
189### Custom Providers
217### Custom Providers
191−Crush supports custom provider configurations for both OpenAI-compatible and Anthropic-compatible APIs.
219+Crush supports custom provider configurations for both OpenAI-compatible and
220+Anthropic-compatible APIs.
193#### OpenAI-Compatible APIs
222#### OpenAI-Compatible APIs
195−Here's an example configuration for Deepseek, which uses an OpenAI-compatible API. Don't forget to set `DEEPSEEK_API_KEY` in your environment.
224+Here’s an example configuration for Deepseek, which uses an OpenAI-compatible
225+API. Don't forget to set `DEEPSEEK_API_KEY` in your environment.
@@ -220,7 +250,7 @@ Here's an example configuration for Deepseek, which uses an OpenAI-compatible AP
221#### Anthropic-Compatible APIs
251#### Anthropic-Compatible APIs
223−You can also configure custom Anthropic-compatible providers:
253+Custom Anthropic-compatible providers follow this format:
@@ -234,14 +264,15 @@ You can also configure custom Anthropic-compatible providers:
235 "models": [
265 "models": [
237− "id": "claude-3-sonnet",
267+ "id": "claude-sonnet-4-20250514",
238− "model": "Claude 3 Sonnet",
268+ "name": "Claude Sonnet 4",
239− "cost_per_1m_in": 3000,
269+ "cost_per_1m_in": 3,
240− "cost_per_1m_out": 15000,
270+ "cost_per_1m_out": 15,
241− "cost_per_1m_in_cached": 300,
271+ "cost_per_1m_in_cached": 3.75,
242− "cost_per_1m_out_cached": 15000,
272+ "cost_per_1m_out_cached": 0.3,
243 "context_window": 200000,
273 "context_window": 200000,
244− "default_max_tokens": 4096,
274+ "default_max_tokens": 50000,
245 "supports_attachments": true
276 "supports_attachments": true
@@ -250,23 +281,56 @@ You can also configure custom Anthropic-compatible providers:
286+Sometimes you need to look at logs. Luckily, Crush logs all sorts of
287+stuff. Logs are stored in `./.crush/logs/crush.log` relative to the project.
289+The CLI also contains some helper commands to make perusing recent logs easier:
292+# Print the last 1000 lines
295+# Print the last 500 lines
296+crush logs --tail 500
298+# Follow logs in real time
302+Want more logging? Run `crush` with the `--debug` flag, or enable it in the
253## Whatcha think?
314## Whatcha think?
255We’d love to hear your thoughts on this project. Feel free to drop us a note!
316We’d love to hear your thoughts on this project. Feel free to drop us a note!
257- [Twitter](https://twitter.com/charmcli)
318- [Twitter](https://twitter.com/charmcli)
320+- [Slack](https://charm.land/slack)
258- [The Fediverse](https://mastodon.social/@charmcli)
321- [The Fediverse](https://mastodon.social/@charmcli)
259−- [Discord](https://charm.sh/chat)
322+
323+[discord]: https://charm.land/discord
261## License
325## License
263−[MIT](https://github.com/charmbracelet/crush/raw/main/LICENSE)
327+[FSL-1.1-MIT](https://github.com/charmbracelet/crush/raw/main/LICENSE)
267Part of [Charm](https://charm.land).
331Part of [Charm](https://charm.land).
269−<a href="https://charm.sh/"><img alt="The Charm logo" width="400" src="https://stuff.charm.sh/charm-banner-next.jpg" /></a>
333+<a href="https://charm.land/"><img alt="The Charm logo" width="400" src="https://stuff.charm.sh/charm-banner-next.jpg" /></a>
271<!--prettier-ignore-->
335<!--prettier-ignore-->
272Charm热爱开源 • Charm loves open source
336Charm热爱开源 • Charm loves open source