coding-friend-cli 1.29.0 → 1.31.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";
@@ -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
@@ -403,6 +407,10 @@ async function editAutoApprove(globalCfg, localCfg) {
403
407
  log,
404
408
  (message) => confirm({ message, default: true })
405
409
  );
410
+ log.dim(
411
+ "Tip: Fine-tune with autoApproveAllowExtra / autoApproveIgnore in config.json"
412
+ );
413
+ log.dim("Docs: https://cf.dinhanhthi.com/docs/reference/auto-approve/");
406
414
  }
407
415
  }
408
416
  async function editStatusline() {
@@ -423,6 +431,16 @@ async function editStatusline() {
423
431
  if (!overwrite) return;
424
432
  }
425
433
  const components = await selectStatuslineComponents();
434
+ let alias;
435
+ if (components.includes("account")) {
436
+ const email = getCurrentAccountEmail();
437
+ if (email) {
438
+ alias = await promptAccountAlias(email, loadStatuslineAlias(email));
439
+ saveStatuslineAlias(email, alias);
440
+ } else {
441
+ log.dim("No account detected \u2014 skipping alias setup.");
442
+ }
443
+ }
426
444
  saveStatuslineConfig(components);
427
445
  writeStatuslineSettings(hookResult.hookPath);
428
446
  log.success("Statusline configured!");
@@ -431,6 +449,9 @@ async function editStatusline() {
431
449
  } else {
432
450
  log.dim("Showing all components.");
433
451
  }
452
+ if (alias) {
453
+ log.dim(`Account alias: ${alias}`);
454
+ }
434
455
  log.dim("Restart Claude Code (or start a new session) to see it.");
435
456
  }
436
457
  var GITIGNORE_START = "# >>> coding-friend managed";
@@ -570,7 +591,7 @@ async function editPermissions() {
570
591
  )
571
592
  });
572
593
  if (choice === BACK) return;
573
- const { permissionCommand } = await import("./permission-HU36DY4C.js");
594
+ const { permissionCommand } = await import("./permission-EIOCPY2C.js");
574
595
  switch (choice) {
575
596
  case "interactive":
576
597
  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
@@ -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-4GHLRTOK.js");
33
+ const { initCommand } = await import("./init-RGLJY6YH.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-GRJ5WKFR.js");
37
+ const { configCommand } = await import("./config-NJE6PLDZ.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-HU36DY4C.js");
52
+ const { permissionCommand } = await import("./permission-EIOCPY2C.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-7WFW4JI2.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,7 +144,7 @@ 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
  );
@@ -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";
@@ -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!");
@@ -837,6 +850,12 @@ async function initMenu(gitAvailable) {
837
850
  log,
838
851
  (message) => confirm({ message, default: true })
839
852
  );
853
+ log.dim(
854
+ "Tip: Fine-tune with autoApproveAllowExtra / autoApproveIgnore in config.json"
855
+ );
856
+ log.dim(
857
+ "Docs: https://cf.dinhanhthi.com/docs/reference/auto-approve/"
858
+ );
840
859
  }
841
860
  break;
842
861
  }
@@ -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";
@@ -205,6 +205,10 @@ async function autoApproveFlow() {
205
205
  log,
206
206
  (message) => confirm({ message, default: true })
207
207
  );
208
+ log.dim(
209
+ "Tip: Fine-tune with autoApproveAllowExtra / autoApproveIgnore in config.json"
210
+ );
211
+ log.dim("Docs: https://cf.dinhanhthi.com/docs/reference/auto-approve/");
208
212
  }
209
213
  }
210
214
  async function permissionCommand(opts) {
@@ -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 {
@@ -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.29.0",
3
+ "version": "1.31.0",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {