@jakejarvis/acai 0.3.0 → 0.3.1
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 +11 -11
- package/dist/cli.mjs +17 -2
- package/package.json +28 -24
package/README.md
CHANGED
|
@@ -19,21 +19,21 @@ AI-generated commit messages that match your repo's existing style. Powered by [
|
|
|
19
19
|
- [Node.js](https://nodejs.org) runtime
|
|
20
20
|
- At least one of the following CLIs installed and signed in:
|
|
21
21
|
|
|
22
|
-
| Provider
|
|
23
|
-
|
|
22
|
+
| Provider | Install |
|
|
23
|
+
| ----------------------------------------------------------------- | ------------------------------------------------- |
|
|
24
24
|
| [Claude Code](https://code.claude.com/docs/en/overview) (default) | `curl -fsSL https://claude.ai/install.sh \| bash` |
|
|
25
|
-
| [Codex](https://github.com/openai/codex)
|
|
25
|
+
| [Codex](https://github.com/openai/codex) | `npm i -g @openai/codex` |
|
|
26
26
|
|
|
27
27
|
## Options
|
|
28
28
|
|
|
29
|
-
| Flag
|
|
30
|
-
|
|
31
|
-
| `-p, --provider`
|
|
32
|
-
| `--claude, --codex` | `ACAI_PROVIDER` | `claude`
|
|
33
|
-
| `-m, --model`
|
|
34
|
-
| `-y, --yolo`
|
|
35
|
-
| `-V, --verbose`
|
|
36
|
-
| `-v, --version`
|
|
29
|
+
| Flag | Env var | Default | Description |
|
|
30
|
+
| ------------------- | --------------- | -------------------------- | ---------------------------------------------------- |
|
|
31
|
+
| `-p, --provider` | `ACAI_PROVIDER` | `claude` | AI provider (`claude`, `codex`) |
|
|
32
|
+
| `--claude, --codex` | `ACAI_PROVIDER` | `claude` | Shorthand for `--provider <name>` |
|
|
33
|
+
| `-m, --model` | `ACAI_MODEL` | `sonnet` or `gpt-5.4-mini` | Model override |
|
|
34
|
+
| `-y, --yolo` | — | `false` | Stage all changes and commit without confirmation |
|
|
35
|
+
| `-V, --verbose` | — | `false` | Print prompts sent to the provider and raw responses |
|
|
36
|
+
| `-v, --version` | — | — | Show version number |
|
|
37
37
|
|
|
38
38
|
## Usage
|
|
39
39
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1879,6 +1879,14 @@ function buildUserPrompt(diff, stat, files) {
|
|
|
1879
1879
|
].join("\n");
|
|
1880
1880
|
}
|
|
1881
1881
|
/**
|
|
1882
|
+
* Normalize commit message formatting: ensure a blank line between subject and body.
|
|
1883
|
+
*/
|
|
1884
|
+
function normalizeCommitMessage(message) {
|
|
1885
|
+
const lines = message.split("\n");
|
|
1886
|
+
if (lines.length > 1 && lines[1].trim() !== "") lines.splice(1, 0, "");
|
|
1887
|
+
return lines.join("\n");
|
|
1888
|
+
}
|
|
1889
|
+
/**
|
|
1882
1890
|
* Truncate plain text to a character limit.
|
|
1883
1891
|
*/
|
|
1884
1892
|
function truncate(text, maxChars) {
|
|
@@ -1929,6 +1937,12 @@ const providers = {
|
|
|
1929
1937
|
systemPrompt,
|
|
1930
1938
|
model: opts.model,
|
|
1931
1939
|
tools: [],
|
|
1940
|
+
settingSources: [],
|
|
1941
|
+
settings: {
|
|
1942
|
+
allowedMcpServers: [],
|
|
1943
|
+
enableAllProjectMcpServers: false
|
|
1944
|
+
},
|
|
1945
|
+
mcpServers: {},
|
|
1932
1946
|
permissionMode: "bypassPermissions",
|
|
1933
1947
|
allowDangerouslySkipPermissions: true,
|
|
1934
1948
|
persistSession: false,
|
|
@@ -1975,7 +1989,8 @@ const providers = {
|
|
|
1975
1989
|
const { events } = await new Codex({ config: {
|
|
1976
1990
|
developer_instructions: systemPrompt,
|
|
1977
1991
|
model_reasoning_effort: "medium",
|
|
1978
|
-
check_for_update_on_startup: false
|
|
1992
|
+
check_for_update_on_startup: false,
|
|
1993
|
+
mcp_servers: {}
|
|
1979
1994
|
} }).startThread({
|
|
1980
1995
|
model: opts.model,
|
|
1981
1996
|
sandboxMode: "read-only",
|
|
@@ -2340,7 +2355,7 @@ async function main() {
|
|
|
2340
2355
|
}
|
|
2341
2356
|
process.stderr.write(`\n${BAR}\n`);
|
|
2342
2357
|
if (firstToken) s.stop("No response");
|
|
2343
|
-
message = fullText.trim();
|
|
2358
|
+
message = normalizeCommitMessage(fullText.trim());
|
|
2344
2359
|
} catch (e) {
|
|
2345
2360
|
if (firstToken) s.stop("Failed");
|
|
2346
2361
|
Nt(`Generation failed: ${e.message}`);
|
package/package.json
CHANGED
|
@@ -1,59 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jakejarvis/acai",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"license": "MIT",
|
|
3
|
+
"version": "0.3.1",
|
|
5
4
|
"description": "Yet another AI commit message generator",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"claude",
|
|
8
|
+
"codex",
|
|
9
|
+
"commit",
|
|
10
|
+
"git"
|
|
11
|
+
],
|
|
10
12
|
"bugs": {
|
|
11
13
|
"url": "https://github.com/jakejarvis/acai/issues"
|
|
12
14
|
},
|
|
15
|
+
"license": "MIT",
|
|
13
16
|
"author": {
|
|
14
17
|
"name": "Jake Jarvis",
|
|
15
18
|
"email": "jake@jarv.is",
|
|
16
19
|
"url": "https://jarv.is"
|
|
17
20
|
},
|
|
18
|
-
"
|
|
19
|
-
"
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/jakejarvis/acai.git"
|
|
20
24
|
},
|
|
21
|
-
"type": "module",
|
|
22
25
|
"bin": {
|
|
23
26
|
"acai": "dist/cli.mjs"
|
|
24
27
|
},
|
|
25
28
|
"files": [
|
|
26
29
|
"dist"
|
|
27
30
|
],
|
|
31
|
+
"type": "module",
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
28
35
|
"scripts": {
|
|
29
36
|
"build": "tsdown",
|
|
30
|
-
"lint": "
|
|
31
|
-
"
|
|
37
|
+
"lint": "oxlint",
|
|
38
|
+
"lint:fix": "oxlint --fix",
|
|
39
|
+
"fmt": "oxfmt",
|
|
40
|
+
"fmt:check": "oxfmt --check",
|
|
32
41
|
"check-types": "tsc --noEmit",
|
|
42
|
+
"test": "vitest run",
|
|
33
43
|
"prepack": "npm run build"
|
|
34
44
|
},
|
|
35
45
|
"dependencies": {
|
|
36
|
-
"@anthropic-ai/claude-agent-sdk": "^0.2.
|
|
37
|
-
"@openai/codex-sdk": "^0.
|
|
38
|
-
"zod": "^4.3.6"
|
|
46
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.87",
|
|
47
|
+
"@openai/codex-sdk": "^0.117.0"
|
|
39
48
|
},
|
|
40
49
|
"devDependencies": {
|
|
41
|
-
"@biomejs/biome": "2.4.8",
|
|
42
50
|
"@clack/prompts": "1.1.0",
|
|
43
51
|
"@types/node": "^25.5.0",
|
|
52
|
+
"oxfmt": "^0.42.0",
|
|
53
|
+
"oxlint": "^1.57.0",
|
|
44
54
|
"picocolors": "1.1.1",
|
|
45
55
|
"tinyexec": "1.0.4",
|
|
46
56
|
"tsdown": "0.21.4",
|
|
47
|
-
"typescript": "^5.9.3"
|
|
57
|
+
"typescript": "^5.9.3",
|
|
58
|
+
"vitest": "^4.1.2"
|
|
48
59
|
},
|
|
49
60
|
"engines": {
|
|
50
61
|
"node": ">=18.19"
|
|
51
|
-
}
|
|
52
|
-
"keywords": [
|
|
53
|
-
"git",
|
|
54
|
-
"commit",
|
|
55
|
-
"ai",
|
|
56
|
-
"claude",
|
|
57
|
-
"codex"
|
|
58
|
-
]
|
|
62
|
+
}
|
|
59
63
|
}
|