coding-friend-cli 1.28.0 → 1.30.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.
@@ -53,7 +53,8 @@ var StatuslineComponentSchema = z.enum([
53
53
  "task_agent"
54
54
  ]);
55
55
  var StatuslineConfigSchema = z.object({
56
- components: z.array(StatuslineComponentSchema).optional()
56
+ components: z.array(StatuslineComponentSchema).optional(),
57
+ accountAliases: z.record(z.string(), z.string()).optional()
57
58
  });
58
59
  var MemoryConfigSchema = z.object({
59
60
  tier: z.enum(["auto", "full", "lite", "markdown"]).optional(),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ensureStatusline,
3
3
  getInstalledVersion
4
- } from "./chunk-XQ5KAXKL.js";
4
+ } from "./chunk-LXZ47XCD.js";
5
5
  import {
6
6
  ensureShellCompletion
7
7
  } from "./chunk-DMJCO6LJ.js";
@@ -203,9 +203,23 @@ var STATIC_RULES = [
203
203
  category: "Testing & Build",
204
204
  recommended: true
205
205
  },
206
+ // Narrow npx rules only — the broad "Bash(npx *)" used to live here but
207
+ // grants execution of any package from any registry, which conflicts with
208
+ // the auto-approve hook's threat model (see plugin/hooks/auto-approve.cjs).
209
+ // tsc and prettier are safe because they typecheck/format and do not
210
+ // execute arbitrary code from input files. Tools that execute arbitrary
211
+ // code (eslint plugins, jest test files, vitest, tsx) are intentionally
212
+ // NOT in the static recommended list — users who want them must add them
213
+ // explicitly with awareness of the risk.
214
+ {
215
+ rule: "Bash(npx tsc *)",
216
+ description: "[execute] Run TypeScript compiler \xB7 Used by: cf-verification",
217
+ category: "Testing & Build",
218
+ recommended: true
219
+ },
206
220
  {
207
- rule: "Bash(npx *)",
208
- description: "[execute] Run npx commands (eslint, tsc) \xB7 Used by: cf-verification",
221
+ rule: "Bash(npx prettier *)",
222
+ description: "[execute] Run Prettier formatter \xB7 Used by: cf-verification",
209
223
  category: "Testing & Build",
210
224
  recommended: true
211
225
  },
@@ -305,7 +319,8 @@ var DANGEROUS_RULE_PATTERNS = [
305
319
  reason: "Grants execution of any npm script"
306
320
  },
307
321
  {
308
- pattern: /^Bash\(npx\*?\)$/,
322
+ // Matches Bash(npx), Bash(npx*), and Bash(npx *) — any bare npx wildcard
323
+ pattern: /^Bash\(npx\s*\*?\)$/,
309
324
  reason: "Grants execution of any npx package"
310
325
  },
311
326
  {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RZRT7NGT.js";
4
4
  import {
5
5
  resolveMemoryDir
6
- } from "./chunk-J4N2ODQ5.js";
6
+ } from "./chunk-2S6K2QY3.js";
7
7
  import {
8
8
  BACK,
9
9
  askScope,
@@ -7,14 +7,14 @@ import {
7
7
  getMemoryMcpStatus,
8
8
  memoryConfigMenu,
9
9
  writeMemoryMcpEntry
10
- } from "./chunk-XROT7L2F.js";
10
+ } from "./chunk-AJ57KPF7.js";
11
11
  import {
12
12
  getLibPath
13
13
  } from "./chunk-RZRT7NGT.js";
14
14
  import {
15
15
  loadConfig,
16
16
  resolveMemoryDir
17
- } from "./chunk-J4N2ODQ5.js";
17
+ } from "./chunk-2S6K2QY3.js";
18
18
  import {
19
19
  showConfigHint
20
20
  } from "./chunk-HPNRQYLM.js";
@@ -17,7 +17,7 @@ import {
17
17
  // src/lib/statusline.ts
18
18
  import { existsSync, readdirSync } from "fs";
19
19
  import { join } from "path";
20
- import { checkbox } from "@inquirer/prompts";
20
+ import { checkbox, input } from "@inquirer/prompts";
21
21
  function getInstalledVersion() {
22
22
  const data = readJson(installedPluginsPath());
23
23
  if (!data) return null;
@@ -74,7 +74,51 @@ async function selectStatuslineComponents(current) {
74
74
  return selected;
75
75
  }
76
76
  function saveStatuslineConfig(components) {
77
- mergeJson(globalConfigPath(), { statusline: { components } });
77
+ const config = readJson(globalConfigPath()) ?? {};
78
+ const existing = config.statusline ?? {};
79
+ mergeJson(globalConfigPath(), { statusline: { ...existing, components } });
80
+ }
81
+ function getCurrentAccountEmail() {
82
+ const claudeJsonPath = join(
83
+ process.env.HOME ?? process.env.USERPROFILE ?? "",
84
+ ".claude.json"
85
+ );
86
+ const data = readJson(claudeJsonPath);
87
+ const oauth = data?.oauthAccount;
88
+ return oauth?.emailAddress || void 0;
89
+ }
90
+ function loadStatuslineAlias(email) {
91
+ const config = readJson(globalConfigPath());
92
+ return config?.statusline?.accountAliases?.[email] || void 0;
93
+ }
94
+ function saveStatuslineAlias(email, alias) {
95
+ const config = readJson(globalConfigPath()) ?? {};
96
+ const existing = config.statusline ?? {};
97
+ const aliases = {
98
+ ...existing.accountAliases ?? {}
99
+ };
100
+ if (alias) {
101
+ aliases[email] = alias;
102
+ } else {
103
+ delete aliases[email];
104
+ }
105
+ const updated = { ...existing, accountAliases: aliases };
106
+ if (Object.keys(aliases).length === 0) delete updated.accountAliases;
107
+ mergeJson(globalConfigPath(), { statusline: updated });
108
+ }
109
+ async function promptAccountAlias(email, currentAlias) {
110
+ const value = await input({
111
+ message: `Alias for ${email} (leave empty to clear):`,
112
+ default: currentAlias ?? "",
113
+ validate: (val) => {
114
+ if (val.length > 40) return "Alias must be 40 characters or less.";
115
+ if (/[\x00-\x1f]/.test(val))
116
+ return "Alias must not contain control characters.";
117
+ return true;
118
+ }
119
+ });
120
+ const trimmed = value.trim();
121
+ return trimmed || void 0;
78
122
  }
79
123
  function buildStatuslineCommand(hookPath) {
80
124
  const normalized = hookPath.replace(/\\/g, "/");
@@ -113,6 +157,10 @@ export {
113
157
  findStatuslineHookPath,
114
158
  selectStatuslineComponents,
115
159
  saveStatuslineConfig,
160
+ getCurrentAccountEmail,
161
+ loadStatuslineAlias,
162
+ saveStatuslineAlias,
163
+ promptAccountAlias,
116
164
  writeStatuslineSettings,
117
165
  ensureStatusline,
118
166
  isStatuslineConfigured
@@ -1,15 +1,19 @@
1
1
  import {
2
2
  memoryConfigMenu
3
- } from "./chunk-XROT7L2F.js";
3
+ } from "./chunk-AJ57KPF7.js";
4
4
  import "./chunk-RZRT7NGT.js";
5
- import "./chunk-J4N2ODQ5.js";
5
+ import "./chunk-2S6K2QY3.js";
6
6
  import {
7
7
  findStatuslineHookPath,
8
+ getCurrentAccountEmail,
8
9
  isStatuslineConfigured,
10
+ loadStatuslineAlias,
11
+ promptAccountAlias,
12
+ saveStatuslineAlias,
9
13
  saveStatuslineConfig,
10
14
  selectStatuslineComponents,
11
15
  writeStatuslineSettings
12
- } from "./chunk-XQ5KAXKL.js";
16
+ } from "./chunk-LXZ47XCD.js";
13
17
  import {
14
18
  ALL_COMPONENT_IDS,
15
19
  DEFAULT_CONFIG
@@ -47,7 +51,7 @@ import {
47
51
  import {
48
52
  getAllRules,
49
53
  getExistingRules
50
- } from "./chunk-JVYZ72EP.js";
54
+ } from "./chunk-ADCFJSCP.js";
51
55
  import {
52
56
  mergeJson,
53
57
  readJson
@@ -393,7 +397,7 @@ async function editAutoApprove(globalCfg, localCfg) {
393
397
  if (scope === "back") return;
394
398
  writeToScope(scope, { autoApprove: value });
395
399
  if (value) {
396
- const { runDangerousRulesAudit } = await import("./permissions-O24R7WUU.js");
400
+ const { runDangerousRulesAudit } = await import("./permissions-DDLSTTPS.js");
397
401
  await runDangerousRulesAudit(
398
402
  [
399
403
  claudeProjectSettingsPath(),
@@ -423,6 +427,16 @@ async function editStatusline() {
423
427
  if (!overwrite) return;
424
428
  }
425
429
  const components = await selectStatuslineComponents();
430
+ let alias;
431
+ if (components.includes("account")) {
432
+ const email = getCurrentAccountEmail();
433
+ if (email) {
434
+ alias = await promptAccountAlias(email, loadStatuslineAlias(email));
435
+ saveStatuslineAlias(email, alias);
436
+ } else {
437
+ log.dim("No account detected \u2014 skipping alias setup.");
438
+ }
439
+ }
426
440
  saveStatuslineConfig(components);
427
441
  writeStatuslineSettings(hookResult.hookPath);
428
442
  log.success("Statusline configured!");
@@ -431,6 +445,9 @@ async function editStatusline() {
431
445
  } else {
432
446
  log.dim("Showing all components.");
433
447
  }
448
+ if (alias) {
449
+ log.dim(`Account alias: ${alias}`);
450
+ }
434
451
  log.dim("Restart Claude Code (or start a new session) to see it.");
435
452
  }
436
453
  var GITIGNORE_START = "# >>> coding-friend managed";
@@ -570,7 +587,7 @@ async function editPermissions() {
570
587
  )
571
588
  });
572
589
  if (choice === BACK) return;
573
- const { permissionCommand } = await import("./permission-K54DWLHN.js");
590
+ const { permissionCommand } = await import("./permission-HU36DY4C.js");
574
591
  switch (choice) {
575
592
  case "interactive":
576
593
  await permissionCommand({});
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureStatusline
3
- } from "./chunk-XQ5KAXKL.js";
3
+ } from "./chunk-LXZ47XCD.js";
4
4
  import "./chunk-DHH6SRXV.js";
5
5
  import {
6
6
  ensureShellCompletion
@@ -10,6 +10,7 @@ import {
10
10
  } from "./chunk-5UVDWG5L.js";
11
11
 
12
12
  // src/commands/guide.ts
13
+ import chalk from "chalk";
13
14
  import { existsSync, mkdirSync, readdirSync, writeFileSync } from "fs";
14
15
  import { join, resolve } from "path";
15
16
  var GUIDE_TEMPLATE = `# Custom Guide for {{SKILL_NAME}}
@@ -100,11 +101,14 @@ function guideListCommand() {
100
101
  return;
101
102
  }
102
103
  const skillsDir = findPluginSkillsDir();
103
- log.info(`Custom guides (${entries.length}):`);
104
+ log.info(`Custom guides (${chalk.bold(entries.length)}):`);
104
105
  for (const name of entries) {
105
106
  const path = join(customDir, `${name}-custom`, "SKILL.md");
106
- const exists = skillsDir != null && skillExists(skillsDir, name) ? "\u2714" : "\u26A0 skill not found";
107
- log.info(` ${name} \u2192 ${path} (${exists})`);
107
+ const found = skillsDir != null && skillExists(skillsDir, name);
108
+ const status = found ? chalk.green("\u2714") : chalk.yellow("\u26A0 skill not found");
109
+ log.info(
110
+ ` ${status} ${chalk.cyan(name)} ${chalk.dim("\u2192")} ${chalk.dim(path)}`
111
+ );
108
112
  }
109
113
  }
110
114
  export {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RZRT7NGT.js";
4
4
  import {
5
5
  resolveDocsDir
6
- } from "./chunk-J4N2ODQ5.js";
6
+ } from "./chunk-2S6K2QY3.js";
7
7
  import "./chunk-DHH6SRXV.js";
8
8
  import {
9
9
  run,
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-XZC6UO54.js");
17
+ const { installCommand } = await import("./install-JR4ITJVU.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,38 +30,38 @@ 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-R5L2GAFV.js");
33
+ const { initCommand } = await import("./init-3GJVRRIL.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-U2WEZXF6.js");
37
+ const { configCommand } = await import("./config-L3U5MDSI.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-2KBOPER6.js");
41
+ const { hostCommand } = await import("./host-VEGLP74L.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-CNZLJ57B.js");
45
+ const { mcpCommand } = await import("./mcp-SW54A2I6.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").option("--user", "Save to user-level settings (~/.claude/settings.json)").option(
49
49
  "--project",
50
50
  "Save to project-level settings (.claude/settings.local.json)"
51
51
  ).action(async (opts) => {
52
- const { permissionCommand } = await import("./permission-K54DWLHN.js");
52
+ const { permissionCommand } = await import("./permission-HU36DY4C.js");
53
53
  await permissionCommand(opts);
54
54
  });
55
55
  program.command("statusline").description("Setup coding-friend statusline in Claude Code").action(async () => {
56
- const { statuslineCommand } = await import("./statusline-RMTO4MQA.js");
56
+ const { statuslineCommand } = await import("./statusline-5X7FZGRU.js");
57
57
  await statuslineCommand();
58
58
  });
59
59
  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) => {
60
- const { updateCommand } = await import("./update-HS6A2C5V.js");
60
+ const { updateCommand } = await import("./update-JBCG4CY2.js");
61
61
  await updateCommand(opts);
62
62
  });
63
63
  program.command("status").description("Show comprehensive Coding Friend status").action(async () => {
64
- const { statusCommand } = await import("./status-JXUXVHRH.js");
64
+ const { statusCommand } = await import("./status-NLBA3ZBK.js");
65
65
  await statusCommand();
66
66
  });
67
67
  var session = program.command("session").description("Save and load Claude Code sessions across machines");
@@ -76,11 +76,11 @@ session.command("save").description("Save current Claude Code session to sync fo
76
76
  "-s, --session-id <id>",
77
77
  "session UUID to save (default: auto-detect newest)"
78
78
  ).option("-l, --label <label>", "label for this session").action(async (opts) => {
79
- const { sessionSaveCommand } = await import("./session-ZGNQKV4M.js");
79
+ const { sessionSaveCommand } = await import("./session-MNFU7GIO.js");
80
80
  await sessionSaveCommand(opts);
81
81
  });
82
82
  session.command("load").description("Load a saved session from sync folder").action(async () => {
83
- const { sessionLoadCommand } = await import("./session-ZGNQKV4M.js");
83
+ const { sessionLoadCommand } = await import("./session-MNFU7GIO.js");
84
84
  await sessionLoadCommand();
85
85
  });
86
86
  var memory = program.command("memory").description("AI memory system \u2014 store and search project knowledge");
@@ -100,43 +100,43 @@ Memory subcommands:
100
100
  memory mcp Show MCP server setup instructions`
101
101
  );
102
102
  memory.command("status").description("Show memory system status").action(async () => {
103
- const { memoryStatusCommand } = await import("./memory-KU2MOCPQ.js");
103
+ const { memoryStatusCommand } = await import("./memory-7VINMRJK.js");
104
104
  await memoryStatusCommand();
105
105
  });
106
106
  memory.command("search").description("Search memories by query").argument("<query>", "search query").action(async (query) => {
107
- const { memorySearchCommand } = await import("./memory-KU2MOCPQ.js");
107
+ const { memorySearchCommand } = await import("./memory-7VINMRJK.js");
108
108
  await memorySearchCommand(query);
109
109
  });
110
110
  memory.command("list").description(
111
111
  "List memories in current project, or all projects with --projects"
112
112
  ).option("--projects", "List all project databases with size and metadata").action(async (opts) => {
113
- const { memoryListCommand } = await import("./memory-KU2MOCPQ.js");
113
+ const { memoryListCommand } = await import("./memory-7VINMRJK.js");
114
114
  await memoryListCommand(opts);
115
115
  });
116
116
  memory.command("init").description(
117
117
  "Initialize memory system \u2014 interactive wizard (first time) or config menu"
118
118
  ).action(async () => {
119
- const { memoryInitCommand } = await import("./memory-KU2MOCPQ.js");
119
+ const { memoryInitCommand } = await import("./memory-7VINMRJK.js");
120
120
  await memoryInitCommand();
121
121
  });
122
122
  memory.command("config").description("Configure memory system settings").action(async () => {
123
- const { memoryConfigCommand } = await import("./memory-KU2MOCPQ.js");
123
+ const { memoryConfigCommand } = await import("./memory-7VINMRJK.js");
124
124
  await memoryConfigCommand();
125
125
  });
126
126
  memory.command("start-daemon").description("Start the memory daemon (Tier 2 \u2014 MiniSearch)").action(async () => {
127
- const { memoryStartDaemonCommand } = await import("./memory-KU2MOCPQ.js");
127
+ const { memoryStartDaemonCommand } = await import("./memory-7VINMRJK.js");
128
128
  await memoryStartDaemonCommand();
129
129
  });
130
130
  memory.command("stop-daemon").description("Stop the memory daemon").action(async () => {
131
- const { memoryStopDaemonCommand } = await import("./memory-KU2MOCPQ.js");
131
+ const { memoryStopDaemonCommand } = await import("./memory-7VINMRJK.js");
132
132
  await memoryStopDaemonCommand();
133
133
  });
134
134
  memory.command("rebuild").description("Rebuild the daemon search index").action(async () => {
135
- const { memoryRebuildCommand } = await import("./memory-KU2MOCPQ.js");
135
+ const { memoryRebuildCommand } = await import("./memory-7VINMRJK.js");
136
136
  await memoryRebuildCommand();
137
137
  });
138
138
  memory.command("mcp").description("Show MCP server setup instructions").action(async () => {
139
- const { memoryMcpCommand } = await import("./memory-KU2MOCPQ.js");
139
+ const { memoryMcpCommand } = await import("./memory-7VINMRJK.js");
140
140
  await memoryMcpCommand();
141
141
  });
142
142
  memory.command("rm").description("Remove a project database").option("--project-id <id>", "Project ID to remove").option("--all", "Remove all project databases").option(
@@ -144,17 +144,17 @@ memory.command("rm").description("Remove a project database").option("--project-
144
144
  "Remove orphaned projects (source dir missing or 0 memories)"
145
145
  ).action(
146
146
  async (opts) => {
147
- const { memoryRmCommand } = await import("./memory-KU2MOCPQ.js");
147
+ const { memoryRmCommand } = await import("./memory-7VINMRJK.js");
148
148
  await memoryRmCommand(opts);
149
149
  }
150
150
  );
151
151
  var guide = program.command("guide").description("Manage custom skill guides");
152
152
  guide.command("create").description("Create a custom guide for a skill").argument("<skill-name>", "skill to create guide for (e.g. cf-commit)").action(async (skillName) => {
153
- const { guideCreateCommand } = await import("./guide-F2FLCDYO.js");
153
+ const { guideCreateCommand } = await import("./guide-LQ2BHU5Y.js");
154
154
  guideCreateCommand(skillName);
155
155
  });
156
156
  guide.command("list").description("List existing custom guides").action(async () => {
157
- const { guideListCommand } = await import("./guide-F2FLCDYO.js");
157
+ const { guideListCommand } = await import("./guide-LQ2BHU5Y.js");
158
158
  guideListCommand();
159
159
  });
160
160
  var dev = program.command("dev").description("Development mode commands");
@@ -170,35 +170,35 @@ Dev subcommands:
170
170
  dev update [path] Update local dev plugin to latest version`
171
171
  );
172
172
  dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
173
- const { devOnCommand } = await import("./dev-4OAJCQRQ.js");
173
+ const { devOnCommand } = await import("./dev-VNDV6R24.js");
174
174
  await devOnCommand(path);
175
175
  });
176
176
  dev.command("off").description("Switch back to remote marketplace").action(async () => {
177
- const { devOffCommand } = await import("./dev-4OAJCQRQ.js");
177
+ const { devOffCommand } = await import("./dev-VNDV6R24.js");
178
178
  await devOffCommand();
179
179
  });
180
180
  dev.command("status").description("Show current dev mode").action(async () => {
181
- const { devStatusCommand } = await import("./dev-4OAJCQRQ.js");
181
+ const { devStatusCommand } = await import("./dev-VNDV6R24.js");
182
182
  await devStatusCommand();
183
183
  });
184
184
  dev.command("sync").description(
185
185
  "Copy local source files to plugin cache (no version bump needed)"
186
186
  ).action(async () => {
187
- const { devSyncCommand } = await import("./dev-4OAJCQRQ.js");
187
+ const { devSyncCommand } = await import("./dev-VNDV6R24.js");
188
188
  await devSyncCommand();
189
189
  });
190
190
  dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
191
191
  "[path]",
192
192
  "path to local coding-friend repo (default: saved path or cwd)"
193
193
  ).action(async (path) => {
194
- const { devRestartCommand } = await import("./dev-4OAJCQRQ.js");
194
+ const { devRestartCommand } = await import("./dev-VNDV6R24.js");
195
195
  await devRestartCommand(path);
196
196
  });
197
197
  dev.command("update").description("Update local dev plugin to latest version (off + on)").argument(
198
198
  "[path]",
199
199
  "path to local coding-friend repo (default: saved path or cwd)"
200
200
  ).action(async (path) => {
201
- const { devUpdateCommand } = await import("./dev-4OAJCQRQ.js");
201
+ const { devUpdateCommand } = await import("./dev-VNDV6R24.js");
202
202
  await devUpdateCommand(path);
203
203
  });
204
204
  program.hook("postAction", async () => {
@@ -2,21 +2,25 @@ import {
2
2
  ensureMemoryBuilt,
3
3
  isMemoryInitialized,
4
4
  memoryInitWizard
5
- } from "./chunk-E7OY4UWW.js";
5
+ } from "./chunk-CNUERVBN.js";
6
6
  import {
7
7
  memoryConfigMenu
8
- } from "./chunk-XROT7L2F.js";
8
+ } from "./chunk-AJ57KPF7.js";
9
9
  import {
10
10
  getLibPath
11
11
  } from "./chunk-RZRT7NGT.js";
12
- import "./chunk-J4N2ODQ5.js";
12
+ import "./chunk-2S6K2QY3.js";
13
13
  import {
14
14
  findStatuslineHookPath,
15
+ getCurrentAccountEmail,
15
16
  isStatuslineConfigured,
17
+ loadStatuslineAlias,
18
+ promptAccountAlias,
19
+ saveStatuslineAlias,
16
20
  saveStatuslineConfig,
17
21
  selectStatuslineComponents,
18
22
  writeStatuslineSettings
19
- } from "./chunk-XQ5KAXKL.js";
23
+ } from "./chunk-LXZ47XCD.js";
20
24
  import {
21
25
  DEFAULT_CONFIG
22
26
  } from "./chunk-DHH6SRXV.js";
@@ -59,7 +63,7 @@ import {
59
63
  getExistingRules,
60
64
  getMissingRules,
61
65
  logPluginScriptWarning
62
- } from "./chunk-JVYZ72EP.js";
66
+ } from "./chunk-ADCFJSCP.js";
63
67
  import {
64
68
  mergeJson,
65
69
  readJson,
@@ -587,6 +591,15 @@ async function stepStatusline() {
587
591
  );
588
592
  }
589
593
  }
594
+ if (components.includes("account")) {
595
+ const email = getCurrentAccountEmail();
596
+ if (email) {
597
+ const alias = await promptAccountAlias(email, loadStatuslineAlias(email));
598
+ saveStatuslineAlias(email, alias);
599
+ } else {
600
+ log.dim("No account detected \u2014 skipping alias setup.");
601
+ }
602
+ }
590
603
  saveStatuslineConfig(components);
591
604
  writeStatuslineSettings(hookResult.hookPath);
592
605
  log.success("Statusline configured!");
@@ -827,7 +840,7 @@ async function initMenu(gitAvailable) {
827
840
  log.success(`Saved to ${targetPath}`);
828
841
  }
829
842
  if (autoApproveChoice) {
830
- const { runDangerousRulesAudit } = await import("./permissions-O24R7WUU.js");
843
+ const { runDangerousRulesAudit } = await import("./permissions-DDLSTTPS.js");
831
844
  await runDangerousRulesAudit(
832
845
  [
833
846
  claudeProjectSettingsPath(),
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getLatestVersion,
3
3
  semverCompare
4
- } from "./chunk-RGQGKOBH.js";
4
+ } from "./chunk-4IUUWBZG.js";
5
5
  import {
6
6
  getInstalledVersion
7
- } from "./chunk-XQ5KAXKL.js";
7
+ } from "./chunk-LXZ47XCD.js";
8
8
  import "./chunk-DHH6SRXV.js";
9
9
  import {
10
10
  ensureShellCompletion
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ensureMemoryBuilt,
3
3
  printMemoryMcpConfig
4
- } from "./chunk-E7OY4UWW.js";
5
- import "./chunk-XROT7L2F.js";
4
+ } from "./chunk-CNUERVBN.js";
5
+ import "./chunk-AJ57KPF7.js";
6
6
  import {
7
7
  getLibPath
8
8
  } from "./chunk-RZRT7NGT.js";
9
9
  import {
10
10
  resolveDocsDir,
11
11
  resolveMemoryDir
12
- } from "./chunk-J4N2ODQ5.js";
12
+ } from "./chunk-2S6K2QY3.js";
13
13
  import "./chunk-DHH6SRXV.js";
14
14
  import "./chunk-HPNRQYLM.js";
15
15
  import {
@@ -13,10 +13,10 @@ import {
13
13
  memoryStatusCommand,
14
14
  memoryStopDaemonCommand,
15
15
  printMemoryMcpConfig
16
- } from "./chunk-E7OY4UWW.js";
17
- import "./chunk-XROT7L2F.js";
16
+ } from "./chunk-CNUERVBN.js";
17
+ import "./chunk-AJ57KPF7.js";
18
18
  import "./chunk-RZRT7NGT.js";
19
- import "./chunk-J4N2ODQ5.js";
19
+ import "./chunk-2S6K2QY3.js";
20
20
  import "./chunk-DHH6SRXV.js";
21
21
  import "./chunk-HPNRQYLM.js";
22
22
  import "./chunk-EVGXUDX4.js";
@@ -26,7 +26,7 @@ import {
26
26
  groupByCategory,
27
27
  logPluginScriptWarning,
28
28
  runDangerousRulesAudit
29
- } from "./chunk-JVYZ72EP.js";
29
+ } from "./chunk-ADCFJSCP.js";
30
30
  import {
31
31
  mergeJson,
32
32
  readJson
@@ -15,7 +15,7 @@ import {
15
15
  logPluginScriptWarning,
16
16
  runDangerousRulesAudit,
17
17
  stripDangerousRules
18
- } from "./chunk-JVYZ72EP.js";
18
+ } from "./chunk-ADCFJSCP.js";
19
19
  import "./chunk-5UVDWG5L.js";
20
20
  export {
21
21
  DANGEROUS_RULE_PATTERNS,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadConfig
3
- } from "./chunk-J4N2ODQ5.js";
3
+ } from "./chunk-2S6K2QY3.js";
4
4
  import "./chunk-DHH6SRXV.js";
5
5
  import {
6
6
  claudeSessionDir,
@@ -3,16 +3,16 @@ import {
3
3
  } from "./chunk-RZRT7NGT.js";
4
4
  import {
5
5
  resolveMemoryDir
6
- } from "./chunk-J4N2ODQ5.js";
6
+ } from "./chunk-2S6K2QY3.js";
7
7
  import {
8
8
  getCliVersion,
9
9
  getLatestCliVersion,
10
10
  getLatestVersion,
11
11
  semverCompare
12
- } from "./chunk-RGQGKOBH.js";
12
+ } from "./chunk-4IUUWBZG.js";
13
13
  import {
14
14
  getInstalledVersion
15
- } from "./chunk-XQ5KAXKL.js";
15
+ } from "./chunk-LXZ47XCD.js";
16
16
  import "./chunk-DHH6SRXV.js";
17
17
  import "./chunk-DMJCO6LJ.js";
18
18
  import {
@@ -30,7 +30,7 @@ import {
30
30
  import "./chunk-NREZK463.js";
31
31
  import {
32
32
  getExistingRules
33
- } from "./chunk-JVYZ72EP.js";
33
+ } from "./chunk-ADCFJSCP.js";
34
34
  import {
35
35
  readJson
36
36
  } from "./chunk-5UVDWG5L.js";
@@ -1,10 +1,14 @@
1
1
  import {
2
2
  findStatuslineHookPath,
3
+ getCurrentAccountEmail,
3
4
  isStatuslineConfigured,
5
+ loadStatuslineAlias,
6
+ promptAccountAlias,
7
+ saveStatuslineAlias,
4
8
  saveStatuslineConfig,
5
9
  selectStatuslineComponents,
6
10
  writeStatuslineSettings
7
- } from "./chunk-XQ5KAXKL.js";
11
+ } from "./chunk-LXZ47XCD.js";
8
12
  import {
9
13
  ALL_COMPONENT_IDS
10
14
  } from "./chunk-DHH6SRXV.js";
@@ -59,6 +63,16 @@ async function statuslineCommand() {
59
63
  "Account info requires jq. Install it first, or the statusline will skip account info."
60
64
  );
61
65
  }
66
+ let alias;
67
+ if (components.includes("account")) {
68
+ const email = getCurrentAccountEmail();
69
+ if (email) {
70
+ alias = await promptAccountAlias(email, loadStatuslineAlias(email));
71
+ saveStatuslineAlias(email, alias);
72
+ } else {
73
+ log.dim("No account detected \u2014 skipping alias setup.");
74
+ }
75
+ }
62
76
  saveStatuslineConfig(components);
63
77
  writeStatuslineSettings(result.hookPath);
64
78
  log.success("Statusline configured!");
@@ -68,6 +82,9 @@ async function statuslineCommand() {
68
82
  } else {
69
83
  log.dim("Showing all components.");
70
84
  }
85
+ if (alias) {
86
+ log.dim(`Account alias: ${alias}`);
87
+ }
71
88
  }
72
89
  export {
73
90
  statuslineCommand
@@ -4,8 +4,8 @@ import {
4
4
  getLatestVersion,
5
5
  semverCompare,
6
6
  updateCommand
7
- } from "./chunk-RGQGKOBH.js";
8
- import "./chunk-XQ5KAXKL.js";
7
+ } from "./chunk-4IUUWBZG.js";
8
+ import "./chunk-LXZ47XCD.js";
9
9
  import "./chunk-DHH6SRXV.js";
10
10
  import "./chunk-DMJCO6LJ.js";
11
11
  import "./chunk-HPNRQYLM.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coding-friend-cli",
3
- "version": "1.28.0",
3
+ "version": "1.30.0",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {