@charmland/crush 0.54.0 → 0.55.0
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 +37 -18
- package/lib.js +49 -19
- package/package.json +28 -29
package/README.md
CHANGED
|
@@ -224,6 +224,10 @@ Crush’s default model listing is managed in [Catwalk](https://github.com/charm
|
|
|
224
224
|
|
|
225
225
|
## Configuration
|
|
226
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
|
+
|
|
227
231
|
Crush runs great with no configuration. That said, if you do need or want to
|
|
228
232
|
customize Crush, configuration can be added either local to the project itself,
|
|
229
233
|
or globally, with the following priority:
|
|
@@ -241,7 +245,8 @@ Configuration itself is stored as a JSON object:
|
|
|
241
245
|
}
|
|
242
246
|
```
|
|
243
247
|
|
|
244
|
-
As an additional note, Crush also stores ephemeral data, such as application
|
|
248
|
+
As an additional note, Crush also stores ephemeral data, such as application
|
|
249
|
+
state, in one additional location:
|
|
245
250
|
|
|
246
251
|
```bash
|
|
247
252
|
# Unix
|
|
@@ -253,8 +258,9 @@ $HOME/.local/share/crush/crush.json
|
|
|
253
258
|
|
|
254
259
|
> [!TIP]
|
|
255
260
|
> You can override the user and data config locations by setting:
|
|
256
|
-
>
|
|
257
|
-
>
|
|
261
|
+
>
|
|
262
|
+
> - `CRUSH_GLOBAL_CONFIG`
|
|
263
|
+
> - `CRUSH_GLOBAL_DATA`
|
|
258
264
|
|
|
259
265
|
### LSPs
|
|
260
266
|
|
|
@@ -371,16 +377,28 @@ completely hidden from the agent.
|
|
|
371
377
|
{
|
|
372
378
|
"$schema": "https://charm.land/crush.json",
|
|
373
379
|
"options": {
|
|
374
|
-
"disabled_tools": [
|
|
375
|
-
"bash",
|
|
376
|
-
"sourcegraph"
|
|
377
|
-
]
|
|
380
|
+
"disabled_tools": ["bash", "sourcegraph"]
|
|
378
381
|
}
|
|
379
382
|
}
|
|
380
383
|
```
|
|
381
384
|
|
|
382
385
|
To disable tools from MCP servers, see the [MCP config section](#mcps).
|
|
383
386
|
|
|
387
|
+
### Disabling Skills
|
|
388
|
+
|
|
389
|
+
If you'd like to prevent Crush from using certain skills entirely, you can
|
|
390
|
+
disable them via the `options.disabled_skills` list. Disabled skills are hidden
|
|
391
|
+
from 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
|
+
|
|
384
402
|
### Agent Skills
|
|
385
403
|
|
|
386
404
|
Crush supports the [Agent Skills](https://agentskills.io) open standard for
|
|
@@ -412,9 +430,9 @@ relative paths:
|
|
|
412
430
|
"options": {
|
|
413
431
|
"skills_paths": [
|
|
414
432
|
"~/.config/crush/skills", // Windows: "%LOCALAPPDATA%\\crush\\skills",
|
|
415
|
-
"./project-skills"
|
|
416
|
-
]
|
|
417
|
-
}
|
|
433
|
+
"./project-skills",
|
|
434
|
+
],
|
|
435
|
+
},
|
|
418
436
|
}
|
|
419
437
|
```
|
|
420
438
|
|
|
@@ -446,8 +464,8 @@ focused _and_ your terminal supports reporting the focus state.
|
|
|
446
464
|
{
|
|
447
465
|
"$schema": "https://charm.land/crush.json",
|
|
448
466
|
"options": {
|
|
449
|
-
"disable_notifications": false // default
|
|
450
|
-
}
|
|
467
|
+
"disable_notifications": false, // default
|
|
468
|
+
},
|
|
451
469
|
}
|
|
452
470
|
```
|
|
453
471
|
|
|
@@ -496,10 +514,10 @@ it creates. You can customize this behavior with the `attribution` option:
|
|
|
496
514
|
|
|
497
515
|
- `trailer_style`: Controls the attribution trailer added to commit messages
|
|
498
516
|
(default: `assisted-by`)
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
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
|
|
503
521
|
- `generated_with`: When true (default), adds `💘 Generated with Crush` line to
|
|
504
522
|
commit messages and PR descriptions
|
|
505
523
|
|
|
@@ -511,8 +529,9 @@ Anthropic-compatible APIs.
|
|
|
511
529
|
> [!NOTE]
|
|
512
530
|
> Note that we support two "types" for OpenAI. Make sure to choose the right one
|
|
513
531
|
> to ensure the best experience!
|
|
514
|
-
>
|
|
515
|
-
>
|
|
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.
|
|
516
535
|
|
|
517
536
|
#### OpenAI-Compatible APIs
|
|
518
537
|
|
package/lib.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// This file was generated by GoReleaser. DO NOT EDIT.
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import crypto from "crypto";
|
|
4
|
+
import http from "http";
|
|
5
|
+
import https from "https";
|
|
4
6
|
import path from "path";
|
|
5
7
|
import JSZip from "jszip";
|
|
6
8
|
import { x as tarExtract } from "tar";
|
|
7
|
-
import axios from "axios";
|
|
8
9
|
import { ProxyAgent } from "proxy-agent";
|
|
9
10
|
import { spawnSync } from "child_process";
|
|
10
11
|
import { fileURLToPath } from "url";
|
|
@@ -178,7 +179,7 @@ const verify = (filename, checksum) => {
|
|
|
178
179
|
}
|
|
179
180
|
};
|
|
180
181
|
|
|
181
|
-
const download = async (url, filename) => {
|
|
182
|
+
const download = async (url, filename, maxRedirects = 10) => {
|
|
182
183
|
try {
|
|
183
184
|
console.log(`Downloading ${url} to ${filename}...`);
|
|
184
185
|
const dir = path.dirname(filename);
|
|
@@ -186,27 +187,56 @@ const download = async (url, filename) => {
|
|
|
186
187
|
fs.mkdirSync(dir, { recursive: true });
|
|
187
188
|
}
|
|
188
189
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
responseType: "stream",
|
|
193
|
-
timeout: 300000, // 5min
|
|
194
|
-
httpAgent: agent,
|
|
195
|
-
httpsAgent: agent,
|
|
196
|
-
});
|
|
190
|
+
return new Promise((resolve, reject) => {
|
|
191
|
+
const parsedUrl = new URL(url);
|
|
192
|
+
const mod = parsedUrl.protocol === "https:" ? https : http;
|
|
197
193
|
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
const request = mod.get(url, { agent }, (response) => {
|
|
195
|
+
if (
|
|
196
|
+
response.statusCode >= 300 &&
|
|
197
|
+
response.statusCode < 400 &&
|
|
198
|
+
response.headers.location
|
|
199
|
+
) {
|
|
200
|
+
if (maxRedirects <= 0) {
|
|
201
|
+
reject(new Error("Too many redirects"));
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
download(response.headers.location, filename, maxRedirects - 1)
|
|
205
|
+
.then(resolve)
|
|
206
|
+
.catch(reject);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
200
209
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
210
|
+
if (response.statusCode !== 200) {
|
|
211
|
+
reject(
|
|
212
|
+
new Error(
|
|
213
|
+
`HTTP ${response.statusCode}: ${response.statusMessage}`,
|
|
214
|
+
),
|
|
215
|
+
);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const writer = fs.createWriteStream(filename);
|
|
220
|
+
response.pipe(writer);
|
|
221
|
+
|
|
222
|
+
writer.on("finish", () => {
|
|
223
|
+
console.log(`Download complete: ${filename}`);
|
|
224
|
+
resolve(dir);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
writer.on("error", (err) => {
|
|
228
|
+
console.error(`Error writing file: ${err.message}`);
|
|
229
|
+
reject(err);
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
request.on("error", (err) => {
|
|
234
|
+
reject(new Error(`Request failed: ${err.message}`));
|
|
205
235
|
});
|
|
206
236
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
reject(
|
|
237
|
+
request.setTimeout(300000, () => {
|
|
238
|
+
request.destroy();
|
|
239
|
+
reject(new Error("Request timed out"));
|
|
210
240
|
});
|
|
211
241
|
});
|
|
212
242
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charmland/crush",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.55.0",
|
|
5
5
|
"description": "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"postinstall": "node install.js",
|
|
@@ -21,89 +21,88 @@
|
|
|
21
21
|
"crush": "run-crush.js"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"tar": "^7.4.3"
|
|
24
|
+
"jszip": "3.10.1",
|
|
25
|
+
"proxy-agent": "7.0.0",
|
|
26
|
+
"tar": "7.5.13"
|
|
28
27
|
},
|
|
29
28
|
"archives": {
|
|
30
29
|
"darwin-arm64": {
|
|
31
|
-
"name": "crush_0.
|
|
32
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.
|
|
30
|
+
"name": "crush_0.55.0_Darwin_arm64.tar.gz",
|
|
31
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.55.0/crush_0.55.0_Darwin_arm64.tar.gz",
|
|
33
32
|
"bins": [
|
|
34
33
|
"crush"
|
|
35
34
|
],
|
|
36
35
|
"format": "tar.gz",
|
|
37
36
|
"checksum": {
|
|
38
37
|
"algorithm": "sha256",
|
|
39
|
-
"digest": "
|
|
38
|
+
"digest": "2eb30c14e0370d023773c3072182a56c19984047cc00817694a0158a454d993a"
|
|
40
39
|
},
|
|
41
|
-
"wrappedIn": "crush_0.
|
|
40
|
+
"wrappedIn": "crush_0.55.0_Darwin_arm64"
|
|
42
41
|
},
|
|
43
42
|
"darwin-x64": {
|
|
44
|
-
"name": "crush_0.
|
|
45
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.
|
|
43
|
+
"name": "crush_0.55.0_Darwin_x86_64.tar.gz",
|
|
44
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.55.0/crush_0.55.0_Darwin_x86_64.tar.gz",
|
|
46
45
|
"bins": [
|
|
47
46
|
"crush"
|
|
48
47
|
],
|
|
49
48
|
"format": "tar.gz",
|
|
50
49
|
"checksum": {
|
|
51
50
|
"algorithm": "sha256",
|
|
52
|
-
"digest": "
|
|
51
|
+
"digest": "573bb91fd18035f5a50ef0aa854fea6ebb076f8f4e6f9072d4521a94c2e21b7a"
|
|
53
52
|
},
|
|
54
|
-
"wrappedIn": "crush_0.
|
|
53
|
+
"wrappedIn": "crush_0.55.0_Darwin_x86_64"
|
|
55
54
|
},
|
|
56
55
|
"linux-arm64": {
|
|
57
|
-
"name": "crush_0.
|
|
58
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.
|
|
56
|
+
"name": "crush_0.55.0_Linux_arm64.tar.gz",
|
|
57
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.55.0/crush_0.55.0_Linux_arm64.tar.gz",
|
|
59
58
|
"bins": [
|
|
60
59
|
"crush"
|
|
61
60
|
],
|
|
62
61
|
"format": "tar.gz",
|
|
63
62
|
"checksum": {
|
|
64
63
|
"algorithm": "sha256",
|
|
65
|
-
"digest": "
|
|
64
|
+
"digest": "6117354764d25b535accb236c3d60f2b675b66cd0206c44d781e56150f20d9e9"
|
|
66
65
|
},
|
|
67
|
-
"wrappedIn": "crush_0.
|
|
66
|
+
"wrappedIn": "crush_0.55.0_Linux_arm64"
|
|
68
67
|
},
|
|
69
68
|
"linux-x64": {
|
|
70
|
-
"name": "crush_0.
|
|
71
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.
|
|
69
|
+
"name": "crush_0.55.0_Linux_x86_64.tar.gz",
|
|
70
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.55.0/crush_0.55.0_Linux_x86_64.tar.gz",
|
|
72
71
|
"bins": [
|
|
73
72
|
"crush"
|
|
74
73
|
],
|
|
75
74
|
"format": "tar.gz",
|
|
76
75
|
"checksum": {
|
|
77
76
|
"algorithm": "sha256",
|
|
78
|
-
"digest": "
|
|
77
|
+
"digest": "358b3b5ae4c627785ea913f7c51b56b953d7f1fffce0b0da6bdded2f159043ca"
|
|
79
78
|
},
|
|
80
|
-
"wrappedIn": "crush_0.
|
|
79
|
+
"wrappedIn": "crush_0.55.0_Linux_x86_64"
|
|
81
80
|
},
|
|
82
81
|
"win32-arm64": {
|
|
83
|
-
"name": "crush_0.
|
|
84
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.
|
|
82
|
+
"name": "crush_0.55.0_Windows_arm64.zip",
|
|
83
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.55.0/crush_0.55.0_Windows_arm64.zip",
|
|
85
84
|
"bins": [
|
|
86
85
|
"crush.exe"
|
|
87
86
|
],
|
|
88
87
|
"format": "zip",
|
|
89
88
|
"checksum": {
|
|
90
89
|
"algorithm": "sha256",
|
|
91
|
-
"digest": "
|
|
90
|
+
"digest": "7cc15bb2b4337abe90e419e66e2f5ff00a3320d77ae3b862517f8ef3d280c90f"
|
|
92
91
|
},
|
|
93
|
-
"wrappedIn": "crush_0.
|
|
92
|
+
"wrappedIn": "crush_0.55.0_Windows_arm64"
|
|
94
93
|
},
|
|
95
94
|
"win32-x64": {
|
|
96
|
-
"name": "crush_0.
|
|
97
|
-
"url": "https://github.com/charmbracelet/crush/releases/download/v0.
|
|
95
|
+
"name": "crush_0.55.0_Windows_x86_64.zip",
|
|
96
|
+
"url": "https://github.com/charmbracelet/crush/releases/download/v0.55.0/crush_0.55.0_Windows_x86_64.zip",
|
|
98
97
|
"bins": [
|
|
99
98
|
"crush.exe"
|
|
100
99
|
],
|
|
101
100
|
"format": "zip",
|
|
102
101
|
"checksum": {
|
|
103
102
|
"algorithm": "sha256",
|
|
104
|
-
"digest": "
|
|
103
|
+
"digest": "11f2efbee726db23ed3beaa08f5bde5c09c53cfc84c08590a6f8c072e232b0a5"
|
|
105
104
|
},
|
|
106
|
-
"wrappedIn": "crush_0.
|
|
105
|
+
"wrappedIn": "crush_0.55.0_Windows_x86_64"
|
|
107
106
|
}
|
|
108
107
|
}
|
|
109
108
|
}
|