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