coding-friend-cli 1.4.0 → 1.5.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.
@@ -0,0 +1,77 @@
1
+ import {
2
+ ALL_COMPONENT_IDS,
3
+ STATUSLINE_COMPONENTS
4
+ } from "./chunk-JWAJ4XPK.js";
5
+ import {
6
+ claudeSettingsPath,
7
+ globalConfigPath,
8
+ pluginCachePath
9
+ } from "./chunk-WHCJT7E2.js";
10
+ import {
11
+ mergeJson,
12
+ readJson,
13
+ writeJson
14
+ } from "./chunk-IUTXHCP7.js";
15
+
16
+ // src/lib/statusline.ts
17
+ import { existsSync, readdirSync } from "fs";
18
+ import { checkbox } from "@inquirer/prompts";
19
+ function findLatestVersion() {
20
+ const cachePath = pluginCachePath();
21
+ if (!existsSync(cachePath)) return null;
22
+ const versions = readdirSync(cachePath, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort().reverse();
23
+ return versions[0] ?? null;
24
+ }
25
+ function findStatuslineHookPath() {
26
+ const version = findLatestVersion();
27
+ if (!version) return null;
28
+ const hookPath = `${pluginCachePath()}/${version}/hooks/statusline.sh`;
29
+ if (!existsSync(hookPath)) return null;
30
+ return { hookPath, version };
31
+ }
32
+ function loadStatuslineComponents() {
33
+ const config = readJson(globalConfigPath());
34
+ const components = config?.statusline?.components;
35
+ if (!components) return ALL_COMPONENT_IDS;
36
+ return components.filter(
37
+ (c) => ALL_COMPONENT_IDS.includes(c)
38
+ );
39
+ }
40
+ async function selectStatuslineComponents(current) {
41
+ const enabled = current ?? loadStatuslineComponents();
42
+ const selected = await checkbox({
43
+ message: "Which components to show in the statusline?",
44
+ choices: STATUSLINE_COMPONENTS.map((c) => ({
45
+ name: c.label,
46
+ value: c.id,
47
+ checked: enabled.includes(c.id)
48
+ }))
49
+ });
50
+ return selected;
51
+ }
52
+ function saveStatuslineConfig(components) {
53
+ mergeJson(globalConfigPath(), { statusline: { components } });
54
+ }
55
+ function writeStatuslineSettings(hookPath) {
56
+ const settingsPath = claudeSettingsPath();
57
+ const settings = readJson(settingsPath) ?? {};
58
+ settings.statusLine = {
59
+ type: "command",
60
+ command: `bash ${hookPath}`
61
+ };
62
+ writeJson(settingsPath, settings);
63
+ }
64
+ function isStatuslineConfigured() {
65
+ const settings = readJson(claudeSettingsPath());
66
+ if (!settings) return false;
67
+ const sl = settings.statusLine;
68
+ return !!sl?.command;
69
+ }
70
+
71
+ export {
72
+ findStatuslineHookPath,
73
+ selectStatuslineComponents,
74
+ saveStatuslineConfig,
75
+ writeStatuslineSettings,
76
+ isStatuslineConfigured
77
+ };
@@ -10,7 +10,7 @@ import {
10
10
  claudeSettingsPath,
11
11
  installedPluginsPath,
12
12
  pluginCachePath
13
- } from "./chunk-T5KHF3RW.js";
13
+ } from "./chunk-WHCJT7E2.js";
14
14
  import {
15
15
  log
16
16
  } from "./chunk-6DUFTBTO.js";
@@ -1,4 +1,13 @@
1
1
  // src/types.ts
2
+ var STATUSLINE_COMPONENTS = [
3
+ { id: "version", label: "Plugin version (cf v0.3.0)" },
4
+ { id: "folder", label: "Project name (MyProject)" },
5
+ { id: "model", label: "Active model (Opus 4.6)" },
6
+ { id: "branch", label: "Git branch (\u2387 main)" },
7
+ { id: "context", label: "Context window usage (ctx 42%)" },
8
+ { id: "usage", label: "API usage + reset time (15% \u2192 02:30)" }
9
+ ];
10
+ var ALL_COMPONENT_IDS = STATUSLINE_COMPONENTS.map((c) => c.id);
2
11
  var DEFAULT_CONFIG = {
3
12
  language: "en",
4
13
  docsDir: "docs",
@@ -27,5 +36,7 @@ var DEFAULT_CONFIG = {
27
36
  };
28
37
 
29
38
  export {
39
+ STATUSLINE_COMPONENTS,
40
+ ALL_COMPONENT_IDS,
30
41
  DEFAULT_CONFIG
31
42
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  installedPluginsPath,
3
3
  knownMarketplacesPath
4
- } from "./chunk-T5KHF3RW.js";
4
+ } from "./chunk-WHCJT7E2.js";
5
5
  import {
6
6
  readJson
7
7
  } from "./chunk-IUTXHCP7.js";
@@ -35,7 +35,13 @@ function knownMarketplacesPath() {
35
35
  return join(homedir(), ".claude", "plugins", "known_marketplaces.json");
36
36
  }
37
37
  function marketplaceCachePath() {
38
- return join(homedir(), ".claude", "plugins", "cache", "coding-friend-marketplace");
38
+ return join(
39
+ homedir(),
40
+ ".claude",
41
+ "plugins",
42
+ "cache",
43
+ "coding-friend-marketplace"
44
+ );
39
45
  }
40
46
  function marketplaceClonePath() {
41
47
  return join(
@@ -2,7 +2,7 @@ import {
2
2
  globalConfigPath,
3
3
  localConfigPath,
4
4
  resolvePath
5
- } from "./chunk-T5KHF3RW.js";
5
+ } from "./chunk-WHCJT7E2.js";
6
6
  import {
7
7
  readJson
8
8
  } from "./chunk-IUTXHCP7.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isMarketplaceRegistered,
3
3
  isPluginInstalled
4
- } from "./chunk-ZA4GHAJL.js";
4
+ } from "./chunk-MRTR7TJ4.js";
5
5
  import {
6
6
  commandExists,
7
7
  run
@@ -11,7 +11,7 @@ import {
11
11
  devStatePath,
12
12
  knownMarketplacesPath,
13
13
  pluginCachePath
14
- } from "./chunk-T5KHF3RW.js";
14
+ } from "./chunk-WHCJT7E2.js";
15
15
  import {
16
16
  log
17
17
  } from "./chunk-6DUFTBTO.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  getLibPath,
3
3
  resolveDocsDir
4
- } from "./chunk-LVI3I6EN.js";
5
- import "./chunk-HRVSKMNA.js";
4
+ } from "./chunk-X645ACZJ.js";
5
+ import "./chunk-JWAJ4XPK.js";
6
6
  import {
7
7
  run,
8
8
  streamExec
9
9
  } from "./chunk-UFGNO6CW.js";
10
- import "./chunk-T5KHF3RW.js";
10
+ import "./chunk-WHCJT7E2.js";
11
11
  import {
12
12
  log
13
13
  } from "./chunk-6DUFTBTO.js";
package/dist/index.js CHANGED
@@ -14,31 +14,31 @@ program.name("cf").description(
14
14
  "coding-friend CLI \u2014 host learning docs, setup MCP, init projects"
15
15
  ).version(pkg.version, "-v, --version");
16
16
  program.command("install").description("Install the Coding Friend plugin into Claude Code").action(async () => {
17
- const { installCommand } = await import("./install-3H2FZSPZ.js");
17
+ const { installCommand } = await import("./install-BEFMUMKE.js");
18
18
  await installCommand();
19
19
  });
20
20
  program.command("uninstall").description("Uninstall the Coding Friend plugin from Claude Code").action(async () => {
21
- const { uninstallCommand } = await import("./uninstall-ULTJA57D.js");
21
+ const { uninstallCommand } = await import("./uninstall-BHYS52L3.js");
22
22
  await uninstallCommand();
23
23
  });
24
24
  program.command("init").description("Initialize coding-friend in current project").action(async () => {
25
- const { initCommand } = await import("./init-KX6M4XTA.js");
25
+ const { initCommand } = await import("./init-K4EVPAHK.js");
26
26
  await initCommand();
27
27
  });
28
28
  program.command("host").description("Build and serve learning docs as a static website").argument("[path]", "path to docs folder").option("-p, --port <port>", "port number", "3333").action(async (path, opts) => {
29
- const { hostCommand } = await import("./host-D3BR75OU.js");
29
+ const { hostCommand } = await import("./host-VR5POAVU.js");
30
30
  await hostCommand(path, opts);
31
31
  });
32
32
  program.command("mcp").description("Setup MCP server for learning docs").argument("[path]", "path to docs folder").action(async (path) => {
33
- const { mcpCommand } = await import("./mcp-SWXTVL3Q.js");
33
+ const { mcpCommand } = await import("./mcp-JCQUGUPJ.js");
34
34
  await mcpCommand(path);
35
35
  });
36
36
  program.command("statusline").description("Setup coding-friend statusline in Claude Code").action(async () => {
37
- const { statuslineCommand } = await import("./statusline-7M4JUD7O.js");
37
+ const { statuslineCommand } = await import("./statusline-3MQQDRCI.js");
38
38
  await statuslineCommand();
39
39
  });
40
40
  program.command("update").description("Update coding-friend plugin, CLI, and statusline").option("--cli", "Update only the CLI (npm package)").option("--plugin", "Update only the Claude Code plugin").option("--statusline", "Update only the statusline").action(async (opts) => {
41
- const { updateCommand } = await import("./update-5C5QFLIL.js");
41
+ const { updateCommand } = await import("./update-TALQ7TAO.js");
42
42
  await updateCommand(opts);
43
43
  });
44
44
  var dev = program.command("dev").description("Development mode commands");
@@ -53,28 +53,28 @@ Dev subcommands:
53
53
  dev restart [path] Reinstall local dev plugin (off + on)`
54
54
  );
55
55
  dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
56
- const { devOnCommand } = await import("./dev-WMKGIPD3.js");
56
+ const { devOnCommand } = await import("./dev-WINMWRZK.js");
57
57
  await devOnCommand(path);
58
58
  });
59
59
  dev.command("off").description("Switch back to remote marketplace").action(async () => {
60
- const { devOffCommand } = await import("./dev-WMKGIPD3.js");
60
+ const { devOffCommand } = await import("./dev-WINMWRZK.js");
61
61
  await devOffCommand();
62
62
  });
63
63
  dev.command("status").description("Show current dev mode").action(async () => {
64
- const { devStatusCommand } = await import("./dev-WMKGIPD3.js");
64
+ const { devStatusCommand } = await import("./dev-WINMWRZK.js");
65
65
  await devStatusCommand();
66
66
  });
67
67
  dev.command("sync").description(
68
68
  "Copy local source files to plugin cache (no version bump needed)"
69
69
  ).action(async () => {
70
- const { devSyncCommand } = await import("./dev-WMKGIPD3.js");
70
+ const { devSyncCommand } = await import("./dev-WINMWRZK.js");
71
71
  await devSyncCommand();
72
72
  });
73
73
  dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
74
74
  "[path]",
75
75
  "path to local coding-friend repo (default: saved path or cwd)"
76
76
  ).action(async (path) => {
77
- const { devRestartCommand } = await import("./dev-WMKGIPD3.js");
77
+ const { devRestartCommand } = await import("./dev-WINMWRZK.js");
78
78
  await devRestartCommand(path);
79
79
  });
80
80
  program.parse();
@@ -1,10 +1,17 @@
1
+ import {
2
+ findStatuslineHookPath,
3
+ isStatuslineConfigured,
4
+ saveStatuslineConfig,
5
+ selectStatuslineComponents,
6
+ writeStatuslineSettings
7
+ } from "./chunk-5OALHHKR.js";
1
8
  import {
2
9
  ensureShellCompletion,
3
10
  hasShellCompletion
4
11
  } from "./chunk-DDISNOEK.js";
5
12
  import {
6
13
  DEFAULT_CONFIG
7
- } from "./chunk-HRVSKMNA.js";
14
+ } from "./chunk-JWAJ4XPK.js";
8
15
  import {
9
16
  run
10
17
  } from "./chunk-UFGNO6CW.js";
@@ -13,7 +20,7 @@ import {
13
20
  globalConfigPath,
14
21
  localConfigPath,
15
22
  resolvePath
16
- } from "./chunk-T5KHF3RW.js";
23
+ } from "./chunk-WHCJT7E2.js";
17
24
  import {
18
25
  log
19
26
  } from "./chunk-6DUFTBTO.js";
@@ -338,6 +345,11 @@ async function initCommand() {
338
345
  name: "completion",
339
346
  label: "Setup shell tab completion",
340
347
  done: hasShellCompletion()
348
+ },
349
+ {
350
+ name: "statusline",
351
+ label: "Configure statusline",
352
+ done: isStatuslineConfigured()
341
353
  }
342
354
  ];
343
355
  if (hasExternalDir && resolvedOutputDir) {
@@ -417,6 +429,20 @@ async function initCommand() {
417
429
  case "completion":
418
430
  ensureShellCompletion();
419
431
  break;
432
+ case "statusline": {
433
+ const hookResult = findStatuslineHookPath();
434
+ if (!hookResult) {
435
+ log.warn(
436
+ "coding-friend plugin not found. Install it via Claude Code first, then re-run."
437
+ );
438
+ break;
439
+ }
440
+ const components = await selectStatuslineComponents();
441
+ saveStatuslineConfig(components);
442
+ writeStatuslineSettings(hookResult.hookPath);
443
+ log.success("Statusline configured!");
444
+ break;
445
+ }
420
446
  case "permissions":
421
447
  if (resolvedOutputDir) {
422
448
  await setupClaudePermissions(resolvedOutputDir, learnAutoCommit);
@@ -2,16 +2,16 @@ import {
2
2
  getInstalledVersion,
3
3
  getLatestVersion,
4
4
  semverCompare
5
- } from "./chunk-F32SU5YM.js";
5
+ } from "./chunk-GTTSBOHM.js";
6
6
  import {
7
7
  isMarketplaceRegistered
8
- } from "./chunk-ZA4GHAJL.js";
8
+ } from "./chunk-MRTR7TJ4.js";
9
9
  import "./chunk-DDISNOEK.js";
10
10
  import {
11
11
  commandExists,
12
12
  run
13
13
  } from "./chunk-UFGNO6CW.js";
14
- import "./chunk-T5KHF3RW.js";
14
+ import "./chunk-WHCJT7E2.js";
15
15
  import {
16
16
  log
17
17
  } from "./chunk-6DUFTBTO.js";
@@ -62,7 +62,9 @@ async function installCommand() {
62
62
  }
63
63
  log.success("Plugin installed!");
64
64
  } else {
65
- log.success(`Plugin already installed (${chalk.green(`v${installedVersion}`)}).`);
65
+ log.success(
66
+ `Plugin already installed (${chalk.green(`v${installedVersion}`)}).`
67
+ );
66
68
  const latestVersion = getLatestVersion();
67
69
  if (latestVersion) {
68
70
  const cmp = semverCompare(installedVersion, latestVersion);
@@ -79,7 +81,9 @@ async function installCommand() {
79
81
  }
80
82
  console.log();
81
83
  log.info("Next steps:");
82
- log.dim(` ${chalk.cyan("cf init")} Initialize workspace (docs folders, config)`);
84
+ log.dim(
85
+ ` ${chalk.cyan("cf init")} Initialize workspace (docs folders, config)`
86
+ );
83
87
  log.dim(` ${chalk.cyan("cf statusline")} Setup statusline in Claude Code`);
84
88
  console.log();
85
89
  log.dim("Restart Claude Code (or start a new session) to use the plugin.");
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getLibPath,
3
3
  resolveDocsDir
4
- } from "./chunk-LVI3I6EN.js";
5
- import "./chunk-HRVSKMNA.js";
4
+ } from "./chunk-X645ACZJ.js";
5
+ import "./chunk-JWAJ4XPK.js";
6
6
  import {
7
7
  run
8
8
  } from "./chunk-UFGNO6CW.js";
9
- import "./chunk-T5KHF3RW.js";
9
+ import "./chunk-WHCJT7E2.js";
10
10
  import {
11
11
  log
12
12
  } from "./chunk-6DUFTBTO.js";
@@ -0,0 +1,55 @@
1
+ import {
2
+ findStatuslineHookPath,
3
+ isStatuslineConfigured,
4
+ saveStatuslineConfig,
5
+ selectStatuslineComponents,
6
+ writeStatuslineSettings
7
+ } from "./chunk-5OALHHKR.js";
8
+ import {
9
+ ALL_COMPONENT_IDS
10
+ } from "./chunk-JWAJ4XPK.js";
11
+ import "./chunk-WHCJT7E2.js";
12
+ import {
13
+ log
14
+ } from "./chunk-6DUFTBTO.js";
15
+ import "./chunk-IUTXHCP7.js";
16
+
17
+ // src/commands/statusline.ts
18
+ import { confirm } from "@inquirer/prompts";
19
+ import chalk from "chalk";
20
+ async function statuslineCommand() {
21
+ console.log("=== \u{1F33F} Coding Friend Statusline \u{1F33F} ===");
22
+ console.log();
23
+ const result = findStatuslineHookPath();
24
+ if (!result) {
25
+ log.error(
26
+ "coding-friend plugin not found in cache. Install it first via Claude Code."
27
+ );
28
+ return;
29
+ }
30
+ log.info(`Found plugin ${chalk.green(`v${result.version}`)}`);
31
+ if (isStatuslineConfigured()) {
32
+ log.warn("Statusline already configured.");
33
+ const overwrite = await confirm({
34
+ message: "Reconfigure statusline?",
35
+ default: true
36
+ });
37
+ if (!overwrite) {
38
+ log.dim("Skipped.");
39
+ return;
40
+ }
41
+ }
42
+ const components = await selectStatuslineComponents();
43
+ saveStatuslineConfig(components);
44
+ writeStatuslineSettings(result.hookPath);
45
+ log.success("Statusline configured!");
46
+ log.dim("Restart Claude Code (or start a new session) to see it.");
47
+ if (components.length < ALL_COMPONENT_IDS.length) {
48
+ log.dim(`Showing: ${components.join(", ")}`);
49
+ } else {
50
+ log.dim("Showing all components.");
51
+ }
52
+ }
53
+ export {
54
+ statuslineCommand
55
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isMarketplaceRegistered,
3
3
  isPluginInstalled
4
- } from "./chunk-ZA4GHAJL.js";
4
+ } from "./chunk-MRTR7TJ4.js";
5
5
  import {
6
6
  hasShellCompletion,
7
7
  removeShellCompletion
@@ -16,7 +16,7 @@ import {
16
16
  globalConfigDir,
17
17
  marketplaceCachePath,
18
18
  marketplaceClonePath
19
- } from "./chunk-T5KHF3RW.js";
19
+ } from "./chunk-WHCJT7E2.js";
20
20
  import {
21
21
  log
22
22
  } from "./chunk-6DUFTBTO.js";
@@ -70,7 +70,9 @@ function displayDetection(d) {
70
70
  console.log(` ${check(d.cloneExists)} Marketplace clone`);
71
71
  console.log(` ${check(d.statuslineConfigured)} Statusline reference`);
72
72
  console.log(` ${check(d.shellCompletionExists)} Shell tab completion`);
73
- console.log(` ${check(d.globalConfigExists)} Global config (~/.coding-friend/)`);
73
+ console.log(
74
+ ` ${check(d.globalConfigExists)} Global config (~/.coding-friend/)`
75
+ );
74
76
  console.log();
75
77
  }
76
78
  function nothingToRemove(d) {
@@ -80,10 +82,10 @@ async function uninstallCommand() {
80
82
  console.log(`
81
83
  === ${chalk.red("Coding Friend Uninstall")} ===`);
82
84
  if (!commandExists("claude")) {
83
- log.error(
84
- "Claude CLI not found. Cannot uninstall plugin without it."
85
+ log.error("Claude CLI not found. Cannot uninstall plugin without it.");
86
+ log.dim(
87
+ "Install Claude CLI first: https://docs.anthropic.com/en/docs/claude-code"
85
88
  );
86
- log.dim("Install Claude CLI first: https://docs.anthropic.com/en/docs/claude-code");
87
89
  return;
88
90
  }
89
91
  const detection = detect();
@@ -120,16 +122,25 @@ async function uninstallCommand() {
120
122
  if (result === null) {
121
123
  const fallback = run("claude", ["plugin", "uninstall", PLUGIN_NAME]);
122
124
  if (fallback === null) {
123
- log.warn("Could not uninstall plugin via CLI (may already be removed).");
125
+ log.warn(
126
+ "Could not uninstall plugin via CLI (may already be removed)."
127
+ );
124
128
  errors++;
125
129
  }
126
130
  }
127
131
  }
128
132
  if (detection.marketplaceRegistered) {
129
133
  log.step("Removing marketplace...");
130
- const result = run("claude", ["plugin", "marketplace", "remove", MARKETPLACE_NAME]);
134
+ const result = run("claude", [
135
+ "plugin",
136
+ "marketplace",
137
+ "remove",
138
+ MARKETPLACE_NAME
139
+ ]);
131
140
  if (result === null) {
132
- log.warn("Could not remove marketplace via CLI (may already be removed).");
141
+ log.warn(
142
+ "Could not remove marketplace via CLI (may already be removed)."
143
+ );
133
144
  errors++;
134
145
  }
135
146
  }
@@ -3,10 +3,10 @@ import {
3
3
  getLatestVersion,
4
4
  semverCompare,
5
5
  updateCommand
6
- } from "./chunk-F32SU5YM.js";
6
+ } from "./chunk-GTTSBOHM.js";
7
7
  import "./chunk-DDISNOEK.js";
8
8
  import "./chunk-UFGNO6CW.js";
9
- import "./chunk-T5KHF3RW.js";
9
+ import "./chunk-WHCJT7E2.js";
10
10
  import "./chunk-6DUFTBTO.js";
11
11
  import "./chunk-IUTXHCP7.js";
12
12
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coding-friend-cli",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,64 +0,0 @@
1
- import {
2
- claudeSettingsPath,
3
- pluginCachePath
4
- } from "./chunk-T5KHF3RW.js";
5
- import {
6
- log
7
- } from "./chunk-6DUFTBTO.js";
8
- import {
9
- readJson,
10
- writeJson
11
- } from "./chunk-IUTXHCP7.js";
12
-
13
- // src/commands/statusline.ts
14
- import { existsSync, readdirSync } from "fs";
15
- import { confirm } from "@inquirer/prompts";
16
- import chalk from "chalk";
17
- function findLatestVersion(cachePath) {
18
- if (!existsSync(cachePath)) return null;
19
- const versions = readdirSync(cachePath, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort().reverse();
20
- return versions[0] ?? null;
21
- }
22
- async function statuslineCommand() {
23
- console.log("=== \u{1F33F} Coding Friend Statusline \u{1F33F} ===");
24
- console.log();
25
- const cachePath = pluginCachePath();
26
- const version = findLatestVersion(cachePath);
27
- if (!version) {
28
- log.error(
29
- "coding-friend plugin not found in cache. Install it first via Claude Code."
30
- );
31
- return;
32
- }
33
- const hookPath = `${cachePath}/${version}/hooks/statusline.sh`;
34
- if (!existsSync(hookPath)) {
35
- log.error(`Statusline hook not found: ${hookPath}`);
36
- return;
37
- }
38
- log.info(`Found plugin ${chalk.green(`v${version}`)}`);
39
- const settingsPath = claudeSettingsPath();
40
- const settings = readJson(settingsPath) ?? {};
41
- const existing = settings.statusLine;
42
- if (existing?.command) {
43
- log.warn(`Statusline already configured: ${existing.command}`);
44
- const overwrite = await confirm({
45
- message: "Overwrite existing statusline config?",
46
- default: true
47
- });
48
- if (!overwrite) {
49
- log.dim("Skipped.");
50
- return;
51
- }
52
- }
53
- settings.statusLine = {
54
- type: "command",
55
- command: `bash ${hookPath}`
56
- };
57
- writeJson(settingsPath, settings);
58
- log.success("Statusline configured!");
59
- log.dim("Restart Claude Code (or start a new session) to see it.");
60
- log.dim("Shows: plugin name, active model, and git branch.");
61
- }
62
- export {
63
- statuslineCommand
64
- };