@zentao-hub/cli 0.1.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 (81) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +175 -0
  3. package/README.zh-CN.md +192 -0
  4. package/dist/agents.d.ts +62 -0
  5. package/dist/agents.js +202 -0
  6. package/dist/agents.js.map +1 -0
  7. package/dist/commands/init.d.ts +9 -0
  8. package/dist/commands/init.js +94 -0
  9. package/dist/commands/init.js.map +1 -0
  10. package/dist/commands/install-claude-md.d.ts +12 -0
  11. package/dist/commands/install-claude-md.js +25 -0
  12. package/dist/commands/install-claude-md.js.map +1 -0
  13. package/dist/commands/install-commands.d.ts +8 -0
  14. package/dist/commands/install-commands.js +27 -0
  15. package/dist/commands/install-commands.js.map +1 -0
  16. package/dist/commands/install-hooks.d.ts +7 -0
  17. package/dist/commands/install-hooks.js +31 -0
  18. package/dist/commands/install-hooks.js.map +1 -0
  19. package/dist/commands/install-mcp.d.ts +20 -0
  20. package/dist/commands/install-mcp.js +203 -0
  21. package/dist/commands/install-mcp.js.map +1 -0
  22. package/dist/commands/login.d.ts +17 -0
  23. package/dist/commands/login.js +110 -0
  24. package/dist/commands/login.js.map +1 -0
  25. package/dist/commands/logout.d.ts +7 -0
  26. package/dist/commands/logout.js +59 -0
  27. package/dist/commands/logout.js.map +1 -0
  28. package/dist/commands/profiles.d.ts +5 -0
  29. package/dist/commands/profiles.js +26 -0
  30. package/dist/commands/profiles.js.map +1 -0
  31. package/dist/commands/register.d.ts +12 -0
  32. package/dist/commands/register.js +26 -0
  33. package/dist/commands/register.js.map +1 -0
  34. package/dist/commands/repos.d.ts +8 -0
  35. package/dist/commands/repos.js +28 -0
  36. package/dist/commands/repos.js.map +1 -0
  37. package/dist/commands/uninstall-claude-md.d.ts +6 -0
  38. package/dist/commands/uninstall-claude-md.js +13 -0
  39. package/dist/commands/uninstall-claude-md.js.map +1 -0
  40. package/dist/commands/uninstall-commands.d.ts +7 -0
  41. package/dist/commands/uninstall-commands.js +21 -0
  42. package/dist/commands/uninstall-commands.js.map +1 -0
  43. package/dist/commands/uninstall-hooks.d.ts +6 -0
  44. package/dist/commands/uninstall-hooks.js +36 -0
  45. package/dist/commands/uninstall-hooks.js.map +1 -0
  46. package/dist/commands/uninstall-mcp.d.ts +8 -0
  47. package/dist/commands/uninstall-mcp.js +99 -0
  48. package/dist/commands/uninstall-mcp.js.map +1 -0
  49. package/dist/commands/uninstall.d.ts +14 -0
  50. package/dist/commands/uninstall.js +28 -0
  51. package/dist/commands/uninstall.js.map +1 -0
  52. package/dist/commands/use.d.ts +6 -0
  53. package/dist/commands/use.js +20 -0
  54. package/dist/commands/use.js.map +1 -0
  55. package/dist/commands/whoami.d.ts +6 -0
  56. package/dist/commands/whoami.js +48 -0
  57. package/dist/commands/whoami.js.map +1 -0
  58. package/dist/commands/workspace.d.ts +8 -0
  59. package/dist/commands/workspace.js +28 -0
  60. package/dist/commands/workspace.js.map +1 -0
  61. package/dist/index.d.ts +2 -0
  62. package/dist/index.js +496 -0
  63. package/dist/index.js.map +1 -0
  64. package/dist/paths.d.ts +16 -0
  65. package/dist/paths.js +36 -0
  66. package/dist/paths.js.map +1 -0
  67. package/dist/prompt.d.ts +7 -0
  68. package/dist/prompt.js +43 -0
  69. package/dist/prompt.js.map +1 -0
  70. package/dist/registry.d.ts +16 -0
  71. package/dist/registry.js +42 -0
  72. package/dist/registry.js.map +1 -0
  73. package/dist/util.d.ts +27 -0
  74. package/dist/util.js +70 -0
  75. package/dist/util.js.map +1 -0
  76. package/package.json +57 -0
  77. package/templates/.claude/commands/bug-analyze.md +46 -0
  78. package/templates/.claude/commands/fix-bug.md +193 -0
  79. package/templates/.githooks/commit-msg +47 -0
  80. package/templates/CLAUDE.md +86 -0
  81. package/templates/repos.yaml.example +26 -0
@@ -0,0 +1,59 @@
1
+ import { accountKey, deleteStore, detectBackend, readStore, resolveCredentialsPath, writeStore, } from "@zentao-hub/sdk";
2
+ import { CliError, info, warn } from "../util.js";
3
+ export async function logout(opts) {
4
+ const credsPath = resolveCredentialsPath(opts.credentials);
5
+ const store = await readStore(credsPath).catch(() => undefined);
6
+ if (!store) {
7
+ info(`No credentials file at ${credsPath} (already logged out)`);
8
+ return;
9
+ }
10
+ if (opts.all) {
11
+ await clearAllKeychainEntries(store);
12
+ await deleteStore(credsPath);
13
+ info(`Removed all profiles and ${credsPath}`);
14
+ return;
15
+ }
16
+ const profile = opts.profile ?? store.default;
17
+ const entry = store.profiles[profile];
18
+ if (!entry) {
19
+ throw new CliError(`No profile '${profile}' in ${credsPath}. Available: ${Object.keys(store.profiles).join(", ") || "<none>"}`);
20
+ }
21
+ const backend = detectBackend();
22
+ if (backend.available) {
23
+ try {
24
+ await backend.delete(accountKey(entry.baseUrl, entry.username));
25
+ info(`Removed cached password from ${backend.name} (profile '${profile}')`);
26
+ }
27
+ catch (err) {
28
+ warn(`Failed to delete password from ${backend.name}: ${err.message}`);
29
+ }
30
+ }
31
+ delete store.profiles[profile];
32
+ const remaining = Object.keys(store.profiles);
33
+ if (remaining.length === 0) {
34
+ await deleteStore(credsPath);
35
+ info(`Removed last profile and ${credsPath}`);
36
+ return;
37
+ }
38
+ if (store.default === profile) {
39
+ // Removed profile was default — pick the first remaining one.
40
+ store.default = remaining[0];
41
+ info(`Default profile is now '${store.default}'`);
42
+ }
43
+ await writeStore(credsPath, store);
44
+ info(`Removed profile '${profile}'. Remaining: ${remaining.join(", ")}`);
45
+ }
46
+ async function clearAllKeychainEntries(store) {
47
+ const backend = detectBackend();
48
+ if (!backend.available)
49
+ return;
50
+ for (const [name, p] of Object.entries(store.profiles)) {
51
+ try {
52
+ await backend.delete(accountKey(p.baseUrl, p.username));
53
+ }
54
+ catch (err) {
55
+ warn(`Failed to delete keychain entry for profile '${name}': ${err.message}`);
56
+ }
57
+ }
58
+ }
59
+ //# sourceMappingURL=logout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logout.js","sourceRoot":"","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AE,CAAC;QACvD,IAAI,CAAC;YACH,MAAM,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC1D,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CACF,gDAAgD,IAAI,MAAO,GAAa,CAAC,OAAO,EAAE,CACnF,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ interface Options {
2
+ credentials?: string;
3
+ }
4
+ export declare function profiles(opts: Options): Promise<void>;
5
+ export {};
@@ -0,0 +1,26 @@
1
+ import { readStore, resolveCredentialsPath } from "@zentao-hub/sdk";
2
+ import { info } from "../util.js";
3
+ export async function profiles(opts) {
4
+ const credsPath = resolveCredentialsPath(opts.credentials);
5
+ const store = await readStore(credsPath).catch(() => undefined);
6
+ if (!store) {
7
+ info(`No credentials file at ${credsPath}.`);
8
+ info(`Run 'zentao-hub login [--profile <name>]' to authenticate.`);
9
+ process.exitCode = 1;
10
+ return;
11
+ }
12
+ info(`Credentials: ${credsPath}`);
13
+ info(`Default: ${store.default}`);
14
+ info(``);
15
+ const names = Object.keys(store.profiles).sort();
16
+ const colW = Math.max(7, ...names.map((n) => n.length));
17
+ info(`${"NAME".padEnd(colW)} URL USER`);
18
+ for (const name of names) {
19
+ const p = store.profiles[name];
20
+ const marker = name === store.default ? "*" : " ";
21
+ info(`${marker} ${name.padEnd(colW)} ${p.baseUrl.padEnd(45)} ${p.username}`);
22
+ }
23
+ info(``);
24
+ info(`* = default. Switch with 'zentao-hub use <name>'.`);
25
+ }
26
+ //# sourceMappingURL=profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/commands/profiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,Y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CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CACzE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,mDAAmD,CAAC,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,12 @@
1
+ interface Options {
2
+ productId: number;
3
+ repoPath: string;
4
+ name?: string;
5
+ tags?: string[];
6
+ workspace?: string;
7
+ profile?: string;
8
+ credentials?: string;
9
+ skipGitCheck?: boolean;
10
+ }
11
+ export declare function register(opts: Options): Promise<void>;
12
+ export {};
@@ -0,0 +1,26 @@
1
+ import path from "node:path";
2
+ import { CliError, info, isGitRepo } from "../util.js";
3
+ import { addEntry, loadRegistry, registryPath, saveRegistry } from "../registry.js";
4
+ import { resolveCredentialsPath, resolveProfileName } from "@zentao-hub/sdk";
5
+ export async function register(opts) {
6
+ const resolved = path.resolve(opts.repoPath);
7
+ if (!opts.skipGitCheck && !isGitRepo(resolved)) {
8
+ throw new CliError(`${resolved} is not a git repository. Pass --skip-git-check to add it anyway.`);
9
+ }
10
+ const credsPath = resolveCredentialsPath(opts.credentials);
11
+ const profile = await resolveProfileName(opts.profile, credsPath);
12
+ const reg = await loadRegistry(profile, opts.workspace);
13
+ const { added } = addEntry(reg, opts.productId, {
14
+ path: resolved,
15
+ name: opts.name,
16
+ tags: opts.tags,
17
+ });
18
+ if (!added) {
19
+ info(`Already registered: product ${opts.productId} → ${resolved} (profile '${profile}')`);
20
+ return;
21
+ }
22
+ await saveRegistry(reg, profile, opts.workspace);
23
+ info(`Registered product ${opts.productId} → ${resolved} (profile '${profile}')`);
24
+ info(`Wrote ${registryPath(profile, opts.workspace)}`);
25
+ }
26
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/commands/register.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EA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AAI,CAAC,CAAC;IAClF,IAAI,CAAC,SAAS,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface Options {
2
+ productId?: number;
3
+ workspace?: string;
4
+ profile?: string;
5
+ credentials?: string;
6
+ }
7
+ export declare function repos(opts: Options): Promise<void>;
8
+ export {};
@@ -0,0 +1,28 @@
1
+ import { info } from "../util.js";
2
+ import { loadRegistry, registryPath } from "../registry.js";
3
+ import { resolveCredentialsPath, resolveProfileName } from "@zentao-hub/sdk";
4
+ export async function repos(opts) {
5
+ const credsPath = resolveCredentialsPath(opts.credentials);
6
+ const profile = await resolveProfileName(opts.profile, credsPath);
7
+ const reg = await loadRegistry(profile, opts.workspace);
8
+ info(`Profile: ${profile}`);
9
+ info(`Registry: ${registryPath(profile, opts.workspace)}`);
10
+ const products = opts.productId
11
+ ? { [String(opts.productId)]: reg.products[String(opts.productId)] ?? [] }
12
+ : reg.products;
13
+ const keys = Object.keys(products);
14
+ if (keys.length === 0) {
15
+ info(` (empty)`);
16
+ return;
17
+ }
18
+ for (const pid of keys) {
19
+ const entries = products[pid] ?? [];
20
+ info(` product ${pid}: ${entries.length} entr${entries.length === 1 ? "y" : "ies"}`);
21
+ for (const e of entries) {
22
+ const name = e.name ?? "";
23
+ const tags = e.tags && e.tags.length ? ` [${e.tags.join(", ")}]` : "";
24
+ info(` - ${name ? `${name} ` : ""}${e.path}${tags}`);
25
+ }
26
+ }
27
+ }
28
+ //# sourceMappingURL=repos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repos.js","sourceRoot":"","sources":["../../src/commands/repos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,iBAA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AAI,IAAI,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACtE,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface Options {
2
+ agent?: string;
3
+ repo?: string;
4
+ }
5
+ export declare function uninstallClaudeMd(opts: Options): Promise<void>;
6
+ export {};
@@ -0,0 +1,13 @@
1
+ import path from "node:path";
2
+ import { describeAgent, resolveAgent, resolveAgentInstructionsFile } from "../agents.js";
3
+ import { info, removeFile } from "../util.js";
4
+ export async function uninstallClaudeMd(opts) {
5
+ const agent = await resolveAgent(opts.agent);
6
+ const repo = path.resolve(opts.repo ?? process.cwd());
7
+ const { abs: dest, rel } = resolveAgentInstructionsFile(agent, repo);
8
+ info(`Removing ${describeAgent(agent)} instructions file from ${dest}`);
9
+ const result = await removeFile(dest);
10
+ info(` ${result === "removed" ? "ok " : "skip"} ${rel}` +
11
+ (result === "missing" ? " (not present)" : ""));
12
+ }
13
+ //# sourceMappingURL=uninstall-claude-md.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uninstall-claude-md.js","sourceRoot":"","sources":["../../src/commands/uninstall-claude-md.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAO9C,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAa;IACnD,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,4BAA4B,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACrE,IAAI,CAAC,YAAY,aAAa,CAAC,KAAK,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CACF,KAAK,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,EAAE;QACnD,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CACjD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface Options {
2
+ agent?: string;
3
+ dest?: string;
4
+ repo?: string;
5
+ }
6
+ export declare function uninstallCommands(opts: Options): Promise<void>;
7
+ export {};
@@ -0,0 +1,21 @@
1
+ import path from "node:path";
2
+ import { describeAgent, resolveAgent, resolveAgentPromptsDir } from "../agents.js";
3
+ import { info, removeFile, removeIfEmpty } from "../util.js";
4
+ const FILES = ["fix-bug.md", "bug-analyze.md"];
5
+ export async function uninstallCommands(opts) {
6
+ const agent = await resolveAgent(opts.agent);
7
+ const { dir: dest, suffix } = resolveAgentPromptsDir(agent, {
8
+ explicit: opts.dest,
9
+ repo: opts.repo,
10
+ });
11
+ info(`Removing ${describeAgent(agent)} slash commands from ${dest}`);
12
+ for (const name of FILES) {
13
+ const outName = suffix === ".md" ? name : name.replace(/\.md$/, suffix);
14
+ const result = await removeFile(path.join(dest, outName));
15
+ info(` ${result === "removed" ? "ok " : "skip"} ${outName}` +
16
+ (result === "missing" ? " (not present)" : ""));
17
+ }
18
+ // Drop the directory only if it's empty — user might have other prompts there.
19
+ await removeIfEmpty(dest);
20
+ }
21
+ //# sourceMappingURL=uninstall-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uninstall-commands.js","sourceRoot":"","sources":["../../src/commands/uninstall-commands.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAQ7D,MAAM,KAAK,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAU,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAa;IACnD,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,sBAAsB,CAAC,KAAK,EAAE;QAC1D,QAAQ,EAAE,IAAI,CAAC,IAAI;QACnB,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC,CAAC;IACH,IAAI,CAAC,YAAY,aAAa,CAAC,KAAK,CAAC,wBAAwB,IAAI,EAAE,CAAC,CAAC;IACrE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QAC1D,IAAI,CACF,KAAK,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,EAAE;YACvD,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CACjD,CAAC;IACJ,CAAC;IACD,+EAA+E;IAC/E,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface Options {
2
+ repo?: string;
3
+ keepHooksPath?: boolean;
4
+ }
5
+ export declare function uninstallHooks(opts: Options): Promise<void>;
6
+ export {};
@@ -0,0 +1,36 @@
1
+ import path from "node:path";
2
+ import { CliError, git, info, isGitRepo, removeFile, removeIfEmpty, warn } from "../util.js";
3
+ export async function uninstallHooks(opts) {
4
+ const repo = path.resolve(opts.repo ?? process.cwd());
5
+ if (!isGitRepo(repo)) {
6
+ throw new CliError(`${repo} is not a git repository`);
7
+ }
8
+ const hooksDir = path.join(repo, ".githooks");
9
+ const destHook = path.join(hooksDir, "commit-msg");
10
+ info(`Removing commit-msg hook from ${destHook}`);
11
+ const result = await removeFile(destHook);
12
+ info(` ${result === "removed" ? "ok " : "skip"} commit-msg${result === "missing" ? " (not present)" : ""}`);
13
+ await removeIfEmpty(hooksDir);
14
+ if (opts.keepHooksPath) {
15
+ info(` skip git config core.hooksPath (--keep-hooks-path)`);
16
+ return;
17
+ }
18
+ const current = git(repo, ["config", "--get", "core.hooksPath"]);
19
+ if (current.status !== 0) {
20
+ info(` skip git config core.hooksPath (not set)`);
21
+ return;
22
+ }
23
+ const value = current.stdout.trim();
24
+ if (value !== ".githooks") {
25
+ warn(`core.hooksPath is set to '${value}' (not '.githooks'); leaving it alone. Pass --keep-hooks-path to silence this, or unset it manually if intended.`);
26
+ return;
27
+ }
28
+ const unset = git(repo, ["config", "--unset", "core.hooksPath"]);
29
+ if (unset.status === 0) {
30
+ info(` ok git config --unset core.hooksPath`);
31
+ }
32
+ else {
33
+ throw new CliError(`failed to unset core.hooksPath: ${unset.stderr.trim() || unset.stdout.trim()}`);
34
+ }
35
+ }
36
+ //# sourceMappingURL=uninstall-hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uninstall-hooks.js","sourceRoot":"","sources":["../../src/commands/uninstall-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAO7F,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAa;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACtD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,QAAQ,CAAC,GAAG,IAAI,0BAA0B,CAAC,CAAC;IACxD,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACnD,IAAI,CAAC,iCAAiC,QAAQ,EAAE,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,eAAe,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC/G,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;IAE9B,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;QACvB,IAAI,CAAC,uDAAuD,CAAC,CAAC;QAC9D,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACjE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,IAAI,CAAC,6CAA6C,CAAC,CAAC;QACpD,OAAO;IACT,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;QAC1B,IAAI,CACF,6BAA6B,KAAK,kHAAkH,CACrJ,CAAC;QACF,OAAO;IACT,CAAC;IACD,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACjE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,IAAI,CAAC,2CAA2C,CAAC,CAAC;IACpD,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,QAAQ,CAChB,mCAAmC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAChF,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface Options {
2
+ agent?: string;
3
+ scope?: string;
4
+ repo?: string;
5
+ name?: string;
6
+ }
7
+ export declare function uninstallMcp(opts: Options): Promise<void>;
8
+ export {};
@@ -0,0 +1,99 @@
1
+ import fs from "node:fs/promises";
2
+ import { existsSync } from "node:fs";
3
+ import { describeAgent, resolveAgent, resolveMcpTarget } from "../agents.js";
4
+ import { CliError, info } from "../util.js";
5
+ const DEFAULT_SERVER_NAME = "zentao-hub";
6
+ export async function uninstallMcp(opts) {
7
+ const agent = await resolveAgent(opts.agent);
8
+ const scope = parseScope(opts.scope);
9
+ const target = resolveMcpTarget(agent, { scope, repo: opts.repo });
10
+ const serverName = (opts.name ?? DEFAULT_SERVER_NAME).trim();
11
+ info(`Removing MCP server '${serverName}' from ${describeAgent(agent)}`);
12
+ info(` target ${target.path}`);
13
+ if (!existsSync(target.path)) {
14
+ info(` skip (config file does not exist)`);
15
+ return;
16
+ }
17
+ if (target.format === "json") {
18
+ await removeJsonEntry(target, serverName);
19
+ }
20
+ else {
21
+ await removeTomlSection(target, serverName);
22
+ }
23
+ }
24
+ function parseScope(raw) {
25
+ if (!raw)
26
+ return "user";
27
+ const v = raw.toLowerCase();
28
+ if (v === "user" || v === "workspace" || v === "project") {
29
+ return v === "project" ? "workspace" : v;
30
+ }
31
+ throw new CliError(`--scope must be 'user' or 'workspace', got '${raw}'`);
32
+ }
33
+ async function removeJsonEntry(target, serverName) {
34
+ const key = target.jsonKey ?? "mcpServers";
35
+ const text = await fs.readFile(target.path, "utf8");
36
+ if (!text.trim()) {
37
+ info(` skip ${serverName} (config empty)`);
38
+ return;
39
+ }
40
+ let parsed;
41
+ try {
42
+ parsed = JSON.parse(text);
43
+ }
44
+ catch (err) {
45
+ throw new CliError(`Failed to parse ${target.path} as JSON: ${err.message}`);
46
+ }
47
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
48
+ throw new CliError(`${target.path} does not contain a JSON object at the top level`);
49
+ }
50
+ const root = parsed;
51
+ const map = root[key];
52
+ if (!map || !(serverName in map)) {
53
+ info(` skip ${serverName} (not present)`);
54
+ return;
55
+ }
56
+ delete map[serverName];
57
+ if (Object.keys(map).length === 0) {
58
+ delete root[key];
59
+ }
60
+ else {
61
+ root[key] = map;
62
+ }
63
+ await fs.writeFile(target.path, JSON.stringify(root, null, 2) + "\n", "utf8");
64
+ info(` ok removed ${serverName}`);
65
+ }
66
+ async function removeTomlSection(target, serverName) {
67
+ const prefix = target.tomlSectionPrefix ?? "mcp_servers";
68
+ const header = `[${prefix}.${serverName}]`;
69
+ const text = await fs.readFile(target.path, "utf8");
70
+ const lines = text.split("\n");
71
+ let startIdx = -1;
72
+ let endIdx = -1;
73
+ for (let i = 0; i < lines.length; i++) {
74
+ if (lines[i].trim() === header) {
75
+ startIdx = i;
76
+ for (let j = i + 1; j < lines.length; j++) {
77
+ if (/^\s*\[/.test(lines[j])) {
78
+ endIdx = j;
79
+ break;
80
+ }
81
+ }
82
+ if (endIdx === -1)
83
+ endIdx = lines.length;
84
+ break;
85
+ }
86
+ }
87
+ if (startIdx === -1) {
88
+ info(` skip ${serverName} (section not present)`);
89
+ return;
90
+ }
91
+ const before = lines.slice(0, startIdx).join("\n");
92
+ const after = lines.slice(endIdx).join("\n");
93
+ const joined = before.length === 0
94
+ ? after.replace(/^\n+/, "")
95
+ : before + (before.endsWith("\n") ? "" : "\n") + after.replace(/^\n+/, "");
96
+ await fs.writeFile(target.path, joined, "utf8");
97
+ info(` ok removed ${header}`);
98
+ }
99
+ //# sourceMappingURL=uninstall-mcp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uninstall-mcp.js","sourceRoot":"","sources":["../../src/commands/uninstall-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAa,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAS5C,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAa;IAC9C,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACnE,MAAM,UAAU,GAAG,CAAC,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,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,KAAK,CAAC;QACjB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QAC3B,CAAC,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/E,MAAM,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,IAAI,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,14 @@
1
+ interface Options {
2
+ agent?: string;
3
+ repo?: string;
4
+ dest?: string;
5
+ keepHooksPath?: boolean;
6
+ }
7
+ /**
8
+ * One-shot uninstall: removes the chosen agent's slash commands + AI
9
+ * instructions file, plus the commit-msg hook from the specified repo
10
+ * (cwd by default). Credentials and workspaces are NOT touched —
11
+ * those are the user's data and have their own commands (logout, etc.).
12
+ */
13
+ export declare function uninstall(opts: Options): Promise<void>;
14
+ export {};
@@ -0,0 +1,28 @@
1
+ import { resolveAgent } from "../agents.js";
2
+ import { info } from "../util.js";
3
+ import { uninstallCommands } from "./uninstall-commands.js";
4
+ import { uninstallHooks } from "./uninstall-hooks.js";
5
+ import { uninstallClaudeMd } from "./uninstall-claude-md.js";
6
+ /**
7
+ * One-shot uninstall: removes the chosen agent's slash commands + AI
8
+ * instructions file, plus the commit-msg hook from the specified repo
9
+ * (cwd by default). Credentials and workspaces are NOT touched —
10
+ * those are the user's data and have their own commands (logout, etc.).
11
+ */
12
+ export async function uninstall(opts) {
13
+ // Resolve the agent once so each step doesn't re-prompt.
14
+ const agent = await resolveAgent(opts.agent);
15
+ info(`== uninstall commands ==`);
16
+ await uninstallCommands({ agent, dest: opts.dest, repo: opts.repo });
17
+ info(``);
18
+ info(`== uninstall hooks ==`);
19
+ await uninstallHooks({ repo: opts.repo, keepHooksPath: opts.keepHooksPath });
20
+ info(``);
21
+ info(`== uninstall claude-md ==`);
22
+ await uninstallClaudeMd({ agent, repo: opts.repo });
23
+ info(``);
24
+ info(`Done. Credentials (~/.zentao-hub/credentials.json) and per-profile`);
25
+ info(`workspaces were left in place — use 'zentao-hub logout --all' or`);
26
+ info(`'rm -rf' if you want them gone too.`);
27
+ }
28
+ //# sourceMappingURL=uninstall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAS7D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAa;IAC3C,yDAAyD;IACzD,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAE7C,IAAI,CAAC,0BAA0B,CAAC,CAAC;IACjC,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACrE,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,uBAAuB,CAAC,CAAC;IAC9B,MAAM,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IAC7E,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,2BAA2B,CAAC,CAAC;IAClC,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACpD,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,oEAAoE,CAAC,CAAC;IAC3E,IAAI,CAAC,kEAAkE,CAAC,CAAC;IACzE,IAAI,CAAC,qCAAqC,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface Options {
2
+ profile: string;
3
+ credentials?: string;
4
+ }
5
+ export declare function use(opts: Options): Promise<void>;
6
+ export {};
@@ -0,0 +1,20 @@
1
+ import { readStore, resolveCredentialsPath, writeStore, } from "@zentao-hub/sdk";
2
+ import { CliError, info } from "../util.js";
3
+ export async function use(opts) {
4
+ const credsPath = resolveCredentialsPath(opts.credentials);
5
+ const store = await readStore(credsPath).catch(() => undefined);
6
+ if (!store) {
7
+ throw new CliError(`No credentials file at ${credsPath}. Run 'zentao-hub login' first.`);
8
+ }
9
+ if (!store.profiles[opts.profile]) {
10
+ throw new CliError(`No profile '${opts.profile}'. Available: ${Object.keys(store.profiles).join(", ") || "<none>"}`);
11
+ }
12
+ if (store.default === opts.profile) {
13
+ info(`'${opts.profile}' is already the default.`);
14
+ return;
15
+ }
16
+ store.default = opts.profile;
17
+ await writeStore(credsPath, store);
18
+ info(`Default profile is now '${opts.profile}'.`);
19
+ }
20
+ //# sourceMappingURL=use.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use.js","sourceRoot":"","sources":["../../src/commands/use.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAO5C,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAa;IACrC,MAAM,SAAS,GAAG,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAChE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,QAAQ,CAChB,0BAA0B,SAAS,iCAAiC,CACrE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,QAAQ,CAChB,eAAe,IAAI,CAAC,OAAO,iBAAiB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,QAAQ,EAAE,CACjG,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,2BAA2B,CAAC,CAAC;QAClD,OAAO;IACT,CAAC;IACD,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC7B,MAAM,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACnC,IAAI,CAAC,2BAA2B,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface Options {
2
+ profile?: string;
3
+ credentials?: string;
4
+ }
5
+ export declare function whoami(opts: Options): Promise<void>;
6
+ export {};
@@ -0,0 +1,48 @@
1
+ import { accountKey, detectBackend, readStore, resolveCredentialsPath, } from "@zentao-hub/sdk";
2
+ import { CliError, info } from "../util.js";
3
+ export async function whoami(opts) {
4
+ const credsPath = resolveCredentialsPath(opts.credentials);
5
+ const store = await readStore(credsPath).catch(() => undefined);
6
+ if (!store) {
7
+ info(`Not logged in. (no credentials at ${credsPath})`);
8
+ info(`Run 'zentao-hub login' to authenticate.`);
9
+ process.exitCode = 1;
10
+ return;
11
+ }
12
+ const target = opts.profile ?? store.default;
13
+ const entry = store.profiles[target];
14
+ if (!entry) {
15
+ throw new CliError(`No profile '${target}' in ${credsPath}. Available: ${Object.keys(store.profiles).join(", ") || "<none>"}`);
16
+ }
17
+ const isDefault = store.default === target;
18
+ info(`Credentials: ${credsPath}`);
19
+ info(`Profile: ${target}${isDefault ? " (default)" : ""}`);
20
+ info(`URL: ${entry.baseUrl}`);
21
+ info(`User: ${entry.username}`);
22
+ info(`Token: ${maskToken(entry.token)}`);
23
+ if (entry.createdAt)
24
+ info(`Created: ${entry.createdAt}`);
25
+ const backend = detectBackend();
26
+ if (!backend.available) {
27
+ info(`Keychain: not available (${backend.unavailableReason ?? "unsupported"})`);
28
+ info(`Auto-refresh: disabled — rerun 'zentao-hub login' when the token expires`);
29
+ }
30
+ else {
31
+ const cached = await backend.get(accountKey(entry.baseUrl, entry.username));
32
+ info(`Keychain: ${backend.name}`);
33
+ info(`Password: ${cached ? "cached" : "not cached"}`);
34
+ info(`Auto-refresh: ${cached ? "enabled (MCP server will refresh the token on expiry)" : "disabled — rerun 'zentao-hub login' when the token expires"}`);
35
+ }
36
+ const others = Object.keys(store.profiles).filter((n) => n !== target);
37
+ if (!opts.profile && others.length > 0) {
38
+ info(``);
39
+ info(`Other profiles: ${others.join(", ")}`);
40
+ info(`Use 'zentao-hub profiles' for details, 'zentao-hub use <name>' to switch default.`);
41
+ }
42
+ }
43
+ function maskToken(token) {
44
+ if (token.length <= 8)
45
+ return "********";
46
+ return `${token.slice(0, 4)}...${token.slice(-4)}`;
47
+ }
48
+ //# sourceMappingURL=whoami.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../src/commands/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,SAAS,EACT,sB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,CAAC,KAAa;IAC9B,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,UAAU,CAAC;IACzC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACrD,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface Options {
2
+ workspace?: string;
3
+ profile?: string;
4
+ credentials?: string;
5
+ printPath?: boolean;
6
+ }
7
+ export declare function workspace(opts: Options): Promise<void>;
8
+ export {};
@@ -0,0 +1,28 @@
1
+ import { existsSync } from "node:fs";
2
+ import path from "node:path";
3
+ import { resolveWorkspace, resolveHubRoot } from "../paths.js";
4
+ import { resolveCredentialsPath, resolveProfileName } from "@zentao-hub/sdk";
5
+ import { info } from "../util.js";
6
+ export async function workspace(opts) {
7
+ const credsPath = resolveCredentialsPath(opts.credentials);
8
+ const profile = await resolveProfileName(opts.profile, credsPath);
9
+ const dir = resolveWorkspace(profile, opts.workspace);
10
+ // Machine-readable mode for slash commands: just stdout the path so callers
11
+ // can do `WS=$(zentao-hub workspace --profile $X --print-path)`.
12
+ if (opts.printPath) {
13
+ process.stdout.write(`${dir}\n`);
14
+ return;
15
+ }
16
+ const root = resolveHubRoot();
17
+ info(`Profile: ${profile}`);
18
+ info(`Hub root: ${root}`);
19
+ info(`Workspace: ${dir}`);
20
+ info(`Registry: ${path.join(dir, "repos.yaml")}${existsSync(path.join(dir, "repos.yaml")) ? "" : " (missing)"}`);
21
+ info(`Bugs dir: ${path.join(dir, "bugs")}${existsSync(path.join(dir, "bugs")) ? "" : " (missing)"}`);
22
+ info(``);
23
+ const rootSource = process.env.ZENTAO_HUB
24
+ ? "env ZENTAO_HUB"
25
+ : "default ($HOME/.zentao-hub)";
26
+ info(`Source: ${opts.workspace ? "--workspace flag (exact path override)" : rootSource}`);
27
+ }
28
+ //# sourceMappingURL=workspace.js.map
@@ -0,0 +1 @@
1
+ {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