@thankarezos/git-ai-commit 0.1.4 → 0.1.6
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 +17 -4
- package/bin/presets.js +2 -2
- package/bin/prompts.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ Stored at `~/.config/git-aic/config.json` (override with `GIT_AIC_CONFIG=/path/t
|
|
|
70
70
|
{
|
|
71
71
|
"provider": {
|
|
72
72
|
"command": "claude",
|
|
73
|
-
"args": ["-p", "{prompt}"]
|
|
73
|
+
"args": ["-p", "--no-session-persistence", "{prompt}"]
|
|
74
74
|
},
|
|
75
75
|
"editor": "nano",
|
|
76
76
|
"commit": true,
|
|
@@ -99,9 +99,9 @@ Each field in your user config **replaces** the default if present. If you delet
|
|
|
99
99
|
|
|
100
100
|
The wizard ships with presets for:
|
|
101
101
|
|
|
102
|
-
- **Claude Code** — `claude -p "{prompt}"` (reads diff from stdin)
|
|
102
|
+
- **Claude Code** — `claude -p --no-session-persistence "{prompt}"` (reads diff from stdin)
|
|
103
103
|
- **Antigravity CLI** — `agy -p "{prompt}"`
|
|
104
|
-
- **Codex CLI** — `codex exec --skip-git-repo-check "{prompt}"`
|
|
104
|
+
- **Codex CLI** — `codex exec --skip-git-repo-check --ephemeral "{prompt}"`
|
|
105
105
|
- **OpenCode** — `opencode run "{prompt}"`
|
|
106
106
|
- **llm** (Simon Willison) — `llm "{prompt}"`
|
|
107
107
|
- **Ollama** — `ollama run llama3 "{prompt}"`
|
|
@@ -109,6 +109,17 @@ The wizard ships with presets for:
|
|
|
109
109
|
|
|
110
110
|
You can edit `provider` in the config file at any time, or rerun `git aic --init`.
|
|
111
111
|
|
|
112
|
+
### Avoiding leftover sessions
|
|
113
|
+
|
|
114
|
+
Agent CLIs like Claude Code and Codex save every run as a conversation by default, so each generated commit message would show up in `claude --resume` / `codex resume`. The presets turn this off with `--no-session-persistence` (Claude Code) and `--ephemeral` (Codex). If you use a custom provider built on one of these CLIs, add the flag to its `args` yourself.
|
|
115
|
+
|
|
116
|
+
### Upgrading from 0.1.5 or earlier
|
|
117
|
+
|
|
118
|
+
Updating the package does not change your existing config. Either rerun `git aic --init` and choose to overwrite (this resets any customizations), or edit `~/.config/git-aic/config.json` by hand:
|
|
119
|
+
|
|
120
|
+
- Add `"--no-session-persistence"` to `provider.args` for `claude`, or `"--ephemeral"` for `codex exec`.
|
|
121
|
+
- In `removeLinesMatching`, replace `"Claude"` and `"Anthropic"` with `"Generated (with|by).*(Claude|Anthropic)"` and `"noreply@anthropic\\.com"`. The old patterns removed *any* line mentioning Claude or Anthropic, including your commit subject.
|
|
122
|
+
|
|
112
123
|
### Windows note
|
|
113
124
|
|
|
114
125
|
Most CLIs work the same on Windows. The exception is a CLI that renders its output to the console instead of stdout (like `agy`): to capture it, `git-aic` must spawn it with no console, which briefly flashes a console window. A provider can opt into this with a `windows` field carrying extra spawn options:
|
|
@@ -125,7 +136,7 @@ CLIs that write to stdout (e.g. `claude`) don't need this and run without any wi
|
|
|
125
136
|
|
|
126
137
|
## Customizing the prompt
|
|
127
138
|
|
|
128
|
-
|
|
139
|
+
`git aic --init` copies the prompt template, the `<commit_message>` tag, and the cleanup patterns into your **config file** (run `git aic --config` to see its path and contents). Edit the config file to customize them — these values override the built-in defaults:
|
|
129
140
|
|
|
130
141
|
- Change tone, rules, or allowed Conventional Commit types in `prompt`.
|
|
131
142
|
- Add line patterns to `removeLinesMatching` to strip more AI boilerplate.
|
|
@@ -133,6 +144,8 @@ The base prompt template, the `<commit_message>` tag, and the cleanup patterns l
|
|
|
133
144
|
|
|
134
145
|
Patterns are case-insensitive JS regex strings.
|
|
135
146
|
|
|
147
|
+
The built-in defaults live in `bin/prompts.json`; editing that only changes the fallback for fields your config doesn't set, and is overwritten on reinstall — so prefer the config file.
|
|
148
|
+
|
|
136
149
|
## Tests
|
|
137
150
|
|
|
138
151
|
```sh
|
package/bin/presets.js
CHANGED
|
@@ -2,7 +2,7 @@ export const PROVIDER_PRESETS = [
|
|
|
2
2
|
{
|
|
3
3
|
name: "Claude Code",
|
|
4
4
|
command: "claude",
|
|
5
|
-
args: ["-p", "{prompt}"]
|
|
5
|
+
args: ["-p", "--no-session-persistence", "{prompt}"]
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
name: "Antigravity CLI",
|
|
@@ -16,7 +16,7 @@ export const PROVIDER_PRESETS = [
|
|
|
16
16
|
{
|
|
17
17
|
name: "Codex CLI",
|
|
18
18
|
command: "codex",
|
|
19
|
-
args: ["exec", "--skip-git-repo-check", "{prompt}"]
|
|
19
|
+
args: ["exec", "--skip-git-repo-check", "--ephemeral", "{prompt}"]
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
name: "OpenCode",
|
package/bin/prompts.json
CHANGED