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