chiefwiggum 1.3.10 → 1.3.11

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 (2) hide show
  1. package/dist/cli.cjs +54 -7
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -29,8 +29,8 @@ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
29
29
 
30
30
  // src/cli.ts
31
31
  var import_commander = require("commander");
32
- var import_picocolors9 = __toESM(require("picocolors"), 1);
33
- var import_node_fs5 = require("fs");
32
+ var import_picocolors10 = __toESM(require("picocolors"), 1);
33
+ var import_node_fs6 = require("fs");
34
34
  var import_node_path3 = require("path");
35
35
  var import_node_url2 = require("url");
36
36
 
@@ -883,12 +883,55 @@ async function cmdClean() {
883
883
  console.log(import_picocolors8.default.green("Clean complete."));
884
884
  }
885
885
 
886
+ // src/commands/config.ts
887
+ var import_node_fs5 = require("fs");
888
+ var import_picocolors9 = __toESM(require("picocolors"), 1);
889
+ var CONFIG_FILE2 = ".chiefwiggum/CLAUDE.md";
890
+ function getConfig() {
891
+ if (!(0, import_node_fs5.existsSync)(CONFIG_FILE2)) {
892
+ return { tracker: "todo" };
893
+ }
894
+ try {
895
+ return JSON.parse((0, import_node_fs5.readFileSync)(CONFIG_FILE2, "utf-8"));
896
+ } catch {
897
+ return { tracker: "todo" };
898
+ }
899
+ }
900
+ function saveConfig(config2) {
901
+ (0, import_node_fs5.mkdirSync)(".chiefwiggum", { recursive: true });
902
+ (0, import_node_fs5.writeFileSync)(CONFIG_FILE2, JSON.stringify(config2, null, 2) + "\n");
903
+ }
904
+ async function cmdConfig() {
905
+ console.log(import_picocolors9.default.bold("Configuration"));
906
+ console.log();
907
+ const config2 = getConfig();
908
+ console.log(`Current tracker: ${import_picocolors9.default.cyan(config2.tracker)}`);
909
+ console.log();
910
+ const newTracker = await select2({
911
+ message: "Project tracker",
912
+ options: [
913
+ { value: "github", label: "GitHub Issues", hint: "Track tasks as GitHub Issues" },
914
+ { value: "todo", label: "TODO.md", hint: "Track tasks in local TODO.md file" }
915
+ ],
916
+ initialValue: config2.tracker
917
+ });
918
+ if (newTracker !== config2.tracker) {
919
+ config2.tracker = newTracker;
920
+ saveConfig(config2);
921
+ console.log();
922
+ console.log(import_picocolors9.default.green(`\u2713 Tracker changed to ${newTracker}`));
923
+ } else {
924
+ console.log();
925
+ console.log(import_picocolors9.default.dim("No changes made."));
926
+ }
927
+ }
928
+
886
929
  // src/cli.ts
887
930
  var __dirname2 = (0, import_node_path3.dirname)((0, import_node_url2.fileURLToPath)(importMetaUrl));
888
931
  function getVersion() {
889
932
  try {
890
933
  const pkgPath = (0, import_node_path3.join)(__dirname2, "..", "package.json");
891
- const pkg = JSON.parse((0, import_node_fs5.readFileSync)(pkgPath, "utf-8"));
934
+ const pkg = JSON.parse((0, import_node_fs6.readFileSync)(pkgPath, "utf-8"));
892
935
  return pkg.version || "dev";
893
936
  } catch {
894
937
  return "dev";
@@ -915,19 +958,23 @@ async function main() {
915
958
  await showBanner(version);
916
959
  await cmdClean();
917
960
  });
961
+ program.command("config").description("Change project settings (tracker, etc.)").action(async () => {
962
+ await showBanner(version);
963
+ await cmdConfig();
964
+ });
918
965
  program.action(async () => {
919
966
  await showBanner(version);
920
- const { existsSync: existsSync5 } = await import("fs");
921
- if (existsSync5("TODO.md")) {
967
+ const { existsSync: existsSync6 } = await import("fs");
968
+ if (existsSync6("TODO.md")) {
922
969
  await cmdLoop();
923
970
  } else {
924
- console.log(import_picocolors9.default.yellow("No TODO.md found. Run 'chiefwiggum new' to get started."));
971
+ console.log(import_picocolors10.default.yellow("No TODO.md found. Run 'chiefwiggum new' to get started."));
925
972
  process.exit(1);
926
973
  }
927
974
  });
928
975
  await program.parseAsync();
929
976
  }
930
977
  main().catch((err) => {
931
- console.error(import_picocolors9.default.red("Error:"), err.message);
978
+ console.error(import_picocolors10.default.red("Error:"), err.message);
932
979
  process.exit(1);
933
980
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chiefwiggum",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "Autonomous coding agent CLI. Point it at a plan, watch it build.",
5
5
  "type": "module",
6
6
  "bin": {