Skip to content

Commit e9b42c5

Browse files
authored
Merge branch 'charmbracelet:main' into main
2 parents 9c6e7e0 + af86738 commit e9b42c5

File tree

614 files changed

+3307
-23465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

614 files changed

+3307
-23465
lines changed

.github/cla-signatures.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,78 @@
11751175
"created_at": "2026-02-02T19:27:08Z",
11761176
"repoId": 987670088,
11771177
"pullRequestNo": 2095
1178+
},
1179+
{
1180+
"name": "zhiquanchi",
1181+
"id": 29973289,
1182+
"comment_id": 3845838711,
1183+
"created_at": "2026-02-04T07:39:06Z",
1184+
"repoId": 987670088,
1185+
"pullRequestNo": 2112
1186+
},
1187+
{
1188+
"name": "inquam",
1189+
"id": 1265038,
1190+
"comment_id": 3849304908,
1191+
"created_at": "2026-02-04T19:22:33Z",
1192+
"repoId": 987670088,
1193+
"pullRequestNo": 2124
1194+
},
1195+
{
1196+
"name": "nickgrim",
1197+
"id": 8376,
1198+
"comment_id": 3852565144,
1199+
"created_at": "2026-02-05T10:17:46Z",
1200+
"repoId": 987670088,
1201+
"pullRequestNo": 2131
1202+
},
1203+
{
1204+
"name": "francescoalemanno",
1205+
"id": 50984334,
1206+
"comment_id": 3858464719,
1207+
"created_at": "2026-02-06T07:16:50Z",
1208+
"repoId": 987670088,
1209+
"pullRequestNo": 2142
1210+
},
1211+
{
1212+
"name": "biisal",
1213+
"id": 153633053,
1214+
"comment_id": 3866503536,
1215+
"created_at": "2026-02-08T08:15:11Z",
1216+
"repoId": 987670088,
1217+
"pullRequestNo": 2164
1218+
},
1219+
{
1220+
"name": "mishudark",
1221+
"id": 211144,
1222+
"comment_id": 3866939317,
1223+
"created_at": "2026-02-08T10:27:09Z",
1224+
"repoId": 987670088,
1225+
"pullRequestNo": 2165
1226+
},
1227+
{
1228+
"name": "portertech",
1229+
"id": 149630,
1230+
"comment_id": 3878650318,
1231+
"created_at": "2026-02-10T15:39:14Z",
1232+
"repoId": 987670088,
1233+
"pullRequestNo": 2183
1234+
},
1235+
{
1236+
"name": "wallacegibbon",
1237+
"id": 22029486,
1238+
"comment_id": 3890517245,
1239+
"created_at": "2026-02-12T11:58:04Z",
1240+
"repoId": 987670088,
1241+
"pullRequestNo": 2203
1242+
},
1243+
{
1244+
"name": "PHPCraftdream",
1245+
"id": 14233546,
1246+
"comment_id": 3893502046,
1247+
"created_at": "2026-02-12T21:34:20Z",
1248+
"repoId": 987670088,
1249+
"pullRequestNo": 2212
11781250
}
11791251
]
11801252
}

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ jobs:
88
uses: charmbracelet/meta/.github/workflows/lint.yml@main
99
with:
1010
golangci_path: .golangci.yml
11-
golangci_version: v2.4
11+
golangci_version: v2.9
1212
timeout: 10m

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
fury_token: ${{ secrets.FURY_TOKEN }}
2828
nfpm_gpg_key: ${{ secrets.NFPM_GPG_KEY }}
2929
nfpm_passphrase: ${{ secrets.NFPM_PASSPHRASE }}
30-
npm_token: ${{ secrets.NPM_TOKEN }}
3130
snapcraft_token: ${{ secrets.SNAPCRAFT_TOKEN }}
3231
aur_key: ${{ secrets.AUR_KEY }}
3332
macos_sign_p12: ${{ secrets.MACOS_SIGN_P12 }}

.github/workflows/security.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ jobs:
3030
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3131
with:
3232
persist-credentials: false
33-
- uses: github/codeql-action/init@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
33+
- uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
3434
with:
3535
languages: ${{ matrix.language }}
36-
- uses: github/codeql-action/autobuild@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
37-
- uses: github/codeql-action/analyze@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
36+
- uses: github/codeql-action/autobuild@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
37+
- uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
3838

3939
grype:
4040
runs-on: ubuntu-latest
@@ -46,13 +46,13 @@ jobs:
4646
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4747
with:
4848
persist-credentials: false
49-
- uses: anchore/scan-action@8d2fce09422cd6037e577f4130e9b925e9a37175 # v7.3.1
49+
- uses: anchore/scan-action@7037fa011853d5a11690026fb85feee79f4c946c # v7.3.2
5050
id: scan
5151
with:
5252
path: "."
5353
fail-build: true
5454
severity-cutoff: critical
55-
- uses: github/codeql-action/upload-sarif@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
55+
- uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
5656
with:
5757
sarif_file: ${{ steps.scan.outputs.sarif }}
5858

@@ -73,7 +73,7 @@ jobs:
7373
- name: Run govulncheck
7474
run: |
7575
govulncheck -C . -format sarif ./... > results.sarif
76-
- uses: github/codeql-action/upload-sarif@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
76+
- uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
7777
with:
7878
sarif_file: results.sarif
7979

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ Thumbs.db
5050
manpages/
5151
completions/crush.*sh
5252
.prettierignore
53+
.task

AGENTS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
- **Update Golden Files**: `go test ./... -update` (regenerates .golden files when test output changes)
88
- Update specific package: `go test ./internal/tui/components/core -update` (in this case, we're updating "core")
99
- **Lint**: `task lint:fix`
10-
- **Format**: `task fmt` (gofumpt -w .)
10+
- **Format**: `task fmt` (`gofumpt -w .`)
11+
- **Modernize**: `task modernize` (runs `modernize` which make code simplifications)
1112
- **Dev**: `task dev` (runs with profiling enabled)
1213

1314
## Code Style Guidelines
1415

15-
- **Imports**: Use goimports formatting, group stdlib, external, internal packages
16+
- **Imports**: Use `goimports` formatting, group stdlib, external, internal packages
1617
- **Formatting**: Use gofumpt (stricter than gofmt), enabled in golangci-lint
1718
- **Naming**: Standard Go conventions - PascalCase for exported, camelCase for unexported
1819
- **Types**: Prefer explicit types, use type aliases for clarity (e.g., `type AgentName string`)
1920
- **Error handling**: Return errors explicitly, use `fmt.Errorf` for wrapping
20-
- **Context**: Always pass context.Context as first parameter for operations
21+
- **Context**: Always pass `context.Context` as first parameter for operations
2122
- **Interfaces**: Define interfaces in consuming packages, keep them small and focused
2223
- **Structs**: Use struct embedding for composition, group related fields
2324
- **Constants**: Use typed constants with iota for enums, group in const blocks

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FSL-1.1-MIT
66

77
## Notice
88

9-
Copyright 2025 Charmbracelet, Inc
9+
Copyright 2025-2026 Charmbracelet, Inc.
1010

1111
## Terms and Conditions
1212

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,11 @@ That said, you can also set environment variables for preferred providers.
187187
| `GEMINI_API_KEY` | Google Gemini |
188188
| `SYNTHETIC_API_KEY` | Synthetic |
189189
| `ZAI_API_KEY` | Z.ai |
190+
| `MINIMAX_API_KEY` | MiniMax |
190191
| `HF_TOKEN` | Hugging Face Inference |
191192
| `CEREBRAS_API_KEY` | Cerebras |
192193
| `OPENROUTER_API_KEY` | OpenRouter |
194+
| `IONET_API_KEY` | io.net |
193195
| `GROQ_API_KEY` | Groq |
194196
| `VERTEXAI_PROJECT` | Google Cloud VertexAI (Gemini) |
195197
| `VERTEXAI_LOCATION` | Google Cloud VertexAI (Gemini) |
@@ -202,6 +204,16 @@ That said, you can also set environment variables for preferred providers.
202204
| `AZURE_OPENAI_API_KEY` | Azure OpenAI models (optional when using Entra ID) |
203205
| `AZURE_OPENAI_API_VERSION` | Azure OpenAI models |
204206

207+
### Subscriptions
208+
209+
If you prefer subscription-based usage, here are some plans that work well in
210+
Crush:
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+
205217
### By the Way
206218

207219
Is there a provider you’d like to see in Crush? Is there an existing model that needs an update?

Taskfile.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,36 @@ tasks:
4545
vars:
4646
LDFLAGS: '{{if .VERSION}}-ldflags="-X github.com/charmbracelet/crush/internal/version.Version={{.VERSION}}"{{end}}'
4747
cmds:
48-
- "go build {{if .RACE}}-race{{end}} {{.LDFLAGS}} ."
48+
- "go build -v {{if .RACE}}-race{{end}} {{.LDFLAGS}} ."
49+
sources:
50+
- ./**/*.go
51+
- go.mod
4952
generates:
50-
- crush
53+
- crush{{exeExt}}
5154

5255
run:
5356
desc: Run build
5457
cmds:
5558
- task: build
56-
- "./crush {{.CLI_ARGS}} {{if .RACE}}2>race.log{{end}}"
59+
- "./crush{{exeExt}} {{.CLI_ARGS}} {{if .RACE}}2>race.log{{end}}"
60+
61+
run:catwalk:
62+
desc: Run build with local Catwalk
63+
env:
64+
CATWALK_URL: http://localhost:8080
65+
cmds:
66+
- task: build
67+
- ./crush{{exeExt}} {{.CLI_ARGS}}
68+
69+
run:onboarding:
70+
desc: Run build with custom config to test onboarding
71+
env:
72+
CRUSH_GLOBAL_DATA: tmp/onboarding/data
73+
CRUSH_GLOBAL_CONFIG: tmp/onboarding/config
74+
cmds:
75+
- task: build
76+
- rm -rf tmp/onboarding
77+
- ./crush{exeExt} {{.CLI_ARGS}}
5778

5879
test:
5980
desc: Run tests
@@ -77,6 +98,11 @@ tasks:
7798
cmds:
7899
- prettier --write internal/cmd/stats/index.html internal/cmd/stats/index.css internal/cmd/stats/index.js
79100

101+
modernize:
102+
desc: Run modernize
103+
cmds:
104+
- go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -fix -test ./...
105+
80106
dev:
81107
desc: Run with profiling enabled
82108
env:
@@ -91,6 +117,9 @@ tasks:
91117
cmds:
92118
- task: fetch-tags
93119
- go install {{.LDFLAGS}} -v .
120+
sources:
121+
- ./**/*.go
122+
- go.mod
94123

95124
profile:cpu:
96125
desc: 10s CPU profile

0 commit comments

Comments
 (0)