claudekit-cli 3.1.0 → 3.2.0

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/index.js +52 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13031,7 +13031,7 @@ var cac = (name = "") => new CAC(name);
13031
13031
  // package.json
13032
13032
  var package_default = {
13033
13033
  name: "claudekit-cli",
13034
- version: "3.1.0",
13034
+ version: "3.2.0",
13035
13035
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
13036
13036
  type: "module",
13037
13037
  repository: {
@@ -29435,6 +29435,28 @@ class PromptsManager {
29435
29435
  }
29436
29436
  return updateEverything;
29437
29437
  }
29438
+ async promptLocalMigration() {
29439
+ const result = await ie({
29440
+ message: "Local ClaudeKit installation detected. Local settings take precedence over global.",
29441
+ options: [
29442
+ {
29443
+ value: "remove",
29444
+ label: "Remove local installation",
29445
+ hint: "Delete .claude/ and use global only"
29446
+ },
29447
+ {
29448
+ value: "keep",
29449
+ label: "Keep both installations",
29450
+ hint: "Local will take precedence"
29451
+ },
29452
+ { value: "cancel", label: "Cancel", hint: "Abort global installation" }
29453
+ ]
29454
+ });
29455
+ if (lD(result)) {
29456
+ return "cancel";
29457
+ }
29458
+ return result;
29459
+ }
29438
29460
  async promptDirectorySelection(global3 = false) {
29439
29461
  f2.step("Select directories to update");
29440
29462
  const prefix = PathResolver.getPathPrefix(global3);
@@ -30950,6 +30972,34 @@ async function initCommand(options) {
30950
30972
  logger.info("Global mode enabled - using platform-specific user configuration");
30951
30973
  }
30952
30974
  const isNonInteractive2 = !process.stdin.isTTY || process.env.CI === "true" || process.env.NON_INTERACTIVE === "true";
30975
+ if (validOptions.global) {
30976
+ const localSettingsPath = join24(process.cwd(), ".claude", "settings.json");
30977
+ if (await import_fs_extra16.pathExists(localSettingsPath)) {
30978
+ if (isNonInteractive2) {
30979
+ logger.warning("Local .claude/settings.json detected. Local settings take precedence over global.");
30980
+ logger.warning("Consider removing local installation: rm -rf .claude");
30981
+ } else {
30982
+ const choice = await prompts.promptLocalMigration();
30983
+ if (choice === "cancel") {
30984
+ prompts.outro("Installation cancelled.");
30985
+ return;
30986
+ }
30987
+ if (choice === "remove") {
30988
+ const localClaudeDir = join24(process.cwd(), ".claude");
30989
+ try {
30990
+ await import_fs_extra16.remove(localClaudeDir);
30991
+ logger.success("Removed local .claude/ directory");
30992
+ } catch (error2) {
30993
+ logger.error(`Failed to remove local installation: ${error2 instanceof Error ? error2.message : "Unknown error"}`);
30994
+ logger.warning("Proceeding with global installation anyway.");
30995
+ }
30996
+ }
30997
+ if (choice === "keep") {
30998
+ logger.warning("Proceeding with global installation. Local settings will take precedence.");
30999
+ }
31000
+ }
31001
+ }
31002
+ }
30953
31003
  const config = await ConfigManager.get();
30954
31004
  let kit = validOptions.kit || config.defaults?.kit;
30955
31005
  if (!kit) {
@@ -31725,7 +31775,7 @@ import { promisify as promisify6 } from "node:util";
31725
31775
  // package.json
31726
31776
  var package_default2 = {
31727
31777
  name: "claudekit-cli",
31728
- version: "3.1.0",
31778
+ version: "3.2.0",
31729
31779
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
31730
31780
  type: "module",
31731
31781
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudekit-cli",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "CLI tool for bootstrapping and updating ClaudeKit projects",
5
5
  "type": "module",
6
6
  "repository": {