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