@charmland/crush 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -17
- package/package.json +25 -25
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
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>
|
|
10
11
|
|
|
11
12
|
<p align="center"><img width="800" alt="Crush Demo" src="https://github.com/user-attachments/assets/58280caf-851b-470a-b6f7-d5c4ea8a1968" /></p>
|
|
12
13
|
|
|
@@ -64,6 +65,61 @@ nix-channel --update
|
|
|
64
65
|
nix-shell -p '(import <nur> { pkgs = import <nixpkgs> {}; }).repos.charmbracelet.crush'
|
|
65
66
|
```
|
|
66
67
|
|
|
68
|
+
### NixOS & Home Manager Module Usage via NUR
|
|
69
|
+
|
|
70
|
+
Crush provides NixOS and Home Manager modules via NUR.
|
|
71
|
+
You 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 :)
|
|
72
|
+
|
|
73
|
+
```nix
|
|
74
|
+
{
|
|
75
|
+
inputs = {
|
|
76
|
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
77
|
+
nur.url = "github:nix-community/NUR";
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
outputs = { self, nixpkgs, nur, ... }: {
|
|
81
|
+
nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
|
|
82
|
+
system = "x86_64-linux";
|
|
83
|
+
modules = [
|
|
84
|
+
nur.modules.nixos.default
|
|
85
|
+
nur.repos.charmbracelet.modules.crush
|
|
86
|
+
{
|
|
87
|
+
programs.crush = {
|
|
88
|
+
enable = true;
|
|
89
|
+
settings = {
|
|
90
|
+
providers = {
|
|
91
|
+
openai = {
|
|
92
|
+
id = "openai";
|
|
93
|
+
name = "OpenAI";
|
|
94
|
+
base_url = "https://api.openai.com/v1";
|
|
95
|
+
type = "openai";
|
|
96
|
+
api_key = "sk-fake123456789abcdef...";
|
|
97
|
+
models = [
|
|
98
|
+
{
|
|
99
|
+
id = "gpt-4";
|
|
100
|
+
name = "GPT-4";
|
|
101
|
+
}
|
|
102
|
+
];
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
lsp = {
|
|
106
|
+
go = { command = "gopls"; enabled = true; };
|
|
107
|
+
nix = { command = "nil"; enabled = true; };
|
|
108
|
+
};
|
|
109
|
+
options = {
|
|
110
|
+
context_paths = [ "/etc/nixos/configuration.nix" ];
|
|
111
|
+
tui = { compact_mode = true; };
|
|
112
|
+
debug = false;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
];
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
67
123
|
</details>
|
|
68
124
|
|
|
69
125
|
<details>
|
|
@@ -119,22 +175,25 @@ Crush. You'll be prompted to enter your API key.
|
|
|
119
175
|
|
|
120
176
|
That said, you can also set environment variables for preferred providers.
|
|
121
177
|
|
|
122
|
-
| Environment Variable
|
|
123
|
-
|
|
|
124
|
-
| `ANTHROPIC_API_KEY`
|
|
125
|
-
| `OPENAI_API_KEY`
|
|
126
|
-
| `OPENROUTER_API_KEY`
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
178
|
+
| Environment Variable | Provider |
|
|
179
|
+
| --------------------------- | -------------------------------------------------- |
|
|
180
|
+
| `ANTHROPIC_API_KEY` | Anthropic |
|
|
181
|
+
| `OPENAI_API_KEY` | OpenAI |
|
|
182
|
+
| `OPENROUTER_API_KEY` | OpenRouter |
|
|
183
|
+
| `GEMINI_API_KEY` | Google Gemini |
|
|
184
|
+
| `CEREBRAS_API_KEY` | Cerebras |
|
|
185
|
+
| `HF_TOKEN` | Huggingface Inference |
|
|
186
|
+
| `VERTEXAI_PROJECT` | Google Cloud VertexAI (Gemini) |
|
|
187
|
+
| `VERTEXAI_LOCATION` | Google Cloud VertexAI (Gemini) |
|
|
188
|
+
| `GROQ_API_KEY` | Groq |
|
|
189
|
+
| `AWS_ACCESS_KEY_ID` | AWS Bedrock (Claude) |
|
|
190
|
+
| `AWS_SECRET_ACCESS_KEY` | AWS Bedrock (Claude) |
|
|
191
|
+
| `AWS_REGION` | AWS Bedrock (Claude) |
|
|
192
|
+
| `AWS_PROFILE` | Custom AWS Profile |
|
|
193
|
+
| `AWS_REGION` | AWS Region |
|
|
194
|
+
| `AZURE_OPENAI_API_ENDPOINT` | Azure OpenAI models |
|
|
195
|
+
| `AZURE_OPENAI_API_KEY` | Azure OpenAI models (optional when using Entra ID) |
|
|
196
|
+
| `AZURE_OPENAI_API_VERSION` | Azure OpenAI models |
|
|
138
197
|
|
|
139
198
|
### By the Way
|
|
140
199
|
|
|
@@ -214,6 +273,8 @@ using `$(echo $VAR)` syntax.
|
|
|
214
273
|
"type": "stdio",
|
|
215
274
|
"command": "node",
|
|
216
275
|
"args": ["/path/to/mcp-server.js"],
|
|
276
|
+
"timeout": 120,
|
|
277
|
+
"disabled": false,
|
|
217
278
|
"env": {
|
|
218
279
|
"NODE_ENV": "production"
|
|
219
280
|
}
|
|
@@ -221,6 +282,8 @@ using `$(echo $VAR)` syntax.
|
|
|
221
282
|
"github": {
|
|
222
283
|
"type": "http",
|
|
223
284
|
"url": "https://example.com/mcp/",
|
|
285
|
+
"timeout": 120,
|
|
286
|
+
"disabled": false,
|
|
224
287
|
"headers": {
|
|
225
288
|
"Authorization": "$(echo Bearer $EXAMPLE_MCP_TOKEN)"
|
|
226
289
|
}
|
|
@@ -228,6 +291,8 @@ using `$(echo $VAR)` syntax.
|
|
|
228
291
|
"streaming-service": {
|
|
229
292
|
"type": "sse",
|
|
230
293
|
"url": "https://example.com/mcp/sse",
|
|
294
|
+
"timeout": 120,
|
|
295
|
+
"disabled": false,
|
|
231
296
|
"headers": {
|
|
232
297
|
"API-Key": "$(echo $API_KEY)"
|
|
233
298
|
}
|
|
@@ -480,7 +545,7 @@ config:
|
|
|
480
545
|
}
|
|
481
546
|
```
|
|
482
547
|
|
|
483
|
-
##
|
|
548
|
+
## Provider Auto-Updates
|
|
484
549
|
|
|
485
550
|
By default, Crush automatically checks for the latest and greatest list of
|
|
486
551
|
providers and models from [Catwalk](https://github.com/charmbracelet/catwalk),
|
|
@@ -488,6 +553,8 @@ the open source Crush provider database. This means that when new providers and
|
|
|
488
553
|
models are available, or when model metadata changes, Crush automatically
|
|
489
554
|
updates your local configuration.
|
|
490
555
|
|
|
556
|
+
### Disabling automatic provider updates
|
|
557
|
+
|
|
491
558
|
For those with restricted internet access, or those who prefer to work in
|
|
492
559
|
air-gapped environments, this might not be want you want, and this feature can
|
|
493
560
|
be disabled.
|
|
@@ -532,6 +599,36 @@ crush update-providers embedded
|
|
|
532
599
|
crush update-providers --help
|
|
533
600
|
```
|
|
534
601
|
|
|
602
|
+
## Metrics
|
|
603
|
+
|
|
604
|
+
Crush records pseudonymous usage metrics (tied to a device-specific hash),
|
|
605
|
+
which maintainers rely on to inform development and support priorities. The
|
|
606
|
+
metrics include solely usage metadata; prompts and responses are NEVER
|
|
607
|
+
collected.
|
|
608
|
+
|
|
609
|
+
Details on exactly what’s collected are in the source code ([here](https://github.com/charmbracelet/crush/tree/main/internal/event)
|
|
610
|
+
and [here](https://github.com/charmbracelet/crush/blob/main/internal/llm/agent/event.go)).
|
|
611
|
+
|
|
612
|
+
You can opt out of metrics collection at any time by setting the environment
|
|
613
|
+
variable by setting the following in your environment:
|
|
614
|
+
|
|
615
|
+
```bash
|
|
616
|
+
export CRUSH_DISABLE_METRICS=1
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
Or by setting the following in your config:
|
|
620
|
+
|
|
621
|
+
```json
|
|
622
|
+
{
|
|
623
|
+
"options": {
|
|
624
|
+
"disable_metrics": true
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
Crush also respects the [`DO_NOT_TRACK`](https://consoledonottrack.com)
|
|
630
|
+
convention which can be enabled via `export DO_NOT_TRACK=1`.
|
|
631
|
+
|
|
535
632
|
## A Note on Claude Max and GitHub Copilot
|
|
536
633
|
|
|
537
634
|
Crush only supports model providers through official, compliant APIs. We do not
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charmland/crush",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "node install.js",
|
|
@@ -26,82 +26,82 @@
|
|
|
26
26
|
},
|
|
27
27
|
"archives": {
|
|
28
28
|
"darwin-arm64": {
|
|
29
|
-
"name": "crush_0.9.
|
|
30
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.
|
|
29
|
+
"name": "crush_0.9.3_Darwin_arm64.tar.gz",
|
|
30
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.3/crush_0.9.3_Darwin_arm64.tar.gz",
|
|
31
31
|
"bins": [
|
|
32
32
|
"crush"
|
|
33
33
|
],
|
|
34
34
|
"format": "tar.gz",
|
|
35
35
|
"checksum": {
|
|
36
36
|
"algorithm": "sha256",
|
|
37
|
-
"digest": "
|
|
37
|
+
"digest": "9038c959383db14cd2e400c04ee8c6e3fad85bd04765039a9d27316ddd000021"
|
|
38
38
|
},
|
|
39
|
-
"wrappedIn": "crush_0.9.
|
|
39
|
+
"wrappedIn": "crush_0.9.3_Darwin_arm64"
|
|
40
40
|
},
|
|
41
41
|
"darwin-x64": {
|
|
42
|
-
"name": "crush_0.9.
|
|
43
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.
|
|
42
|
+
"name": "crush_0.9.3_Darwin_x86_64.tar.gz",
|
|
43
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.3/crush_0.9.3_Darwin_x86_64.tar.gz",
|
|
44
44
|
"bins": [
|
|
45
45
|
"crush"
|
|
46
46
|
],
|
|
47
47
|
"format": "tar.gz",
|
|
48
48
|
"checksum": {
|
|
49
49
|
"algorithm": "sha256",
|
|
50
|
-
"digest": "
|
|
50
|
+
"digest": "d80ee6bf94ddeae869cd521af4b0850d304eb246e90bb087dfc07ff835b3d98d"
|
|
51
51
|
},
|
|
52
|
-
"wrappedIn": "crush_0.9.
|
|
52
|
+
"wrappedIn": "crush_0.9.3_Darwin_x86_64"
|
|
53
53
|
},
|
|
54
54
|
"linux-arm64": {
|
|
55
|
-
"name": "crush_0.9.
|
|
56
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.
|
|
55
|
+
"name": "crush_0.9.3_Linux_arm64.tar.gz",
|
|
56
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.3/crush_0.9.3_Linux_arm64.tar.gz",
|
|
57
57
|
"bins": [
|
|
58
58
|
"crush"
|
|
59
59
|
],
|
|
60
60
|
"format": "tar.gz",
|
|
61
61
|
"checksum": {
|
|
62
62
|
"algorithm": "sha256",
|
|
63
|
-
"digest": "
|
|
63
|
+
"digest": "c0e1767c4f709f6ad8aac9108eeb6e348985528d12d6dafa525995e2df63d712"
|
|
64
64
|
},
|
|
65
|
-
"wrappedIn": "crush_0.9.
|
|
65
|
+
"wrappedIn": "crush_0.9.3_Linux_arm64"
|
|
66
66
|
},
|
|
67
67
|
"linux-x64": {
|
|
68
|
-
"name": "crush_0.9.
|
|
69
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.
|
|
68
|
+
"name": "crush_0.9.3_Linux_x86_64.tar.gz",
|
|
69
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.3/crush_0.9.3_Linux_x86_64.tar.gz",
|
|
70
70
|
"bins": [
|
|
71
71
|
"crush"
|
|
72
72
|
],
|
|
73
73
|
"format": "tar.gz",
|
|
74
74
|
"checksum": {
|
|
75
75
|
"algorithm": "sha256",
|
|
76
|
-
"digest": "
|
|
76
|
+
"digest": "e920afb955a34521213201047f73236e6400f1fb1907efc9c60c07f5250252e3"
|
|
77
77
|
},
|
|
78
|
-
"wrappedIn": "crush_0.9.
|
|
78
|
+
"wrappedIn": "crush_0.9.3_Linux_x86_64"
|
|
79
79
|
},
|
|
80
80
|
"win32-arm64": {
|
|
81
|
-
"name": "crush_0.9.
|
|
82
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.
|
|
81
|
+
"name": "crush_0.9.3_Windows_arm64.zip",
|
|
82
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.3/crush_0.9.3_Windows_arm64.zip",
|
|
83
83
|
"bins": [
|
|
84
84
|
"crush.exe"
|
|
85
85
|
],
|
|
86
86
|
"format": "zip",
|
|
87
87
|
"checksum": {
|
|
88
88
|
"algorithm": "sha256",
|
|
89
|
-
"digest": "
|
|
89
|
+
"digest": "d6acdd52dfbfb6b1c8c2ee45bba7291b4fb0f3778b6324ac1f77263d8bf73c67"
|
|
90
90
|
},
|
|
91
|
-
"wrappedIn": "crush_0.9.
|
|
91
|
+
"wrappedIn": "crush_0.9.3_Windows_arm64"
|
|
92
92
|
},
|
|
93
93
|
"win32-x64": {
|
|
94
|
-
"name": "crush_0.9.
|
|
95
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.
|
|
94
|
+
"name": "crush_0.9.3_Windows_x86_64.zip",
|
|
95
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.9.3/crush_0.9.3_Windows_x86_64.zip",
|
|
96
96
|
"bins": [
|
|
97
97
|
"crush.exe"
|
|
98
98
|
],
|
|
99
99
|
"format": "zip",
|
|
100
100
|
"checksum": {
|
|
101
101
|
"algorithm": "sha256",
|
|
102
|
-
"digest": "
|
|
102
|
+
"digest": "73240b699bd30a977d25ea12708d00897e73883d873c63cbf075f261f4851253"
|
|
103
103
|
},
|
|
104
|
-
"wrappedIn": "crush_0.9.
|
|
104
|
+
"wrappedIn": "crush_0.9.3_Windows_x86_64"
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|