@kud/ai-conventional-commit-cli 0.12.1 → 0.12.3

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.
Files changed (3) hide show
  1. package/README.md +26 -0
  2. package/dist/index.js +5 -73
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -113,12 +113,38 @@ ai-conventional-commit refine --shorter
113
113
 
114
114
  ## Command Reference
115
115
 
116
+ ### Reword Existing Commit
117
+
118
+ Reword (improve) the message of an existing non-merge commit without touching its diff.
119
+
120
+ ```
121
+ # Interactive picker (last 20 commits)
122
+ ai-conventional-commit reword
123
+
124
+ # Reword HEAD (auto-amend)
125
+ ai-conventional-commit reword HEAD
126
+
127
+ # Reword older commit (shows interactive rebase instructions)
128
+ ai-conventional-commit reword <hash>
129
+
130
+ # With style/model overrides
131
+ ai-conventional-commit reword <hash> --style gitmoji -m github-copilot/gpt-4.1
132
+ ```
133
+
134
+ Notes:
135
+
136
+ - Merge commits (multiple parents) are rejected.
137
+ - If target is HEAD and accepted, the commit is amended in-place.
138
+ - If not HEAD, printed instructions guide you through `git rebase -i --reword`.
139
+ - Title formatting (gitmoji, normalization) matches other commands.
140
+
116
141
  | Command | Purpose |
117
142
  | ------------------------------------ | ------------------------------------------- |
118
143
  | `ai-conventional-commit` | Generate single commit suggestion (default) |
119
144
  | `ai-conventional-commit generate` | Explicit alias of root |
120
145
  | `ai-conventional-commit split` | Propose & execute multiple commits |
121
146
  | `ai-conventional-commit refine` | Refine last session (or indexed) commit |
147
+ | `ai-conventional-commit reword` | AI-assisted reword of existing commit |
122
148
  | `ai-conventional-commit models` | List / pick models, save default |
123
149
  | `ai-conventional-commit config show` | Show merged config + sources |
124
150
  | `ai-conventional-commit config get` | Get a single config value |
package/dist/index.js CHANGED
@@ -666,82 +666,14 @@ async function runRefine(config, options) {
666
666
  finalSuccess({ count: 1, startedAt });
667
667
  }
668
668
 
669
- // package.json
670
- var package_default = {
671
- name: "@kud/ai-conventional-commit-cli",
672
- version: "0.12.1",
673
- type: "module",
674
- description: "Opinionated, style-aware AI assistant for crafting and splitting git commits (opencode-based, provider-agnostic).",
675
- bin: {
676
- "ai-conventional-commit": "dist/index.js"
677
- },
678
- files: [
679
- "dist",
680
- "README.md",
681
- "LICENSE"
682
- ],
683
- scripts: {
684
- dev: "tsx src/index.ts",
685
- build: "tsup src/index.ts --format esm --dts",
686
- prepublishOnly: "npm run build",
687
- lint: "eslint .",
688
- format: "prettier --write .",
689
- test: "vitest run",
690
- "test:watch": "vitest",
691
- commit: "cz"
692
- },
693
- dependencies: {
694
- "@commitlint/config-conventional": "^19.8.1",
695
- chalk: "^5.6.2",
696
- clipanion: "^3.2.1",
697
- cosmiconfig: "^9.0.0",
698
- execa: "^9.6.0",
699
- "fast-glob": "^3.3.3",
700
- inquirer: "^12.9.4",
701
- keyv: "^5.5.1",
702
- "lru-cache": "^11.2.1",
703
- ora: "^8.2.0",
704
- pathe: "^2.0.3",
705
- "simple-git": "^3.28.0",
706
- "strip-ansi": "^7.1.2",
707
- zod: "^4.1.8"
708
- },
709
- devDependencies: {
710
- "@types/inquirer": "^9.0.9",
711
- "@types/node": "^24.3.1",
712
- "@typescript-eslint/eslint-plugin": "^8.43.0",
713
- "@typescript-eslint/parser": "^8.43.0",
714
- "cz-conventional-changelog": "^3.3.0",
715
- eslint: "^9.35.0",
716
- prettier: "^3.6.2",
717
- tsup: "^8.5.0",
718
- tsx: "^4.20.5",
719
- typescript: "^5.9.2",
720
- vitest: "^3.2.4"
721
- },
722
- config: {
723
- commitizen: {
724
- path: "cz-conventional-changelog"
725
- }
726
- },
727
- engines: {
728
- node: ">=20.0.0"
729
- },
730
- license: "MIT",
731
- repository: {
732
- type: "git",
733
- url: "git+https://github.com/kud/ai-conventional-commit-cli.git"
734
- },
735
- bugs: {
736
- url: "https://github.com/kud/ai-conventional-commit-cli/issues"
737
- },
738
- homepage: "https://github.com/kud/ai-conventional-commit-cli#readme"
739
- };
740
-
741
669
  // src/index.ts
670
+ import { readFileSync as readFileSync2 } from "fs";
671
+ import { fileURLToPath } from "url";
672
+ import { dirname, join as join4 } from "path";
742
673
  import { execa } from "execa";
743
674
  import inquirer4 from "inquirer";
744
- var pkgVersion = package_default.version || "0.0.0";
675
+ var __dirname = dirname(fileURLToPath(import.meta.url));
676
+ var pkgVersion = JSON.parse(readFileSync2(join4(__dirname, "..", "package.json"), "utf8")).version || "0.0.0";
745
677
  var RootCommand = class extends Command {
746
678
  static paths = [[]];
747
679
  static usage = Command.Usage({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/ai-conventional-commit-cli",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "type": "module",
5
5
  "description": "Opinionated, style-aware AI assistant for crafting and splitting git commits (opencode-based, provider-agnostic).",
6
6
  "bin": {