@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.
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  loadConfig
4
- } from "./chunk-HJR5M6U7.js";
4
+ } from "./chunk-U7UVALKR.js";
5
5
  import {
6
6
  OpenCodeProvider,
7
7
  abortMessage,
@@ -323,7 +323,7 @@ async function runGenerate(config) {
323
323
  errorLines.forEach((l) => borderLine(l));
324
324
  }
325
325
  borderLine();
326
- const yn = await selectYesNo();
326
+ const yn = config.yes || await selectYesNo();
327
327
  if (!yn) {
328
328
  borderLine();
329
329
  abortMessage();
@@ -506,7 +506,7 @@ async function runSplit(config, desired) {
506
506
  }
507
507
  });
508
508
  borderLine();
509
- const ok = await select2({
509
+ const ok = config.yes || await select2({
510
510
  message: "Use the commits?",
511
511
  choices: [
512
512
  { name: "Yes", value: true },
@@ -656,7 +656,7 @@ async function runRefine(config, options) {
656
656
  titleColor: (s) => chalk3.yellow(s)
657
657
  });
658
658
  borderLine();
659
- const { ok } = await inquirer.prompt([
659
+ const ok = config.yes || (await inquirer.prompt([
660
660
  {
661
661
  type: "list",
662
662
  name: "ok",
@@ -667,7 +667,7 @@ async function runRefine(config, options) {
667
667
  ],
668
668
  default: 0
669
669
  }
670
- ]);
670
+ ])).ok;
671
671
  if (!ok) {
672
672
  borderLine();
673
673
  abortMessage();
@@ -732,10 +732,14 @@ Refine Options:
732
732
  required: false,
733
733
  description: "Model provider/name (e.g. github-copilot/gpt-4.1)"
734
734
  });
735
+ yes = Option.Boolean("-y,--yes", false, {
736
+ description: "Auto-confirm commit without prompting"
737
+ });
735
738
  async execute() {
736
739
  const config = await loadConfig();
737
740
  if (this.style) config.style = this.style;
738
741
  if (this.model) config.model = this.model;
742
+ if (this.yes) config.yes = this.yes;
739
743
  await runGenerate(config);
740
744
  }
741
745
  };
@@ -761,12 +765,16 @@ var GenerateCommand = class extends Command {
761
765
  required: false,
762
766
  description: "Model provider/name (e.g. github-copilot/gpt-4.1)"
763
767
  });
768
+ yes = Option.Boolean("-y,--yes", false, {
769
+ description: "Auto-confirm commit without prompting"
770
+ });
764
771
  async execute() {
765
772
  const config = await loadConfig();
766
773
  if (this.style) {
767
774
  config.style = this.style;
768
775
  }
769
776
  if (this.model) config.model = this.model;
777
+ if (this.yes) config.yes = this.yes;
770
778
  await runGenerate(config);
771
779
  }
772
780
  };
@@ -792,10 +800,14 @@ var SplitCommand = class extends Command {
792
800
  required: false,
793
801
  description: "Model provider/name override"
794
802
  });
803
+ yes = Option.Boolean("-y,--yes", false, {
804
+ description: "Auto-confirm commit without prompting"
805
+ });
795
806
  async execute() {
796
807
  const config = await loadConfig();
797
808
  if (this.style) config.style = this.style;
798
809
  if (this.model) config.model = this.model;
810
+ if (this.yes) config.yes = this.yes;
799
811
  await runSplit(config, this.max ? parseInt(this.max, 10) : void 0);
800
812
  }
801
813
  };
@@ -823,10 +835,14 @@ var RefineCommand = class extends Command {
823
835
  required: false,
824
836
  description: "Model provider/name override"
825
837
  });
838
+ yes = Option.Boolean("-y,--yes", false, {
839
+ description: "Auto-confirm commit without prompting"
840
+ });
826
841
  async execute() {
827
842
  const config = await loadConfig();
828
843
  if (this.style) config.style = this.style;
829
844
  if (this.model) config.model = this.model;
845
+ if (this.yes) config.yes = this.yes;
830
846
  await runRefine(config, {
831
847
  shorter: this.shorter,
832
848
  longer: this.longer,
@@ -857,7 +873,7 @@ var ModelsCommand = class extends Command {
857
873
  });
858
874
  async execute() {
859
875
  if (this.current) {
860
- const { loadConfigDetailed } = await import("./config-C3S4LWLD.js");
876
+ const { loadConfigDetailed } = await import("./config-AZDENPAB.js");
861
877
  const { config } = await loadConfigDetailed();
862
878
  this.context.stdout.write(`${config.model} (source: ${config._sources.model})
863
879
  `);
@@ -901,7 +917,7 @@ var ModelsCommand = class extends Command {
901
917
  this.context.stdout.write(model + "\n");
902
918
  if (this.save) {
903
919
  try {
904
- const { saveGlobalConfig } = await import("./config-C3S4LWLD.js");
920
+ const { saveGlobalConfig } = await import("./config-AZDENPAB.js");
905
921
  const path = saveGlobalConfig({ model });
906
922
  this.context.stdout.write(`Saved as default model in ${path}
907
923
  `);
@@ -936,7 +952,7 @@ var ConfigShowCommand = class extends Command {
936
952
  });
937
953
  json = Option.Boolean("--json", false, { description: "Output JSON including _sources" });
938
954
  async execute() {
939
- const { loadConfigDetailed } = await import("./config-C3S4LWLD.js");
955
+ const { loadConfigDetailed } = await import("./config-AZDENPAB.js");
940
956
  const { config, raw } = await loadConfigDetailed();
941
957
  if (this.json) {
942
958
  this.context.stdout.write(JSON.stringify({ config, raw }, null, 2) + "\n");
@@ -961,7 +977,7 @@ var ConfigGetCommand = class extends Command {
961
977
  key = Option.String();
962
978
  withSource = Option.Boolean("--with-source", false, { description: "Append source label" });
963
979
  async execute() {
964
- const { loadConfigDetailed } = await import("./config-C3S4LWLD.js");
980
+ const { loadConfigDetailed } = await import("./config-AZDENPAB.js");
965
981
  const { config } = await loadConfigDetailed();
966
982
  const key = this.key;
967
983
  if (!(key in config)) {
@@ -983,17 +999,18 @@ var ConfigSetCommand = class extends Command {
983
999
  static paths = [[`config`, `set`]];
984
1000
  static usage = Command.Usage({
985
1001
  description: "Set and persist a global configuration key.",
986
- details: "Writes to the global aicc.json (XDG config). Accepts JSON for complex values. Only allowed keys: model, style, privacy, styleSamples, maxTokens, verbose.",
1002
+ details: "Writes to the global aicc.json (XDG config). Accepts JSON for complex values. Only allowed keys: model, style, privacy, styleSamples, maxTokens, verbose, yes.",
987
1003
  examples: [
988
1004
  ["Set default model", "ai-conventional-commit config set model github-copilot/gpt-4.1"],
989
1005
  ["Set style to gitmoji", "ai-conventional-commit config set style gitmoji"],
990
- ["Enable verbose mode", "ai-conventional-commit config set verbose true"]
1006
+ ["Enable verbose mode", "ai-conventional-commit config set verbose true"],
1007
+ ["Auto-confirm commits", "ai-conventional-commit config set yes true"]
991
1008
  ]
992
1009
  });
993
1010
  key = Option.String();
994
1011
  value = Option.String();
995
1012
  async execute() {
996
- const allowed = /* @__PURE__ */ new Set(["model", "style", "privacy", "styleSamples", "maxTokens", "verbose"]);
1013
+ const allowed = /* @__PURE__ */ new Set(["model", "style", "privacy", "styleSamples", "maxTokens", "verbose", "yes"]);
997
1014
  if (!allowed.has(this.key)) {
998
1015
  this.context.stderr.write(`Cannot set key: ${this.key}
999
1016
  `);
@@ -1009,7 +1026,7 @@ var ConfigSetCommand = class extends Command {
1009
1026
  } catch {
1010
1027
  }
1011
1028
  }
1012
- const { saveGlobalConfig } = await import("./config-C3S4LWLD.js");
1029
+ const { saveGlobalConfig } = await import("./config-AZDENPAB.js");
1013
1030
  const path = saveGlobalConfig({ [this.key]: parsed });
1014
1031
  this.context.stdout.write(`Saved ${this.key} to ${path}
1015
1032
  `);
@@ -1029,11 +1046,15 @@ var RewordCommand = class extends Command {
1029
1046
  hash = Option.String({ required: false });
1030
1047
  style = Option.String("--style", { required: false, description: "Title style override" });
1031
1048
  model = Option.String("-m,--model", { required: false, description: "Model override" });
1049
+ yes = Option.Boolean("-y,--yes", false, {
1050
+ description: "Auto-confirm commit without prompting"
1051
+ });
1032
1052
  async execute() {
1033
- const { runReword } = await import("./reword-Q7MES34W.js");
1053
+ const { runReword } = await import("./reword-7GG233AE.js");
1034
1054
  const config = await loadConfig();
1035
1055
  if (this.style) config.style = this.style;
1036
1056
  if (this.model) config.model = this.model;
1057
+ if (this.yes) config.yes = this.yes;
1037
1058
  let target = this.hash;
1038
1059
  if (!target) {
1039
1060
  try {
@@ -115,7 +115,7 @@ async function runReword(config, hash) {
115
115
  const resolvedHash = (await git.revparse([hash])).trim();
116
116
  const headHash = (await git.revparse(["HEAD"])).trim();
117
117
  const isHead = headHash === resolvedHash || headHash.startsWith(resolvedHash);
118
- const { ok } = await inquirer.prompt([
118
+ const ok = config.yes || (await inquirer.prompt([
119
119
  {
120
120
  type: "list",
121
121
  name: "ok",
@@ -126,7 +126,7 @@ async function runReword(config, hash) {
126
126
  ],
127
127
  default: 0
128
128
  }
129
- ]);
129
+ ])).ok;
130
130
  if (!ok) {
131
131
  borderLine();
132
132
  abortMessage();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/ai-conventional-commit-cli",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
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": {