@kud/ai-conventional-commit-cli 1.0.1 → 1.1.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 CHANGED
@@ -98,6 +98,9 @@ git add .
98
98
  # Generate a single commit suggestion
99
99
  ai-conventional-commit
100
100
 
101
+ # Auto-confirm without prompting (useful for automation)
102
+ ai-conventional-commit --yes
103
+
101
104
  # Propose multiple commits (interactive confirm + real selective staging)
102
105
  ai-conventional-commit split
103
106
 
@@ -160,6 +163,7 @@ Helpful flags:
160
163
 
161
164
  - `--style <standard|gitmoji|gitmoji-pure>`
162
165
  - `--model <provider/name>` (override)
166
+ - `-y, --yes` (auto-confirm without prompting)
163
167
  - `--scope <scope>` (refine)
164
168
  - `--shorter` / `--longer`
165
169
 
@@ -223,12 +227,7 @@ Resolves via cosmiconfig (JSON/YAML/etc). Example:
223
227
  "plugins": ["./src/sample-plugin/example-plugin.ts"],
224
228
  "maxTokens": 512,
225
229
  "maxFileLines": 1000,
226
- "skipFilePatterns": [
227
- "**/package-lock.json",
228
- "**/yarn.lock",
229
- "**/*.d.ts",
230
- "**/dist/**"
231
- ]
230
+ "skipFilePatterns": ["**/package-lock.json", "**/yarn.lock", "**/*.d.ts", "**/dist/**"]
232
231
  }
233
232
  ```
234
233
 
@@ -252,11 +251,12 @@ Environment overrides (prefix `AICC_`):
252
251
 
253
252
  Lowest to highest (later wins):
254
253
 
255
- 1. Built-in defaults
256
- 2. Global config file: `~/.config/ai-conventional-commit-cli/aicc.json` (or `$XDG_CONFIG_HOME`)
257
- 3. Project config (.aiccrc via cosmiconfig)
258
- 4. Environment variables (`AICC_*`)
259
- 5. CLI flags (e.g. `--model`, `--style`)
254
+ 1. Built-in defaults (`github-copilot/gpt-4.1`)
255
+ 2. `OPENCODE_FREE_MODEL` env var (ambient opencode default)
256
+ 3. Global config file: `~/.config/ai-conventional-commit-cli/aicc.json` (or `$XDG_CONFIG_HOME`)
257
+ 4. Project config (.aiccrc via cosmiconfig)
258
+ 5. Environment variables (`AICC_*`)
259
+ 6. CLI flags (e.g. `--model`, `--style`)
260
260
 
261
261
  View the resolved configuration:
262
262
 
@@ -274,7 +274,7 @@ ai-conventional-commit models --interactive --save # pick + persist globally
274
274
  ai-conventional-commit models --current # show active model + source
275
275
  ```
276
276
 
277
- `MODEL`, `PRIVACY`, `STYLE`, `STYLE_SAMPLES`, `MAX_TOKENS`, `MAX_FILE_LINES`, `VERBOSE`, `MODEL_TIMEOUT_MS`, `DEBUG`, `PRINT_LOGS`, `DEBUG_PROVIDER=mock`.
277
+ `MODEL`, `PRIVACY`, `STYLE`, `STYLE_SAMPLES`, `MAX_TOKENS`, `MAX_FILE_LINES`, `VERBOSE`, `YES`, `MODEL_TIMEOUT_MS`, `DEBUG`, `PRINT_LOGS`, `DEBUG_PROVIDER=mock`. The external `OPENCODE_FREE_MODEL` env var is also honoured as a lower-priority model default (before `AICC_MODEL`).
278
278
 
279
279
  **Note:** `skipFilePatterns` cannot be set via environment variable - use config file or accept defaults.
280
280
 
@@ -4,7 +4,7 @@ import { resolve, dirname, join } from "path";
4
4
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
5
5
  import { homedir } from "os";
6
6
  var DEFAULTS = {
7
- model: process.env.AICC_MODEL || "github-copilot/gpt-4.1",
7
+ model: process.env.AICC_MODEL || process.env.OPENCODE_FREE_MODEL || "github-copilot/gpt-4.1",
8
8
  privacy: process.env.AICC_PRIVACY || "low",
9
9
  style: process.env.AICC_STYLE || "standard",
10
10
  styleSamples: parseInt(process.env.AICC_STYLE_SAMPLES || "120", 10),
@@ -31,7 +31,8 @@ var DEFAULTS = {
31
31
  ],
32
32
  cacheDir: ".git/.aicc-cache",
33
33
  plugins: [],
34
- verbose: process.env.AICC_VERBOSE === "true"
34
+ verbose: process.env.AICC_VERBOSE === "true",
35
+ yes: process.env.AICC_YES === "true"
35
36
  };
36
37
  function getGlobalConfigPath() {
37
38
  const base = process.env.XDG_CONFIG_HOME || join(homedir(), ".config");
@@ -83,6 +84,7 @@ async function loadConfigDetailed(cwd = process.cwd()) {
83
84
  if (process.env.AICC_MAX_FILE_LINES)
84
85
  envCfg.maxFileLines = parseInt(process.env.AICC_MAX_FILE_LINES, 10);
85
86
  if (process.env.AICC_VERBOSE) envCfg.verbose = process.env.AICC_VERBOSE === "true";
87
+ if (process.env.AICC_YES) envCfg.yes = process.env.AICC_YES === "true";
86
88
  const merged = {
87
89
  ...DEFAULTS,
88
90
  ...globalCfg,
@@ -3,7 +3,7 @@ import {
3
3
  loadConfig,
4
4
  loadConfigDetailed,
5
5
  saveGlobalConfig
6
- } from "./chunk-HJR5M6U7.js";
6
+ } from "./chunk-U7UVALKR.js";
7
7
  export {
8
8
  getGlobalConfigPath,
9
9
  loadConfig,