README.md

  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| `HYPER_API_KEY`             | Charm Hyper                                        |
185| `ANTHROPIC_API_KEY`         | Anthropic                                          |
186| `OPENAI_API_KEY`            | OpenAI                                             |
187| `VERCEL_API_KEY`            | Vercel AI Gateway                                  |
188| `GEMINI_API_KEY`            | Google Gemini                                      |
189| `SYNTHETIC_API_KEY`         | Synthetic                                          |
190| `ZAI_API_KEY`               | Z.ai                                               |
191| `MINIMAX_API_KEY`           | MiniMax                                            |
192| `HF_TOKEN`                  | Hugging Face Inference                             |
193| `CEREBRAS_API_KEY`          | Cerebras                                           |
194| `OPENROUTER_API_KEY`        | OpenRouter                                         |
195| `IONET_API_KEY`             | io.net                                             |
196| `GROQ_API_KEY`              | Groq                                               |
197| `AVIAN_API_KEY`             | Avian                                              |
198| `OPENCODE_API_KEY`          | OpenCode Zen & Go                                  |
199| `VERTEXAI_PROJECT`          | Google Cloud VertexAI (Gemini)                     |
200| `VERTEXAI_LOCATION`         | Google Cloud VertexAI (Gemini)                     |
201| `AWS_ACCESS_KEY_ID`         | Amazon Bedrock (Claude)                            |
202| `AWS_SECRET_ACCESS_KEY`     | Amazon Bedrock (Claude)                            |
203| `AWS_REGION`                | Amazon Bedrock (Claude)                            |
204| `AWS_PROFILE`               | Amazon Bedrock (Custom Profile)                    |
205| `AWS_BEARER_TOKEN_BEDROCK`  | Amazon Bedrock                                     |
206| `AZURE_OPENAI_API_ENDPOINT` | Azure OpenAI models                                |
207| `AZURE_OPENAI_API_KEY`      | Azure OpenAI models (optional when using Entra ID) |
208| `AZURE_OPENAI_API_VERSION`  | Azure OpenAI models                                |
209
210### Subscriptions
211
212If you prefer subscription-based usage, here are some plans that work well in
213Crush:
214
215- [Synthetic](https://synthetic.new/pricing)
216- [GLM Coding Plan](https://z.ai/subscribe)
217- [Kimi Code](https://www.kimi.com/membership/pricing)
218- [MiniMax Coding Plan](https://platform.minimax.io/subscribe/coding-plan)
219
220### By the Way
221
222Is there a provider you’d like to see in Crush? Is there an existing model that needs an update?
223
224Crush’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.
225
226<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>
227
228## Configuration
229
230> [!TIP]
231> Crush ships with a builtin `crush-config` skill for configuring itself. In
232> many cases you can simply ask Crush to configure itself.
233
234Crush runs great with no configuration. That said, if you do need or want to
235customize Crush, configuration can be added either local to the project itself,
236or globally, with the following priority:
237
2381. `.crush.json`
2392. `crush.json`
2403. `$HOME/.config/crush/crush.json`
241
242Configuration itself is stored as a JSON object:
243
244```json
245{
246  "this-setting": { "this": "that" },
247  "that-setting": ["ceci", "cela"]
248}
249```
250
251As an additional note, Crush also stores ephemeral data, such as application
252state, in one additional location:
253
254```bash
255# Unix
256$HOME/.local/share/crush/crush.json
257
258# Windows
259%LOCALAPPDATA%\crush\crush.json
260```
261
262> [!TIP]
263> You can override the user and data config locations by setting:
264>
265> - `CRUSH_GLOBAL_CONFIG`
266> - `CRUSH_GLOBAL_DATA`
267
268### LSPs
269
270Crush can use LSPs for additional context to help inform its decisions, just
271like you would. LSPs can be added manually like so:
272
273```json
274{
275  "$schema": "https://charm.land/crush.json",
276  "lsp": {
277    "go": {
278      "command": "gopls",
279      "env": {
280        "GOTOOLCHAIN": "go1.24.5"
281      }
282    },
283    "typescript": {
284      "command": "typescript-language-server",
285      "args": ["--stdio"]
286    },
287    "nix": {
288      "command": "nil"
289    }
290  }
291}
292```
293
294### MCPs
295
296Crush also supports Model Context Protocol (MCP) servers through three transport
297types: `stdio` for command-line servers, `http` for HTTP endpoints, and `sse`
298for Server-Sent Events.
299
300Shell-style value expansion (`$VAR`, `${VAR:-default}`, `$(command)`, quoting,
301and nesting (works in `command`, `args`, `env`, `headers`, and `url`, so
302file-based secrets like work out of the box, so you can use values like
303"$TOKEN"` and `"$(cat /path/to/secret/token)"``. Expansion runs through Crush's
304embedded shell, so the same syntax works on all supported systems, including
305Windows. Unset variables are an error; use `${VAR:-fallback}` to opt in to
306a default.
307
308```json
309{
310  "$schema": "https://charm.land/crush.json",
311  "mcp": {
312    "filesystem": {
313      "type": "stdio",
314      "command": "node",
315      "args": ["/path/to/mcp-server.js"],
316      "timeout": 120,
317      "disabled": false,
318      "disabled_tools": ["some-tool-name"],
319      "env": {
320        "NODE_ENV": "production"
321      }
322    },
323    "github": {
324      "type": "http",
325      "url": "https://api.githubcopilot.com/mcp/",
326      "timeout": 120,
327      "disabled": false,
328      "disabled_tools": ["create_issue", "create_pull_request"],
329      "headers": {
330        "Authorization": "Bearer $GH_PAT"
331      }
332    },
333    "streaming-service": {
334      "type": "sse",
335      "url": "https://example.com/mcp/sse",
336      "timeout": 120,
337      "disabled": false,
338      "headers": {
339        "API-Key": "$(echo $API_KEY)"
340      }
341    }
342  }
343}
344```
345
346### Hooks
347
348Crush has preliminary support for hooks. For details, see
349[the hook guide](./docs/hooks/).
350
351### Ignoring Files
352
353Crush respects `.gitignore` files by default, but you can also create a
354`.crushignore` file to specify additional files and directories that Crush
355should ignore. This is useful for excluding files that you want in version
356control but don't want Crush to consider when providing context.
357
358The `.crushignore` file uses the same syntax as `.gitignore` and can be placed
359in the root of your project or in subdirectories.
360
361### Allowing Tools
362
363By default, Crush will ask you for permission before running tool calls. If
364you'd like, you can allow tools to be executed without prompting you for
365permissions. Use this with care.
366
367```json
368{
369  "$schema": "https://charm.land/crush.json",
370  "permissions": {
371    "allowed_tools": [
372      "view",
373      "ls",
374      "grep",
375      "edit",
376      "mcp_context7_get-library-doc"
377    ]
378  }
379}
380```
381
382You can also skip all permission prompts entirely by running Crush with the
383`--yolo` flag. Be very, very careful with this feature.
384
385### Disabling Built-In Tools
386
387If you'd like to prevent Crush from using certain built-in tools entirely, you
388can disable them via the `options.disabled_tools` list. Disabled tools are
389completely hidden from the agent.
390
391```json
392{
393  "$schema": "https://charm.land/crush.json",
394  "options": {
395    "disabled_tools": ["bash", "sourcegraph"]
396  }
397}
398```
399
400To disable tools from MCP servers, see the [MCP config section](#mcps).
401
402### Disabling Skills
403
404If you'd like to prevent Crush from using certain skills entirely, you can
405disable them via the `options.disabled_skills` list. Disabled skills are hidden
406from the agent, including builtin skills and skills discovered from disk.
407
408```json
409{
410  "$schema": "https://charm.land/crush.json",
411  "options": {
412    "disabled_skills": ["crush-config"]
413  }
414}
415```
416
417### Agent Skills
418
419Crush supports the [Agent Skills](https://agentskills.io) open standard for
420extending agent capabilities with reusable skill packages. Skills are folders
421containing a `SKILL.md` file with instructions that Crush can discover and
422activate on demand.
423
424The global paths we looks for skills are:
425
426* `$CRUSH_SKILLS_DIR`
427* `$XDG_CONFIG_HOME/agents/skills` or `~/.config/agents/skills/`
428* `$XDG_CONFIG_HOME/crush/skills` or `~/.config/crush/skills/`
429* On Windows, we _also_ look at
430  * `%LOCALAPPDATA%\agents\skills\` or `%USERPROFILE%\AppData\Local\agents\skills\`
431  * `%LOCALAPPDATA%\crush\skills\` or `%USERPROFILE%\AppData\Local\crush\skills\`
432* Additional paths configured via `options.skills_paths`
433
434On top of that, we _also_ load skills in your project from the following
435relative paths:
436
437* `.agents/skills`
438* `.crush/skills`
439* `.claude/skills`
440* `.cursor/skills`
441
442```jsonc
443{
444  "$schema": "https://charm.land/crush.json",
445  "options": {
446    "skills_paths": [
447      "~/.config/crush/skills", // Windows: "%LOCALAPPDATA%\\crush\\skills",
448      "./project-skills",
449    ],
450  },
451}
452```
453
454You can get started with example skills from [anthropics/skills](https://github.com/anthropics/skills):
455
456```bash
457# Unix
458mkdir -p ~/.config/crush/skills
459cd ~/.config/crush/skills
460git clone https://github.com/anthropics/skills.git _temp
461mv _temp/skills/* . && rm -rf _temp
462```
463
464```powershell
465# Windows (PowerShell)
466mkdir -Force "$env:LOCALAPPDATA\crush\skills"
467cd "$env:LOCALAPPDATA\crush\skills"
468git clone https://github.com/anthropics/skills.git _temp
469mv _temp/skills/* . ; rm -r -force _temp
470```
471
472### Desktop notifications
473
474Crush sends desktop notifications when a tool call requires permission and when
475the agent finishes its turn. They're only sent when the terminal window isn't
476focused _and_ your terminal supports reporting the focus state.
477
478```jsonc
479{
480  "$schema": "https://charm.land/crush.json",
481  "options": {
482    "disable_notifications": false, // default
483  },
484}
485```
486
487To disable desktop notifications, set `disable_notifications` to `true` in your
488configuration. On macOS, notifications currently lack icons due to platform
489limitations.
490
491### Initialization
492
493When you initialize a project, Crush analyzes your codebase and creates
494a context file that helps it work more effectively in future sessions.
495By default, this file is named `AGENTS.md`, but you can customize the
496name and location with the `initialize_as` option:
497
498```json
499{
500  "$schema": "https://charm.land/crush.json",
501  "options": {
502    "initialize_as": "AGENTS.md"
503  }
504}
505```
506
507This is useful if you prefer a different naming convention or want to
508place the file in a specific directory (e.g., `CRUSH.md` or
509`docs/LLMs.md`). Crush will fill the file with project-specific context
510like build commands, code patterns, and conventions it discovered during
511initialization.
512
513### Attribution Settings
514
515By default, Crush adds attribution information to Git commits and pull requests
516it creates. You can customize this behavior with the `attribution` option:
517
518```json
519{
520  "$schema": "https://charm.land/crush.json",
521  "options": {
522    "attribution": {
523      "trailer_style": "co-authored-by",
524      "generated_with": true
525    }
526  }
527}
528```
529
530- `trailer_style`: Controls the attribution trailer added to commit messages
531  (default: `assisted-by`)
532  - `assisted-by`: Adds `Assisted-by: [Model Name] via Crush <crush@charm.land>`
533    (includes the model name)
534  - `co-authored-by`: Adds `Co-Authored-By: Crush <crush@charm.land>`
535  - `none`: No attribution trailer
536- `generated_with`: When true (default), adds `💘 Generated with Crush` line to
537  commit messages and PR descriptions
538
539### Custom Providers
540
541Crush supports custom provider configurations for both OpenAI-compatible and
542Anthropic-compatible APIs.
543
544> [!NOTE]
545> Note that we support two "types" for OpenAI. Make sure to choose the right one
546> to ensure the best experience!
547>
548> - `openai` should be used when proxying or routing requests through OpenAI.
549> - `openai-compat` should be used when using non-OpenAI providers that have OpenAI-compatible APIs.
550
551#### OpenAI-Compatible APIs
552
553Here’s an example configuration for Deepseek, which uses an OpenAI-compatible
554API. Don't forget to set `DEEPSEEK_API_KEY` in your environment.
555
556```json
557{
558  "$schema": "https://charm.land/crush.json",
559  "providers": {
560    "deepseek": {
561      "type": "openai-compat",
562      "base_url": "https://api.deepseek.com/v1",
563      "api_key": "$DEEPSEEK_API_KEY",
564      "models": [
565        {
566          "id": "deepseek-chat",
567          "name": "Deepseek V3",
568          "cost_per_1m_in": 0.27,
569          "cost_per_1m_out": 1.1,
570          "cost_per_1m_in_cached": 0.07,
571          "cost_per_1m_out_cached": 1.1,
572          "context_window": 64000,
573          "default_max_tokens": 5000
574        }
575      ]
576    }
577  }
578}
579```
580
581#### Anthropic-Compatible APIs
582
583Custom Anthropic-compatible providers follow this format:
584
585```json
586{
587  "$schema": "https://charm.land/crush.json",
588  "providers": {
589    "custom-anthropic": {
590      "type": "anthropic",
591      "base_url": "https://api.anthropic.com/v1",
592      "api_key": "$ANTHROPIC_API_KEY",
593      "extra_headers": {
594        "anthropic-version": "2023-06-01"
595      },
596      "models": [
597        {
598          "id": "claude-sonnet-4-20250514",
599          "name": "Claude Sonnet 4",
600          "cost_per_1m_in": 3,
601          "cost_per_1m_out": 15,
602          "cost_per_1m_in_cached": 3.75,
603          "cost_per_1m_out_cached": 0.3,
604          "context_window": 200000,
605          "default_max_tokens": 50000,
606          "can_reason": true,
607          "supports_attachments": true
608        }
609      ]
610    }
611  }
612}
613```
614
615### Amazon Bedrock
616
617Crush currently supports running Anthropic models through Bedrock, with caching disabled.
618
619- A Bedrock provider will appear once you have AWS configured, i.e. `aws configure`
620- Crush also expects the `AWS_REGION` or `AWS_DEFAULT_REGION` to be set
621- To use a specific AWS profile set `AWS_PROFILE` in your environment, i.e. `AWS_PROFILE=myprofile crush`
622- Alternatively to `aws configure`, you can also just set `AWS_BEARER_TOKEN_BEDROCK`
623
624### Vertex AI Platform
625
626Vertex AI will appear in the list of available providers when `VERTEXAI_PROJECT` and `VERTEXAI_LOCATION` are set. You will also need to be authenticated:
627
628```bash
629gcloud auth application-default login
630```
631
632To add specific models to the configuration, configure as such:
633
634```json
635{
636  "$schema": "https://charm.land/crush.json",
637  "providers": {
638    "vertexai": {
639      "models": [
640        {
641          "id": "claude-sonnet-4@20250514",
642          "name": "VertexAI Sonnet 4",
643          "cost_per_1m_in": 3,
644          "cost_per_1m_out": 15,
645          "cost_per_1m_in_cached": 3.75,
646          "cost_per_1m_out_cached": 0.3,
647          "context_window": 200000,
648          "default_max_tokens": 50000,
649          "can_reason": true,
650          "supports_attachments": true
651        }
652      ]
653    }
654  }
655}
656```
657
658### Local Models
659
660Local models can also be configured via OpenAI-compatible API. Here are two common examples:
661
662#### Ollama
663
664```json
665{
666  "providers": {
667    "ollama": {
668      "name": "Ollama",
669      "base_url": "http://localhost:11434/v1/",
670      "type": "openai-compat",
671      "models": [
672        {
673          "name": "Qwen 3 30B",
674          "id": "qwen3:30b",
675          "context_window": 256000,
676          "default_max_tokens": 20000
677        }
678      ]
679    }
680  }
681}
682```
683
684#### LM Studio
685
686```json
687{
688  "providers": {
689    "lmstudio": {
690      "name": "LM Studio",
691      "base_url": "http://localhost:1234/v1/",
692      "type": "openai-compat",
693      "models": [
694        {
695          "name": "Qwen 3 30B",
696          "id": "qwen/qwen3-30b-a3b-2507",
697          "context_window": 256000,
698          "default_max_tokens": 20000
699        }
700      ]
701    }
702  }
703}
704```
705
706## Logging
707
708Sometimes you need to look at logs. Luckily, Crush logs all sorts of
709stuff. Logs are stored in `./.crush/logs/crush.log` relative to the project.
710
711The CLI also contains some helper commands to make perusing recent logs easier:
712
713```bash
714# Print the last 1000 lines
715crush logs
716
717# Print the last 500 lines
718crush logs --tail 500
719
720# Follow logs in real time
721crush logs --follow
722```
723
724Want more logging? Run `crush` with the `--debug` flag, or enable it in the
725config:
726
727```json
728{
729  "$schema": "https://charm.land/crush.json",
730  "options": {
731    "debug": true,
732    "debug_lsp": true
733  }
734}
735```
736
737## Provider Auto-Updates
738
739By default, Crush automatically checks for the latest and greatest list of
740providers and models from [Catwalk](https://github.com/charmbracelet/catwalk),
741the open source Crush provider database. This means that when new providers and
742models are available, or when model metadata changes, Crush automatically
743updates your local configuration.
744
745### Disabling automatic provider updates
746
747For those with restricted internet access, or those who prefer to work in
748air-gapped environments, this might not be want you want, and this feature can
749be disabled.
750
751To disable automatic provider updates, set `disable_provider_auto_update` into
752your `crush.json` config:
753
754```json
755{
756  "$schema": "https://charm.land/crush.json",
757  "options": {
758    "disable_provider_auto_update": true
759  }
760}
761```
762
763Or set the `CRUSH_DISABLE_PROVIDER_AUTO_UPDATE` environment variable:
764
765```bash
766export CRUSH_DISABLE_PROVIDER_AUTO_UPDATE=1
767```
768
769### Manually updating providers
770
771Manually updating providers is possible with the `crush update-providers`
772command:
773
774```bash
775# Update providers remotely from Catwalk.
776crush update-providers
777
778# Update providers from a custom Catwalk base URL.
779crush update-providers https://example.com/
780
781# Update providers from a local file.
782crush update-providers /path/to/local-providers.json
783
784# Reset providers to the embedded version, embedded at crush at build time.
785crush update-providers embedded
786
787# For more info:
788crush update-providers --help
789```
790
791## Metrics
792
793Crush records pseudonymous usage metrics (tied to a device-specific hash),
794which maintainers rely on to inform development and support priorities. The
795metrics include solely usage metadata; prompts and responses are NEVER
796collected.
797
798Details on exactly what’s collected are in the source code ([here](https://github.com/charmbracelet/crush/tree/main/internal/event)
799and [here](https://github.com/charmbracelet/crush/blob/main/internal/llm/agent/event.go)).
800
801You can opt out of metrics collection at any time by setting the environment
802variable by setting the following in your environment:
803
804```bash
805export CRUSH_DISABLE_METRICS=1
806```
807
808Or by setting the following in your config:
809
810```json
811{
812  "options": {
813    "disable_metrics": true
814  }
815}
816```
817
818Crush also respects the [`DO_NOT_TRACK`](https://donottrack.sh/) convention
819which can be enabled via `export DO_NOT_TRACK=1`.
820
821## Q&A
822
823### Why is clipboard copy and paste not working?
824
825Installing an extra tool might be needed on Unix-like environments.
826
827| Environment         | Tool                     |
828| ------------------- | ------------------------ |
829| Windows             | Native support           |
830| macOS               | Native support           |
831| Linux/BSD + Wayland | `wl-copy` and `wl-paste` |
832| Linux/BSD + X11     | `xclip` or `xsel`        |
833
834## Contributing
835
836See the [contributing guide](https://github.com/charmbracelet/crush?tab=contributing-ov-file#contributing).
837
838## Whatcha think?
839
840We’d love to hear your thoughts on this project. Need help? We gotchu. You can find us on:
841
842- [Twitter](https://twitter.com/charmcli)
843- [Slack][slack]
844- [Discord][discord]
845- [The Fediverse](https://mastodon.social/@charmcli)
846- [Bluesky](https://bsky.app/profile/charm.land)
847
848[slack]: https://charm.land/slack
849[discord]: https://charm.land/discord
850
851## License
852
853[FSL-1.1-MIT](https://github.com/charmbracelet/crush/raw/main/LICENSE.md)
854
855---
856
857Part of [Charm](https://charm.land).
858
859<a href="https://charm.land/"><img alt="The Charm logo" width="400" src="https://stuff.charm.sh/charm-banner-softy.jpg" /></a>
860
861<!--prettier-ignore-->
862Charm热爱开源 • Charm loves open source