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