1# Crush
2
3<p align="center">
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/cf8ca3ce-8b02-43f0-9d0f-5a331488da4b" /></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/actions/workflows/build.yml/badge.svg" alt="Build Status"></a>
7</p>
8
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>
10<p align="center">终端里的编程新搭档,<br />无缝接入你的工具、代码与工作流,全面兼容主流 LLM 模型。</p>
11
12<p align="center"><img width="800" alt="Crush Demo" src="https://github.com/user-attachments/assets/58280caf-851b-470a-b6f7-d5c4ea8a1968" /></p>
13
14## Features
15
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), Android, FreeBSD, OpenBSD, and NetBSD
22- **Industrial Grade:** built on the Charm ecosystem, powering 25k+ applications, from leading open source projects to business-critical infrastructure
23
24## Installation
25
26Use a package manager:
27
28```bash
29# Homebrew
30brew install charmbracelet/tap/crush
31
32# NPM
33npm install -g @charmland/crush
34
35# Arch Linux (btw)
36yay -S crush-bin
37
38# Nix
39nix run github:numtide/nix-ai-tools#crush
40
41# FreeBSD
42pkg install crush
43```
44
45Windows users:
46
47```bash
48# Winget
49winget install charmbracelet.crush
50
51# Scoop
52scoop bucket add charm https://github.com/charmbracelet/scoop-bucket.git
53scoop install crush
54```
55
56<details>
57<summary><strong>Nix (NUR)</strong></summary>
58
59Crush is available via the official Charm [NUR](https://github.com/nix-community/NUR) in `nur.repos.charmbracelet.crush`, which is the most up-to-date way to get Crush in Nix.
60
61You can also try out Crush via the NUR with `nix-shell`:
62
63```bash
64# Add the NUR channel.
65nix-channel --add https://github.com/nix-community/NUR/archive/main.tar.gz nur
66nix-channel --update
67
68# Get Crush in a Nix shell.
69nix-shell -p '(import <nur> { pkgs = import <nixpkgs> {}; }).repos.charmbracelet.crush'
70```
71
72### NixOS & Home Manager Module Usage via NUR
73
74Crush provides NixOS and Home Manager modules via NUR.
75You can use these modules directly in your flake by importing them from NUR. Since it auto detects whether its a home manager or nixos context you can use the import the exact same way :)
76
77```nix
78{
79 inputs = {
80 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
81 nur.url = "github:nix-community/NUR";
82 };
83
84 outputs = { self, nixpkgs, nur, ... }: {
85 nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
86 system = "x86_64-linux";
87 modules = [
88 nur.modules.nixos.default
89 nur.repos.charmbracelet.modules.crush
90 {
91 programs.crush = {
92 enable = true;
93 settings = {
94 providers = {
95 openai = {
96 id = "openai";
97 name = "OpenAI";
98 base_url = "https://api.openai.com/v1";
99 type = "openai";
100 api_key = "sk-fake123456789abcdef...";
101 models = [
102 {
103 id = "gpt-4";
104 name = "GPT-4";
105 }
106 ];
107 };
108 };
109 lsp = {
110 go = { command = "gopls"; enabled = true; };
111 nix = { command = "nil"; enabled = true; };
112 };
113 options = {
114 context_paths = [ "/etc/nixos/configuration.nix" ];
115 tui = { compact_mode = true; };
116 debug = false;
117 };
118 };
119 };
120 }
121 ];
122 };
123 };
124}
125```
126
127</details>
128
129<details>
130<summary><strong>Debian/Ubuntu</strong></summary>
131
132```bash
133sudo mkdir -p /etc/apt/keyrings
134curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
135echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
136sudo apt update && sudo apt install crush
137```
138
139</details>
140
141<details>
142<summary><strong>Fedora/RHEL</strong></summary>
143
144```bash
145echo '[charm]
146name=Charm
147baseurl=https://repo.charm.sh/yum/
148enabled=1
149gpgcheck=1
150gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo
151sudo yum install crush
152```
153
154</details>
155
156Or, download it:
157
158- [Packages][releases] are available in Debian and RPM formats
159- [Binaries][releases] are available for Linux, macOS, Windows, FreeBSD, OpenBSD, and NetBSD
160
161[releases]: https://github.com/charmbracelet/crush/releases
162
163Or just install it with Go:
164
165```
166go install github.com/charmbracelet/crush@latest
167```
168
169> [!WARNING]
170> Productivity may increase when using Crush and you may find yourself nerd
171> sniped when first using the application. If the symptoms persist, join the
172> [Slack][slack] or [Discord][discord] and nerd snipe the rest of us.
173
174## Getting Started
175
176The quickest way to get started is to grab an API key for your preferred
177provider such as Anthropic, OpenAI, Groq, OpenRouter, or Vercel AI Gateway and just start
178Crush. You'll be prompted to enter your API key.
179
180That said, you can also set environment variables for preferred providers.
181
182| Environment Variable | Provider |
183| --------------------------- | -------------------------------------------------- |
184| `ANTHROPIC_API_KEY` | Anthropic |
185| `OPENAI_API_KEY` | OpenAI |
186| `VERCEL_API_KEY` | Vercel AI Gateway |
187| `GEMINI_API_KEY` | Google Gemini |
188| `SYNTHETIC_API_KEY` | Synthetic |
189| `ZAI_API_KEY` | Z.ai |
190| `MINIMAX_API_KEY` | MiniMax |
191| `HF_TOKEN` | Hugging Face Inference |
192| `CEREBRAS_API_KEY` | Cerebras |
193| `OPENROUTER_API_KEY` | OpenRouter |
194| `IONET_API_KEY` | io.net |
195| `GROQ_API_KEY` | Groq |
196| `AVIAN_API_KEY` | Avian |
197| `OPENCODE_API_KEY` | OpenCode Zen & Go |
198| `VERTEXAI_PROJECT` | Google Cloud VertexAI (Gemini) |
199| `VERTEXAI_LOCATION` | Google Cloud VertexAI (Gemini) |
200| `AWS_ACCESS_KEY_ID` | Amazon Bedrock (Claude) |
201| `AWS_SECRET_ACCESS_KEY` | Amazon Bedrock (Claude) |
202| `AWS_REGION` | Amazon Bedrock (Claude) |
203| `AWS_PROFILE` | Amazon Bedrock (Custom Profile) |
204| `AWS_BEARER_TOKEN_BEDROCK` | Amazon Bedrock |
205| `AZURE_OPENAI_API_ENDPOINT` | Azure OpenAI models |
206| `AZURE_OPENAI_API_KEY` | Azure OpenAI models (optional when using Entra ID) |
207| `AZURE_OPENAI_API_VERSION` | Azure OpenAI models |
208
209### Subscriptions
210
211If you prefer subscription-based usage, here are some plans that work well in
212Crush:
213
214- [Synthetic](https://synthetic.new/pricing)
215- [GLM Coding Plan](https://z.ai/subscribe)
216- [Kimi Code](https://www.kimi.com/membership/pricing)
217- [MiniMax Coding Plan](https://platform.minimax.io/subscribe/coding-plan)
218
219### By the Way
220
221Is there a provider you’d like to see in Crush? Is there an existing model that needs an update?
222
223Crush’s default model listing is managed in [Catwalk](https://github.com/charmbracelet/catwalk), a community-supported, open source repository of Crush-compatible models, and you’re welcome to contribute.
224
225<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>
226
227## Configuration
228
229> [!TIP]
230> Crush ships with a builtin `crush-config` skill for configuring itself. In
231> many cases you can simply ask Crush to configure itself.
232
233Crush runs great with no configuration. That said, if you do need or want to
234customize Crush, configuration can be added either local to the project itself,
235or globally, with the following priority:
236
2371. `.crush.json`
2382. `crush.json`
2393. `$HOME/.config/crush/crush.json`
240
241Configuration itself is stored as a JSON object:
242
243```json
244{
245 "this-setting": { "this": "that" },
246 "that-setting": ["ceci", "cela"]
247}
248```
249
250As an additional note, Crush also stores ephemeral data, such as application
251state, in one additional location:
252
253```bash
254# Unix
255$HOME/.local/share/crush/crush.json
256
257# Windows
258%LOCALAPPDATA%\crush\crush.json
259```
260
261> [!TIP]
262> You can override the user and data config locations by setting:
263>
264> - `CRUSH_GLOBAL_CONFIG`
265> - `CRUSH_GLOBAL_DATA`
266
267### LSPs
268
269Crush can use LSPs for additional context to help inform its decisions, just
270like you would. LSPs can be added manually like so:
271
272```json
273{
274 "$schema": "https://charm.land/crush.json",
275 "lsp": {
276 "go": {
277 "command": "gopls",
278 "env": {
279 "GOTOOLCHAIN": "go1.24.5"
280 }
281 },
282 "typescript": {
283 "command": "typescript-language-server",
284 "args": ["--stdio"]
285 },
286 "nix": {
287 "command": "nil"
288 }
289 }
290}
291```
292
293### MCPs
294
295Crush also supports Model Context Protocol (MCP) servers through three transport
296types: `stdio` for command-line servers, `http` for HTTP endpoints, and `sse`
297for Server-Sent Events.
298
299Shell-style value expansion (`$VAR`, `${VAR:-default}`, `$(command)`, quoting,
300nesting) works in `command`, `args`, `env`, `headers`, and `url`, so
301file-based secrets work out of the box. You can use values like `"$TOKEN"`
302or `"$(cat /path/to/secret/token)"`. Expansion runs through Crush's embedded
303shell, so the same syntax works on every supported system, Windows included.
304
305Unset variables expand to the empty string by default, matching bash. For
306required credentials, use `${VAR:?message}` so an unset variable fails loudly
307at load time with `message` instead of silently resolving to empty:
308
309```json
310{ "api_key": "${CODEBERG_TOKEN:?set CODEBERG_TOKEN}" }
311```
312
313Headers (both MCP `headers` and provider `extra_headers`) whose value
314resolves to the empty string are dropped from the outgoing request rather
315than sent as `Header:`. That keeps optional env-gated headers like
316`"OpenAI-Organization": "$OPENAI_ORG_ID"` clean when the variable is unset.
317
318Provider `extra_body` is a non-expanding JSON passthrough; put env-driven
319values in `extra_headers` or the provider's `api_key` / `base_url`, all of
320which do expand.
321
322> **Security note:** `crush.json` is trusted code. Any `$(...)` in it runs at
323> load time with your shell's privileges, before the UI appears. Don't launch
324> Crush in a directory whose `crush.json` you haven't reviewed.
325
326```json
327{
328 "$schema": "https://charm.land/crush.json",
329 "mcp": {
330 "filesystem": {
331 "type": "stdio",
332 "command": "node",
333 "args": ["/path/to/mcp-server.js"],
334 "timeout": 120,
335 "disabled": false,
336 "disabled_tools": ["some-tool-name"],
337 "env": {
338 "NODE_ENV": "production"
339 }
340 },
341 "github": {
342 "type": "http",
343 "url": "https://api.githubcopilot.com/mcp/",
344 "timeout": 120,
345 "disabled": false,
346 "disabled_tools": ["create_issue", "create_pull_request"],
347 "headers": {
348 "Authorization": "Bearer $GH_PAT"
349 }
350 },
351 "streaming-service": {
352 "type": "sse",
353 "url": "https://example.com/mcp/sse",
354 "timeout": 120,
355 "disabled": false,
356 "headers": {
357 "API-Key": "$(echo $API_KEY)"
358 }
359 }
360 }
361}
362```
363
364### Hooks
365
366Crush has preliminary support for hooks. For details, see
367[the hook guide](./docs/hooks/).
368
369### Ignoring Files
370
371Crush respects `.gitignore` files by default, but you can also create a
372`.crushignore` file to specify additional files and directories that Crush
373should ignore. This is useful for excluding files that you want in version
374control but don't want Crush to consider when providing context.
375
376The `.crushignore` file uses the same syntax as `.gitignore` and can be placed
377in the root of your project or in subdirectories.
378
379### Allowing Tools
380
381By default, Crush will ask you for permission before running tool calls. If
382you'd like, you can allow tools to be executed without prompting you for
383permissions. Use this with care.
384
385```json
386{
387 "$schema": "https://charm.land/crush.json",
388 "permissions": {
389 "allowed_tools": [
390 "view",
391 "ls",
392 "grep",
393 "edit",
394 "mcp_context7_get-library-doc"
395 ]
396 }
397}
398```
399
400You can also skip all permission prompts entirely by running Crush with the
401`--yolo` flag. Be very, very careful with this feature.
402
403### Disabling Built-In Tools
404
405If you'd like to prevent Crush from using certain built-in tools entirely, you
406can disable them via the `options.disabled_tools` list. Disabled tools are
407completely hidden from the agent.
408
409```json
410{
411 "$schema": "https://charm.land/crush.json",
412 "options": {
413 "disabled_tools": ["bash", "sourcegraph"]
414 }
415}
416```
417
418To disable tools from MCP servers, see the [MCP config section](#mcps).
419
420### Disabling Skills
421
422If you'd like to prevent Crush from using certain skills entirely, you can
423disable them via the `options.disabled_skills` list. Disabled skills are hidden
424from the agent, including builtin skills and skills discovered from disk.
425
426```json
427{
428 "$schema": "https://charm.land/crush.json",
429 "options": {
430 "disabled_skills": ["crush-config"]
431 }
432}
433```
434
435### Agent Skills
436
437Crush supports the [Agent Skills](https://agentskills.io) open standard for
438extending agent capabilities with reusable skill packages. Skills are folders
439containing a `SKILL.md` file with instructions that Crush can discover and
440activate on demand.
441
442The global paths we looks for skills are:
443
444* `$CRUSH_SKILLS_DIR`
445* `$XDG_CONFIG_HOME/agents/skills` or `~/.config/agents/skills/`
446* `$XDG_CONFIG_HOME/crush/skills` or `~/.config/crush/skills/`
447* On Windows, we _also_ look at
448 * `%LOCALAPPDATA%\agents\skills\` or `%USERPROFILE%\AppData\Local\agents\skills\`
449 * `%LOCALAPPDATA%\crush\skills\` or `%USERPROFILE%\AppData\Local\crush\skills\`
450* Additional paths configured via `options.skills_paths`
451
452On top of that, we _also_ load skills in your project from the following
453relative paths:
454
455* `.agents/skills`
456* `.crush/skills`
457* `.claude/skills`
458* `.cursor/skills`
459
460```jsonc
461{
462 "$schema": "https://charm.land/crush.json",
463 "options": {
464 "skills_paths": [
465 "~/.config/crush/skills", // Windows: "%LOCALAPPDATA%\\crush\\skills",
466 "./project-skills",
467 ],
468 },
469}
470```
471
472You can get started with example skills from [anthropics/skills](https://github.com/anthropics/skills):
473
474```bash
475# Unix
476mkdir -p ~/.config/crush/skills
477cd ~/.config/crush/skills
478git clone https://github.com/anthropics/skills.git _temp
479mv _temp/skills/* . && rm -rf _temp
480```
481
482```powershell
483# Windows (PowerShell)
484mkdir -Force "$env:LOCALAPPDATA\crush\skills"
485cd "$env:LOCALAPPDATA\crush\skills"
486git clone https://github.com/anthropics/skills.git _temp
487mv _temp/skills/* . ; rm -r -force _temp
488```
489
490### Desktop notifications
491
492Crush sends desktop notifications when a tool call requires permission and when
493the agent finishes its turn. They're only sent when the terminal window isn't
494focused _and_ your terminal supports reporting the focus state.
495
496```jsonc
497{
498 "$schema": "https://charm.land/crush.json",
499 "options": {
500 "disable_notifications": false, // default
501 },
502}
503```
504
505To disable desktop notifications, set `disable_notifications` to `true` in your
506configuration. On macOS, notifications currently lack icons due to platform
507limitations.
508
509### Initialization
510
511When you initialize a project, Crush analyzes your codebase and creates
512a context file that helps it work more effectively in future sessions.
513By default, this file is named `AGENTS.md`, but you can customize the
514name and location with the `initialize_as` option:
515
516```json
517{
518 "$schema": "https://charm.land/crush.json",
519 "options": {
520 "initialize_as": "AGENTS.md"
521 }
522}
523```
524
525This is useful if you prefer a different naming convention or want to
526place the file in a specific directory (e.g., `CRUSH.md` or
527`docs/LLMs.md`). Crush will fill the file with project-specific context
528like build commands, code patterns, and conventions it discovered during
529initialization.
530
531### Attribution Settings
532
533By default, Crush adds attribution information to Git commits and pull requests
534it creates. You can customize this behavior with the `attribution` option:
535
536```json
537{
538 "$schema": "https://charm.land/crush.json",
539 "options": {
540 "attribution": {
541 "trailer_style": "co-authored-by",
542 "generated_with": true
543 }
544 }
545}
546```
547
548- `trailer_style`: Controls the attribution trailer added to commit messages
549 (default: `assisted-by`)
550 - `assisted-by`: Adds `Assisted-by: [Model Name] via Crush <crush@charm.land>`
551 (includes the model name)
552 - `co-authored-by`: Adds `Co-Authored-By: Crush <crush@charm.land>`
553 - `none`: No attribution trailer
554- `generated_with`: When true (default), adds `💘 Generated with Crush` line to
555 commit messages and PR descriptions
556
557### Custom Providers
558
559Crush supports custom provider configurations for both OpenAI-compatible and
560Anthropic-compatible APIs.
561
562> [!NOTE]
563> Note that we support two "types" for OpenAI. Make sure to choose the right one
564> to ensure the best experience!
565>
566> - `openai` should be used when proxying or routing requests through OpenAI.
567> - `openai-compat` should be used when using non-OpenAI providers that have OpenAI-compatible APIs.
568
569#### OpenAI-Compatible APIs
570
571Here’s an example configuration for Deepseek, which uses an OpenAI-compatible
572API. Don't forget to set `DEEPSEEK_API_KEY` in your environment.
573
574```json
575{
576 "$schema": "https://charm.land/crush.json",
577 "providers": {
578 "deepseek": {
579 "type": "openai-compat",
580 "base_url": "https://api.deepseek.com/v1",
581 "api_key": "$DEEPSEEK_API_KEY",
582 "models": [
583 {
584 "id": "deepseek-chat",
585 "name": "Deepseek V3",
586 "cost_per_1m_in": 0.27,
587 "cost_per_1m_out": 1.1,
588 "cost_per_1m_in_cached": 0.07,
589 "cost_per_1m_out_cached": 1.1,
590 "context_window": 64000,
591 "default_max_tokens": 5000
592 }
593 ]
594 }
595 }
596}
597```
598
599#### Anthropic-Compatible APIs
600
601Custom Anthropic-compatible providers follow this format:
602
603```json
604{
605 "$schema": "https://charm.land/crush.json",
606 "providers": {
607 "custom-anthropic": {
608 "type": "anthropic",
609 "base_url": "https://api.anthropic.com/v1",
610 "api_key": "$ANTHROPIC_API_KEY",
611 "extra_headers": {
612 "anthropic-version": "2023-06-01"
613 },
614 "models": [
615 {
616 "id": "claude-sonnet-4-20250514",
617 "name": "Claude Sonnet 4",
618 "cost_per_1m_in": 3,
619 "cost_per_1m_out": 15,
620 "cost_per_1m_in_cached": 3.75,
621 "cost_per_1m_out_cached": 0.3,
622 "context_window": 200000,
623 "default_max_tokens": 50000,
624 "can_reason": true,
625 "supports_attachments": true
626 }
627 ]
628 }
629 }
630}
631```
632
633### Amazon Bedrock
634
635Crush currently supports running Anthropic models through Bedrock, with caching disabled.
636
637- A Bedrock provider will appear once you have AWS configured, i.e. `aws configure`
638- Crush also expects the `AWS_REGION` or `AWS_DEFAULT_REGION` to be set
639- To use a specific AWS profile set `AWS_PROFILE` in your environment, i.e. `AWS_PROFILE=myprofile crush`
640- Alternatively to `aws configure`, you can also just set `AWS_BEARER_TOKEN_BEDROCK`
641
642### Vertex AI Platform
643
644Vertex AI will appear in the list of available providers when `VERTEXAI_PROJECT` and `VERTEXAI_LOCATION` are set. You will also need to be authenticated:
645
646```bash
647gcloud auth application-default login
648```
649
650To add specific models to the configuration, configure as such:
651
652```json
653{
654 "$schema": "https://charm.land/crush.json",
655 "providers": {
656 "vertexai": {
657 "models": [
658 {
659 "id": "claude-sonnet-4@20250514",
660 "name": "VertexAI Sonnet 4",
661 "cost_per_1m_in": 3,
662 "cost_per_1m_out": 15,
663 "cost_per_1m_in_cached": 3.75,
664 "cost_per_1m_out_cached": 0.3,
665 "context_window": 200000,
666 "default_max_tokens": 50000,
667 "can_reason": true,
668 "supports_attachments": true
669 }
670 ]
671 }
672 }
673}
674```
675
676### Local Models
677
678Local models can also be configured via OpenAI-compatible API. Here are two common examples:
679
680#### Ollama
681
682```json
683{
684 "providers": {
685 "ollama": {
686 "name": "Ollama",
687 "base_url": "http://localhost:11434/v1/",
688 "type": "openai-compat",
689 "models": [
690 {
691 "name": "Qwen 3 30B",
692 "id": "qwen3:30b",
693 "context_window": 256000,
694 "default_max_tokens": 20000
695 }
696 ]
697 }
698 }
699}
700```
701
702#### LM Studio
703
704```json
705{
706 "providers": {
707 "lmstudio": {
708 "name": "LM Studio",
709 "base_url": "http://localhost:1234/v1/",
710 "type": "openai-compat",
711 "models": [
712 {
713 "name": "Qwen 3 30B",
714 "id": "qwen/qwen3-30b-a3b-2507",
715 "context_window": 256000,
716 "default_max_tokens": 20000
717 }
718 ]
719 }
720 }
721}
722```
723
724## Logging
725
726Sometimes you need to look at logs. Luckily, Crush logs all sorts of
727stuff. Logs are stored in `./.crush/logs/crush.log` relative to the project.
728
729The CLI also contains some helper commands to make perusing recent logs easier:
730
731```bash
732# Print the last 1000 lines
733crush logs
734
735# Print the last 500 lines
736crush logs --tail 500
737
738# Follow logs in real time
739crush logs --follow
740```
741
742Want more logging? Run `crush` with the `--debug` flag, or enable it in the
743config:
744
745```json
746{
747 "$schema": "https://charm.land/crush.json",
748 "options": {
749 "debug": true,
750 "debug_lsp": true
751 }
752}
753```
754
755## Provider Auto-Updates
756
757By default, Crush automatically checks for the latest and greatest list of
758providers and models from [Catwalk](https://github.com/charmbracelet/catwalk),
759the open source Crush provider database. This means that when new providers and
760models are available, or when model metadata changes, Crush automatically
761updates your local configuration.
762
763### Disabling automatic provider updates
764
765For those with restricted internet access, or those who prefer to work in
766air-gapped environments, this might not be want you want, and this feature can
767be disabled.
768
769To disable automatic provider updates, set `disable_provider_auto_update` into
770your `crush.json` config:
771
772```json
773{
774 "$schema": "https://charm.land/crush.json",
775 "options": {
776 "disable_provider_auto_update": true
777 }
778}
779```
780
781Or set the `CRUSH_DISABLE_PROVIDER_AUTO_UPDATE` environment variable:
782
783```bash
784export CRUSH_DISABLE_PROVIDER_AUTO_UPDATE=1
785```
786
787### Manually updating providers
788
789Manually updating providers is possible with the `crush update-providers`
790command:
791
792```bash
793# Update providers remotely from Catwalk.
794crush update-providers
795
796# Update providers from a custom Catwalk base URL.
797crush update-providers https://example.com/
798
799# Update providers from a local file.
800crush update-providers /path/to/local-providers.json
801
802# Reset providers to the embedded version, embedded at crush at build time.
803crush update-providers embedded
804
805# For more info:
806crush update-providers --help
807```
808
809## Metrics
810
811Crush records pseudonymous usage metrics (tied to a device-specific hash),
812which maintainers rely on to inform development and support priorities. The
813metrics include solely usage metadata; prompts and responses are NEVER
814collected.
815
816Details on exactly what’s collected are in the source code ([here](https://github.com/charmbracelet/crush/tree/main/internal/event)
817and [here](https://github.com/charmbracelet/crush/blob/main/internal/llm/agent/event.go)).
818
819You can opt out of metrics collection at any time by setting the environment
820variable by setting the following in your environment:
821
822```bash
823export CRUSH_DISABLE_METRICS=1
824```
825
826Or by setting the following in your config:
827
828```json
829{
830 "options": {
831 "disable_metrics": true
832 }
833}
834```
835
836Crush also respects the [`DO_NOT_TRACK`](https://donottrack.sh/) convention
837which can be enabled via `export DO_NOT_TRACK=1`.
838
839## Q&A
840
841### Why is clipboard copy and paste not working?
842
843Installing an extra tool might be needed on Unix-like environments.
844
845| Environment | Tool |
846| ------------------- | ------------------------ |
847| Windows | Native support |
848| macOS | Native support |
849| Linux/BSD + Wayland | `wl-copy` and `wl-paste` |
850| Linux/BSD + X11 | `xclip` or `xsel` |
851
852## Contributing
853
854See the [contributing guide](https://github.com/charmbracelet/crush?tab=contributing-ov-file#contributing).
855
856## Whatcha think?
857
858We’d love to hear your thoughts on this project. Need help? We gotchu. You can find us on:
859
860- [Twitter](https://twitter.com/charmcli)
861- [Slack][slack]
862- [Discord][discord]
863- [The Fediverse](https://mastodon.social/@charmcli)
864- [Bluesky](https://bsky.app/profile/charm.land)
865
866[slack]: https://charm.land/slack
867[discord]: https://charm.land/discord
868
869## License
870
871[FSL-1.1-MIT](https://github.com/charmbracelet/crush/raw/main/LICENSE.md)
872
873---
874
875Part of [Charm](https://charm.land).
876
877<a href="https://charm.land/"><img alt="The Charm logo" width="400" src="https://stuff.charm.sh/charm-banner-softy.jpg" /></a>
878
879<!--prettier-ignore-->
880Charm热爱开源 • Charm loves open source