gitbasher 5.0.1 β 5.1.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/CHANGELOG.md +23 -0
- package/README.md +32 -16
- package/dist/gitb +350 -147
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to gitbasher are generated automatically by [semantic-release](https://github.com/semantic-release/semantic-release) from [Conventional Commits](https://www.conventionalcommits.org/) on `main`. The project follows [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [5.1.0](https://github.com/maxbolgarin/gitbasher/compare/v5.0.1...v5.1.0) (2026-07-03)
|
|
6
|
+
|
|
7
|
+
### π Features
|
|
8
|
+
|
|
9
|
+
* **ai:** add local Claude Code CLI (claude -p) provider ([bc3e663](https://github.com/maxbolgarin/gitbasher/commit/bc3e66341903c1ed93f7191dc6ee6840173bf13b))
|
|
10
|
+
* **config:** keep or replace an existing AI key with one keystroke ([95ba4a6](https://github.com/maxbolgarin/gitbasher/commit/95ba4a649d8ab9288cb5e73760076effce2b8ddc))
|
|
11
|
+
* **commit:** offer manual fallback when AI message generation fails ([39ac769](https://github.com/maxbolgarin/gitbasher/commit/39ac7697d6ca5063c09aa8b661c1263581e2adc3))
|
|
12
|
+
* **config:** turn gitb cfg ai into a provider/key/model setup wizard ([22795fe](https://github.com/maxbolgarin/gitbasher/commit/22795fe90980b2a6e848529eff6aa3a2939f89f5))
|
|
13
|
+
|
|
14
|
+
### π Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **ai:** move OpenRouter default models to the current generations ([82a26a0](https://github.com/maxbolgarin/gitbasher/commit/82a26a0797aafe11e71ff4e8e737830fe567b4c2))
|
|
17
|
+
* **ai:** pick default models by measured latency, speed first ([29d48b8](https://github.com/maxbolgarin/gitbasher/commit/29d48b8d21ac04bd639dee723770a2bcdae38328))
|
|
18
|
+
|
|
19
|
+
### π Documentation
|
|
20
|
+
|
|
21
|
+
* **site:** mention the claude CLI provider and the cfg ai wizard ([23c9087](https://github.com/maxbolgarin/gitbasher/commit/23c9087783b805f8ed651735304305a1163a47c3))
|
|
22
|
+
* refresh test count, document the AI fallback, mention claude on the site FAQ ([af6527d](https://github.com/maxbolgarin/gitbasher/commit/af6527d08aceb20bf75ab7a3c0fe745fe1cef16f))
|
|
23
|
+
|
|
24
|
+
### π Styles
|
|
25
|
+
|
|
26
|
+
* capitalize the Enter default in every y/n prompt ([37349a0](https://github.com/maxbolgarin/gitbasher/commit/37349a0d166b235b9b7c33dc2767e5b2093ec004))
|
|
27
|
+
|
|
5
28
|
## [5.0.1](https://github.com/maxbolgarin/gitbasher/compare/v5.0.0...v5.0.1) (2026-07-03)
|
|
6
29
|
|
|
7
30
|
### π Bug Fixes
|
package/README.md
CHANGED
|
@@ -77,7 +77,7 @@ npm install -g gitbasher
|
|
|
77
77
|
cd your-project
|
|
78
78
|
gitb # see all commands
|
|
79
79
|
gitb cfg user # set your name/email once
|
|
80
|
-
gitb cfg ai # (optional)
|
|
80
|
+
gitb cfg ai # (optional) set up AI for smart commits (provider, key, model)
|
|
81
81
|
|
|
82
82
|
gitb status # what's changed?
|
|
83
83
|
gitb commit # interactive conventional commit
|
|
@@ -111,7 +111,7 @@ Every command has a short alias (`gitb c`, `gitb p`, `gitb pu`, `gitb b`, `gitb
|
|
|
111
111
|
- **AI commit messages** β `gitb c ai` writes the message from your diff. OpenRouter (Gemini/Claude/GPT/β¦), OpenAI direct, or **fully local via Ollama** β no key, no network, no data leaves your machine.
|
|
112
112
|
- **Safer git** β push/pull detect conflicts up front, `undo` rolls back commit/amend/merge/rebase/stash, `reset` is interactive with a preview.
|
|
113
113
|
- **Whole workflows, not just commands** β `sync`, `wip`, `branch newd`, `merge to-main`, `squash` chain the steps you'd otherwise do by hand.
|
|
114
|
-
- **One file, no deps** β pure bash for every git operation; only the AI features need `jq` and `curl`. Drop the binary anywhere on `PATH` and go. **
|
|
114
|
+
- **One file, no deps** β pure bash for every git operation; only the AI features need `jq` and `curl`. Drop the binary anywhere on `PATH` and go. **900+ BATS tests** cover sanitization, git ops, and branch logic.
|
|
115
115
|
|
|
116
116
|
<p align="center">
|
|
117
117
|
<img src=".github/push.gif" width="640" alt="gitb push demo" />
|
|
@@ -216,19 +216,20 @@ Drop in an API key once (or run a local model with no key at all), then let an L
|
|
|
216
216
|
|
|
217
217
|
### Providers
|
|
218
218
|
|
|
219
|
-
gitbasher supports
|
|
219
|
+
gitbasher supports four providers. Default is `openrouter` β existing setups keep working unchanged.
|
|
220
220
|
|
|
221
221
|
| Provider | Best for | Needs key? |
|
|
222
222
|
|----------|----------|-----------|
|
|
223
223
|
| `openrouter` (default) | Trying many models behind one key (Gemini, Claude, GPT, DeepSeekβ¦) | Yes β [openrouter.ai/keys](https://openrouter.ai/keys) |
|
|
224
224
|
| `openai` | Direct access to GPT-5.4 family at OpenAI's own pricing | Yes β [platform.openai.com/api-keys](https://platform.openai.com/api-keys) |
|
|
225
225
|
| `ollama` | **Fully local, fully private** β no key, no network, runs on your machine | No |
|
|
226
|
+
| `claude` | You already use [Claude Code](https://claude.com/claude-code) β reuses the local `claude` CLI and its login, billed to your Claude account | No |
|
|
226
227
|
|
|
227
228
|
### Setup
|
|
228
229
|
|
|
229
230
|
```bash
|
|
230
231
|
# 1. Pick a provider (skip to use the OpenRouter default)
|
|
231
|
-
gitb cfg provider # interactive β choose openrouter, openai, or
|
|
232
|
+
gitb cfg provider # interactive β choose openrouter, openai, ollama, or claude
|
|
232
233
|
|
|
233
234
|
# 2. For openrouter / openai: paste your key (local repo or global)
|
|
234
235
|
gitb cfg ai
|
|
@@ -237,6 +238,9 @@ gitb cfg ai
|
|
|
237
238
|
ollama serve &
|
|
238
239
|
ollama pull qwen3:8b
|
|
239
240
|
|
|
241
|
+
# For claude: just have the Claude Code CLI installed and signed in
|
|
242
|
+
npm install -g @anthropic-ai/claude-code
|
|
243
|
+
|
|
240
244
|
# 3. Optional: HTTP proxy (for restricted regions, openrouter/openai only)
|
|
241
245
|
gitb cfg proxy
|
|
242
246
|
```
|
|
@@ -255,18 +259,18 @@ Each task uses a model tuned for speed/cost/quality, picked per provider. Defaul
|
|
|
255
259
|
|
|
256
260
|
| Task | Default model | Why |
|
|
257
261
|
|------|---------------|-----|
|
|
258
|
-
| `simple` (one-line message) | `google/gemini-3.1-flash-lite
|
|
259
|
-
| `subject` (after manual type/scope) | `google/gemini-3.1-flash-lite
|
|
260
|
-
| `full` (header + body) | `google/gemini-3-flash
|
|
261
|
-
| `grouping` (atomic-split mapping) | `
|
|
262
|
+
| `simple` (one-line message) | `google/gemini-3.1-flash-lite` | Fastest model measured (~0.6s), cheapest |
|
|
263
|
+
| `subject` (after manual type/scope) | `google/gemini-3.1-flash-lite` | Short structured output, instant |
|
|
264
|
+
| `full` (header + body) | `google/gemini-3.5-flash` | Same speed class, better prose |
|
|
265
|
+
| `grouping` (atomic-split mapping) | `google/gemini-3.5-flash` | Fast + strict structured output |
|
|
262
266
|
|
|
263
267
|
**OpenAI** β GPT-5.4 family (released March 2026)
|
|
264
268
|
|
|
265
269
|
| Task | Default model | Why |
|
|
266
270
|
|------|---------------|-----|
|
|
267
|
-
|
|
|
268
|
-
|
|
269
|
-
|
|
271
|
+
| All tasks | `gpt-5.4-mini` | Measured as fast as nano (~0.8s) with strictly better quality, ~$0.75 / $4.50 per M |
|
|
272
|
+
|
|
273
|
+
`gpt-5.4-nano` (~$0.20 / $1.25 per M) remains a good budget override for high-volume use.
|
|
270
274
|
|
|
271
275
|
**Ollama** β fully local
|
|
272
276
|
|
|
@@ -276,6 +280,15 @@ Each task uses a model tuned for speed/cost/quality, picked per provider. Defaul
|
|
|
276
280
|
|
|
277
281
|
Other strong local picks: `llama3.3:8b` (general-purpose), `qwen2.5-coder:7b` (code-heavy diffs).
|
|
278
282
|
|
|
283
|
+
**Claude Code CLI** β local `claude -p`
|
|
284
|
+
|
|
285
|
+
| Task | Default model | Why |
|
|
286
|
+
|------|---------------|-----|
|
|
287
|
+
| `simple` / `subject` | `haiku` | Fastest and cheapest for one-line output |
|
|
288
|
+
| `full` / `grouping` | `sonnet` | Better prose and strict structured output |
|
|
289
|
+
|
|
290
|
+
The alias slugs (`haiku`, `sonnet`, `opus`) always resolve to the current model generation; full ids like `claude-haiku-4-5` work too.
|
|
291
|
+
|
|
279
292
|
Override per task or globally:
|
|
280
293
|
```bash
|
|
281
294
|
gitb cfg model # interactive
|
|
@@ -807,8 +820,9 @@ gitb origin remove # delete the remote
|
|
|
807
820
|
| `editor` | `ed` `e` | Commit-message editor |
|
|
808
821
|
| `ticket` | `ti` `t` `jira` | Ticket prefix for commits/branches |
|
|
809
822
|
| `scopes` | `sc` `s` | Common scopes |
|
|
810
|
-
| `ai` | `llm`
|
|
811
|
-
| `
|
|
823
|
+
| `ai` | `llm` | AI setup wizard: provider, API key, model |
|
|
824
|
+
| `key` | | AI API key only |
|
|
825
|
+
| `provider` | `prov` | AI provider (openrouter, openai, ollama, claude) |
|
|
812
826
|
| `model` | `m` | Default AI model |
|
|
813
827
|
| `proxy` | `prx` `p` | HTTP proxy for AI calls |
|
|
814
828
|
| `history` | `hist` | How many recent commits to include in AI prompts |
|
|
@@ -889,12 +903,12 @@ Overview-first diffs built for the gitbasher workflow β no flag memorization.
|
|
|
889
903
|
| `gitbasher.ticket` | `gitb cfg ticket` | Ticket prefix (`PROJ-`) |
|
|
890
904
|
| `gitbasher.scopes` | `gitb cfg scopes` | Suggested commit scopes |
|
|
891
905
|
| `gitbasher.ai-api-key-<provider>` | `gitb cfg ai` | Per-provider AI API key (or `GITB_AI_API_KEY_<PROVIDER>` env); legacy `gitbasher.ai-api-key` is read as a fallback |
|
|
892
|
-
| `gitbasher.ai-provider` | `gitb cfg provider` | `openrouter` (default), `openai`, or `
|
|
906
|
+
| `gitbasher.ai-provider` | `gitb cfg provider` | `openrouter` (default), `openai`, `ollama`, or `claude` |
|
|
893
907
|
| `gitbasher.ai-base-url` | `git config` | Custom OpenAI-compatible endpoint (LiteLLM, vLLM, remote Ollama) |
|
|
894
908
|
| `gitbasher.ai-model[-task]` | `gitb cfg model` | AI model overrides (per provider) |
|
|
895
909
|
| `gitbasher.ai-proxy` | `gitb cfg proxy` | HTTP proxy for AI calls |
|
|
896
910
|
| `gitbasher.ai-ollama-host` | `git config gitbasher.ai-ollama-host <url>` | Ollama server URL (default `http://localhost:11434`) |
|
|
897
|
-
| `gitbasher.ai-timeout` | `git config gitbasher.ai-timeout <seconds>` | AI request timeout in seconds (default `60`, `300` for ollama) |
|
|
911
|
+
| `gitbasher.ai-timeout` | `git config gitbasher.ai-timeout <seconds>` | AI request timeout in seconds (default `60`, `300` for ollama/claude) |
|
|
898
912
|
| `gitbasher.ai-diff-limit` | `gitb cfg diff` | Diff lines sent to AI (default `300`) |
|
|
899
913
|
| `gitbasher.ai-diff-max-chars` | `gitb cfg diff` | Character cap on the diff sent to AI (default `20000`) |
|
|
900
914
|
| `gitbasher.ai-commit-history-limit` | `gitb cfg history` | Recent commits included in AI prompts (default `10`) |
|
|
@@ -998,9 +1012,11 @@ gitb cfg proxy # in restricted regions
|
|
|
998
1012
|
If `gitb commit ai` hangs, returns `connection refused`, or times out:
|
|
999
1013
|
|
|
1000
1014
|
- **jq missing** β all AI features require `jq` (check with `command -v jq`; install via `brew install jq` / `apt install jq`). Without it every AI command aborts with an install hint.
|
|
1015
|
+
- **Generation failed mid-commit?** gitbasher offers to continue with a manual commit message (staging is preserved) β press Enter to accept and write it yourself, or `n` to abort.
|
|
1001
1016
|
- **Network reachability** β test the provider directly: `curl -fsSL https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY"` (or the equivalent for OpenRouter/Ollama). If that fails, gitbasher will too.
|
|
1002
1017
|
- **Corporate proxy / restricted region** β `gitb cfg proxy` accepts `host:port` or `protocol://host:port`. Verify with `curl -x "$proxy" https://api.openai.com`.
|
|
1003
1018
|
- **Local Ollama** β confirm the daemon is running (`curl http://localhost:11434/api/tags`). The default model must be pulled first (`ollama pull qwen3:8b`).
|
|
1019
|
+
- **Claude Code CLI** β confirm it responds (`echo hi | claude -p`); you may need to sign in first. Install with `npm install -g @anthropic-ai/claude-code`.
|
|
1004
1020
|
- **Stale or rotated key** β `gitb cfg ai` re-prompts; prefer the env-var path (`export GITB_AI_API_KEY_OPENAI=...`) over `git config` so a leaked repo doesn't carry the secret.
|
|
1005
1021
|
</details>
|
|
1006
1022
|
|
|
@@ -1079,7 +1095,7 @@ PRs welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for the dev setup, BATS te
|
|
|
1079
1095
|
|
|
1080
1096
|
```bash
|
|
1081
1097
|
make build # rebuild dist/gitb
|
|
1082
|
-
make test # run all
|
|
1098
|
+
make test # run all 900+ tests
|
|
1083
1099
|
make test-file FILE=test_sanitization.bats
|
|
1084
1100
|
```
|
|
1085
1101
|
|