coding-friend-cli 1.13.0 → 1.14.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_CONFIG
3
- } from "./chunk-PGLUEN7D.js";
3
+ } from "./chunk-POC2WHU2.js";
4
4
  import {
5
5
  globalConfigPath,
6
6
  localConfigPath,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ensureStatusline,
3
3
  getInstalledVersion
4
- } from "./chunk-QG6XYVJU.js";
4
+ } from "./chunk-ORACWEDN.js";
5
5
  import {
6
6
  ensureShellCompletion
7
7
  } from "./chunk-KJUGTLPQ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ALL_COMPONENT_IDS,
3
3
  STATUSLINE_COMPONENTS
4
- } from "./chunk-PGLUEN7D.js";
4
+ } from "./chunk-POC2WHU2.js";
5
5
  import {
6
6
  claudeSettingsPath,
7
7
  globalConfigPath,
@@ -54,7 +54,7 @@ function loadStatuslineComponents() {
54
54
  const config = readJson(globalConfigPath());
55
55
  const components = config?.statusline?.components;
56
56
  if (!components) return ALL_COMPONENT_IDS;
57
- return components.filter(
57
+ return components.map((c) => c === "usage" ? "rate_limit" : c).filter(
58
58
  (c) => ALL_COMPONENT_IDS.includes(c)
59
59
  );
60
60
  }
@@ -5,7 +5,10 @@ var STATUSLINE_COMPONENTS = [
5
5
  { id: "model", label: "Active model (Opus 4.6)" },
6
6
  { id: "branch", label: "Git branch (\u2387 main)" },
7
7
  { id: "context", label: "Context window usage (ctx 42%)" },
8
- { id: "usage", label: "API usage + reset time (15% \u2192 02:30)" }
8
+ {
9
+ id: "rate_limit",
10
+ label: "Rate limit \u2014 current & weekly usage (requires curl & jq)"
11
+ }
9
12
  ];
10
13
  var ALL_COMPONENT_IDS = STATUSLINE_COMPONENTS.map((c) => c.id);
11
14
  var DEFAULT_CONFIG = {
@@ -4,11 +4,11 @@ import {
4
4
  saveStatuslineConfig,
5
5
  selectStatuslineComponents,
6
6
  writeStatuslineSettings
7
- } from "./chunk-QG6XYVJU.js";
7
+ } from "./chunk-ORACWEDN.js";
8
8
  import {
9
9
  ALL_COMPONENT_IDS,
10
10
  DEFAULT_CONFIG
11
- } from "./chunk-PGLUEN7D.js";
11
+ } from "./chunk-POC2WHU2.js";
12
12
  import {
13
13
  ensureShellCompletion,
14
14
  hasShellCompletion,
@@ -4,8 +4,8 @@ import {
4
4
  } from "./chunk-YC6MBHCT.js";
5
5
  import {
6
6
  ensureStatusline
7
- } from "./chunk-QG6XYVJU.js";
8
- import "./chunk-PGLUEN7D.js";
7
+ } from "./chunk-ORACWEDN.js";
8
+ import "./chunk-POC2WHU2.js";
9
9
  import {
10
10
  ensureShellCompletion
11
11
  } from "./chunk-KJUGTLPQ.js";
@@ -3,8 +3,8 @@ import {
3
3
  } from "./chunk-RZRT7NGT.js";
4
4
  import {
5
5
  resolveDocsDir
6
- } from "./chunk-KB4JM2EB.js";
7
- import "./chunk-PGLUEN7D.js";
6
+ } from "./chunk-4DB4XTSL.js";
7
+ import "./chunk-POC2WHU2.js";
8
8
  import {
9
9
  run,
10
10
  streamExec
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ 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").option("--user", "Install at user scope (all projects)").option("--global", "Install at user scope (all projects)").option("--project", "Install at project scope (shared via git)").option("--local", "Install at local scope (this machine only)").action(async (opts) => {
17
- const { installCommand } = await import("./install-SNLHV22V.js");
17
+ const { installCommand } = await import("./install-YXZGP2MY.js");
18
18
  await installCommand(opts);
19
19
  });
20
20
  program.command("uninstall").description("Uninstall the Coding Friend plugin from Claude Code").option("--user", "Uninstall from user scope (all projects)").option("--global", "Uninstall from user scope (all projects)").option("--project", "Uninstall from project scope").option("--local", "Uninstall from local scope").action(async (opts) => {
@@ -30,19 +30,19 @@ program.command("enable").description("Re-enable the Coding Friend plugin").opti
30
30
  await enableCommand(opts);
31
31
  });
32
32
  program.command("init").description("Initialize coding-friend in current project").action(async () => {
33
- const { initCommand } = await import("./init-SIZ5RXE7.js");
33
+ const { initCommand } = await import("./init-AHIEQ27W.js");
34
34
  await initCommand();
35
35
  });
36
36
  program.command("config").description("Manage Coding Friend configuration").action(async () => {
37
- const { configCommand } = await import("./config-F6QRCOYP.js");
37
+ const { configCommand } = await import("./config-UQ742WPQ.js");
38
38
  await configCommand();
39
39
  });
40
40
  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) => {
41
- const { hostCommand } = await import("./host-D3GAQ4BW.js");
41
+ const { hostCommand } = await import("./host-NA7LZ4HX.js");
42
42
  await hostCommand(path, opts);
43
43
  });
44
44
  program.command("mcp").description("Setup MCP server for learning docs").argument("[path]", "path to docs folder").action(async (path) => {
45
- const { mcpCommand } = await import("./mcp-H42K6Y6T.js");
45
+ const { mcpCommand } = await import("./mcp-DLS3J6QJ.js");
46
46
  await mcpCommand(path);
47
47
  });
48
48
  program.command("permission").description("Manage Claude Code permission rules for Coding Friend").option("--all", "Apply all recommended permissions without prompts").action(async (opts) => {
@@ -50,11 +50,11 @@ program.command("permission").description("Manage Claude Code permission rules f
50
50
  await permissionCommand(opts);
51
51
  });
52
52
  program.command("statusline").description("Setup coding-friend statusline in Claude Code").action(async () => {
53
- const { statuslineCommand } = await import("./statusline-5ZMM3RYY.js");
53
+ const { statuslineCommand } = await import("./statusline-6HQCDWBD.js");
54
54
  await statuslineCommand();
55
55
  });
56
56
  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").option("--user", "Update plugin at user scope (all projects)").option("--global", "Update plugin at user scope (all projects)").option("--project", "Update plugin at project scope").option("--local", "Update plugin at local scope").action(async (opts) => {
57
- const { updateCommand } = await import("./update-VZZ3SNCZ.js");
57
+ const { updateCommand } = await import("./update-OADURRFT.js");
58
58
  await updateCommand(opts);
59
59
  });
60
60
  var session = program.command("session").description("Save and load Claude Code sessions across machines");
@@ -69,11 +69,11 @@ session.command("save").description("Save current Claude Code session to sync fo
69
69
  "-s, --session-id <id>",
70
70
  "session UUID to save (default: auto-detect newest)"
71
71
  ).option("-l, --label <label>", "label for this session").action(async (opts) => {
72
- const { sessionSaveCommand } = await import("./session-K6YWJLLU.js");
72
+ const { sessionSaveCommand } = await import("./session-E3CZJJZQ.js");
73
73
  await sessionSaveCommand(opts);
74
74
  });
75
75
  session.command("load").description("Load a saved session from sync folder").action(async () => {
76
- const { sessionLoadCommand } = await import("./session-K6YWJLLU.js");
76
+ const { sessionLoadCommand } = await import("./session-E3CZJJZQ.js");
77
77
  await sessionLoadCommand();
78
78
  });
79
79
  var dev = program.command("dev").description("Development mode commands");
@@ -89,35 +89,35 @@ Dev subcommands:
89
89
  dev update [path] Update local dev plugin to latest version`
90
90
  );
91
91
  dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
92
- const { devOnCommand } = await import("./dev-DXETYVQB.js");
92
+ const { devOnCommand } = await import("./dev-X7OJPTTW.js");
93
93
  await devOnCommand(path);
94
94
  });
95
95
  dev.command("off").description("Switch back to remote marketplace").action(async () => {
96
- const { devOffCommand } = await import("./dev-DXETYVQB.js");
96
+ const { devOffCommand } = await import("./dev-X7OJPTTW.js");
97
97
  await devOffCommand();
98
98
  });
99
99
  dev.command("status").description("Show current dev mode").action(async () => {
100
- const { devStatusCommand } = await import("./dev-DXETYVQB.js");
100
+ const { devStatusCommand } = await import("./dev-X7OJPTTW.js");
101
101
  await devStatusCommand();
102
102
  });
103
103
  dev.command("sync").description(
104
104
  "Copy local source files to plugin cache (no version bump needed)"
105
105
  ).action(async () => {
106
- const { devSyncCommand } = await import("./dev-DXETYVQB.js");
106
+ const { devSyncCommand } = await import("./dev-X7OJPTTW.js");
107
107
  await devSyncCommand();
108
108
  });
109
109
  dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
110
110
  "[path]",
111
111
  "path to local coding-friend repo (default: saved path or cwd)"
112
112
  ).action(async (path) => {
113
- const { devRestartCommand } = await import("./dev-DXETYVQB.js");
113
+ const { devRestartCommand } = await import("./dev-X7OJPTTW.js");
114
114
  await devRestartCommand(path);
115
115
  });
116
116
  dev.command("update").description("Update local dev plugin to latest version (off + on)").argument(
117
117
  "[path]",
118
118
  "path to local coding-friend repo (default: saved path or cwd)"
119
119
  ).action(async (path) => {
120
- const { devUpdateCommand } = await import("./dev-DXETYVQB.js");
120
+ const { devUpdateCommand } = await import("./dev-X7OJPTTW.js");
121
121
  await devUpdateCommand(path);
122
122
  });
123
123
  program.parse();
@@ -10,10 +10,10 @@ import {
10
10
  saveStatuslineConfig,
11
11
  selectStatuslineComponents,
12
12
  writeStatuslineSettings
13
- } from "./chunk-QG6XYVJU.js";
13
+ } from "./chunk-ORACWEDN.js";
14
14
  import {
15
15
  DEFAULT_CONFIG
16
- } from "./chunk-PGLUEN7D.js";
16
+ } from "./chunk-POC2WHU2.js";
17
17
  import {
18
18
  ensureShellCompletion,
19
19
  hasShellCompletion
@@ -29,6 +29,7 @@ import {
29
29
  showConfigHint
30
30
  } from "./chunk-PYRGNY5P.js";
31
31
  import {
32
+ commandExists,
32
33
  run
33
34
  } from "./chunk-X5WEODUD.js";
34
35
  import {
@@ -409,6 +410,16 @@ async function stepStatusline() {
409
410
  return;
410
411
  }
411
412
  const components = await selectStatuslineComponents();
413
+ if (components.includes("rate_limit")) {
414
+ const missing = [];
415
+ if (!commandExists("curl")) missing.push("curl");
416
+ if (!commandExists("jq")) missing.push("jq");
417
+ if (missing.length > 0) {
418
+ log.warn(
419
+ `Rate limit requires ${missing.join(" & ")}. Install them first, or the statusline will show a warning instead.`
420
+ );
421
+ }
422
+ }
412
423
  saveStatuslineConfig(components);
413
424
  writeStatuslineSettings(hookResult.hookPath);
414
425
  log.success("Statusline configured!");
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getLatestVersion,
3
3
  semverCompare
4
- } from "./chunk-E76PLDNS.js";
4
+ } from "./chunk-IZFUAIP3.js";
5
5
  import {
6
6
  enableMarketplaceAutoUpdate,
7
7
  isMarketplaceRegistered,
@@ -9,8 +9,8 @@ import {
9
9
  } from "./chunk-YC6MBHCT.js";
10
10
  import {
11
11
  getInstalledVersion
12
- } from "./chunk-QG6XYVJU.js";
13
- import "./chunk-PGLUEN7D.js";
12
+ } from "./chunk-ORACWEDN.js";
13
+ import "./chunk-POC2WHU2.js";
14
14
  import {
15
15
  ensureShellCompletion
16
16
  } from "./chunk-KJUGTLPQ.js";
@@ -3,8 +3,8 @@ import {
3
3
  } from "./chunk-RZRT7NGT.js";
4
4
  import {
5
5
  resolveDocsDir
6
- } from "./chunk-KB4JM2EB.js";
7
- import "./chunk-PGLUEN7D.js";
6
+ } from "./chunk-4DB4XTSL.js";
7
+ import "./chunk-POC2WHU2.js";
8
8
  import {
9
9
  run
10
10
  } from "./chunk-X5WEODUD.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  loadConfig
3
- } from "./chunk-KB4JM2EB.js";
4
- import "./chunk-PGLUEN7D.js";
3
+ } from "./chunk-4DB4XTSL.js";
4
+ import "./chunk-POC2WHU2.js";
5
5
  import {
6
6
  claudeSessionDir,
7
7
  encodeProjectPath,
@@ -4,10 +4,13 @@ import {
4
4
  saveStatuslineConfig,
5
5
  selectStatuslineComponents,
6
6
  writeStatuslineSettings
7
- } from "./chunk-QG6XYVJU.js";
7
+ } from "./chunk-ORACWEDN.js";
8
8
  import {
9
9
  ALL_COMPONENT_IDS
10
- } from "./chunk-PGLUEN7D.js";
10
+ } from "./chunk-POC2WHU2.js";
11
+ import {
12
+ commandExists
13
+ } from "./chunk-X5WEODUD.js";
11
14
  import "./chunk-RWUTFVRB.js";
12
15
  import {
13
16
  log
@@ -39,6 +42,16 @@ async function statuslineCommand() {
39
42
  }
40
43
  }
41
44
  const components = await selectStatuslineComponents();
45
+ if (components.includes("rate_limit")) {
46
+ const missing = [];
47
+ if (!commandExists("curl")) missing.push("curl");
48
+ if (!commandExists("jq")) missing.push("jq");
49
+ if (missing.length > 0) {
50
+ log.warn(
51
+ `Rate limit requires ${missing.join(" & ")}. Install them first, or the statusline will show a warning instead.`
52
+ );
53
+ }
54
+ }
42
55
  saveStatuslineConfig(components);
43
56
  writeStatuslineSettings(result.hookPath);
44
57
  log.success("Statusline configured!");
@@ -2,9 +2,9 @@ import {
2
2
  getLatestVersion,
3
3
  semverCompare,
4
4
  updateCommand
5
- } from "./chunk-E76PLDNS.js";
6
- import "./chunk-QG6XYVJU.js";
7
- import "./chunk-PGLUEN7D.js";
5
+ } from "./chunk-IZFUAIP3.js";
6
+ import "./chunk-ORACWEDN.js";
7
+ import "./chunk-POC2WHU2.js";
8
8
  import "./chunk-KJUGTLPQ.js";
9
9
  import "./chunk-PYRGNY5P.js";
10
10
  import "./chunk-X5WEODUD.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coding-friend-cli",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {