skills-manager-cli 2026.8.26-1

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 (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +103 -0
  3. package/README.zh-CN.md +103 -0
  4. package/dist/cli/main.js +261 -0
  5. package/dist/cli/main.js.map +1 -0
  6. package/dist/cli.js +3 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/core/catalog/agent-catalog.json +1134 -0
  9. package/dist/core/catalog/evaluate-detection.js +41 -0
  10. package/dist/core/catalog/evaluate-detection.js.map +1 -0
  11. package/dist/core/catalog/extract.js +388 -0
  12. package/dist/core/catalog/extract.js.map +1 -0
  13. package/dist/core/catalog/resolve-path.js +29 -0
  14. package/dist/core/catalog/resolve-path.js.map +1 -0
  15. package/dist/core/catalog/validate-snapshot.js +117 -0
  16. package/dist/core/catalog/validate-snapshot.js.map +1 -0
  17. package/dist/core/index.js +6 -0
  18. package/dist/core/index.js.map +1 -0
  19. package/dist/core/model/catalog.js +7 -0
  20. package/dist/core/model/catalog.js.map +1 -0
  21. package/dist/core/model/index.js +7 -0
  22. package/dist/core/model/index.js.map +1 -0
  23. package/dist/core/ports/filesystem.js +2 -0
  24. package/dist/core/ports/filesystem.js.map +1 -0
  25. package/dist/core/ports/git.js +2 -0
  26. package/dist/core/ports/git.js.map +1 -0
  27. package/dist/core/ports/process-runner.js +2 -0
  28. package/dist/core/ports/process-runner.js.map +1 -0
  29. package/dist/core/services/activity-service.js +36 -0
  30. package/dist/core/services/activity-service.js.map +1 -0
  31. package/dist/core/services/adopt-service.js +7 -0
  32. package/dist/core/services/adopt-service.js.map +1 -0
  33. package/dist/core/services/archive-service.js +35 -0
  34. package/dist/core/services/archive-service.js.map +1 -0
  35. package/dist/core/services/backup-service.js +94 -0
  36. package/dist/core/services/backup-service.js.map +1 -0
  37. package/dist/core/services/catalog-service.js +123 -0
  38. package/dist/core/services/catalog-service.js.map +1 -0
  39. package/dist/core/services/distribute-service.js +474 -0
  40. package/dist/core/services/distribute-service.js.map +1 -0
  41. package/dist/core/services/doctor-service.js +75 -0
  42. package/dist/core/services/doctor-service.js.map +1 -0
  43. package/dist/core/services/index.js +54 -0
  44. package/dist/core/services/index.js.map +1 -0
  45. package/dist/core/services/init-service.js +234 -0
  46. package/dist/core/services/init-service.js.map +1 -0
  47. package/dist/core/services/install-service.js +73 -0
  48. package/dist/core/services/install-service.js.map +1 -0
  49. package/dist/core/services/migration-service.js +102 -0
  50. package/dist/core/services/migration-service.js.map +1 -0
  51. package/dist/core/services/package-service.js +33 -0
  52. package/dist/core/services/package-service.js.map +1 -0
  53. package/dist/core/services/registry-service.js +133 -0
  54. package/dist/core/services/registry-service.js.map +1 -0
  55. package/dist/core/services/skill-home-resolver.js +33 -0
  56. package/dist/core/services/skill-home-resolver.js.map +1 -0
  57. package/dist/core/services/skill-home-service.js +35 -0
  58. package/dist/core/services/skill-home-service.js.map +1 -0
  59. package/dist/core/services/source-service.js +109 -0
  60. package/dist/core/services/source-service.js.map +1 -0
  61. package/dist/core/services/update-service.js +93 -0
  62. package/dist/core/services/update-service.js.map +1 -0
  63. package/dist/core/services/view-service.js +45 -0
  64. package/dist/core/services/view-service.js.map +1 -0
  65. package/dist/dashboard/server/main.js +427 -0
  66. package/dist/dashboard/server/main.js.map +1 -0
  67. package/dist/dashboard/server/render-markdown.js +75 -0
  68. package/dist/dashboard/server/render-markdown.js.map +1 -0
  69. package/dist/dashboard/server/skill-file.js +129 -0
  70. package/dist/dashboard/server/skill-file.js.map +1 -0
  71. package/dist/dashboard-web/assets/index-B43GPIpA.js +13 -0
  72. package/dist/dashboard-web/assets/index-CzbkHV2A.css +1 -0
  73. package/dist/dashboard-web/index.html +13 -0
  74. package/dist/infra/fs-skill-home.js +87 -0
  75. package/dist/infra/fs-skill-home.js.map +1 -0
  76. package/dist/infra/git-cli.js +36 -0
  77. package/dist/infra/git-cli.js.map +1 -0
  78. package/dist/infra/index.js +5 -0
  79. package/dist/infra/index.js.map +1 -0
  80. package/dist/infra/runtime.js +23 -0
  81. package/dist/infra/runtime.js.map +1 -0
  82. package/dist/infra/shell-runner.js +18 -0
  83. package/dist/infra/shell-runner.js.map +1 -0
  84. package/dist/shared/errors.js +17 -0
  85. package/dist/shared/errors.js.map +1 -0
  86. package/dist/shared/result.js +17 -0
  87. package/dist/shared/result.js.map +1 -0
  88. package/dist/shared/validation.js +92 -0
  89. package/dist/shared/validation.js.map +1 -0
  90. package/docs/CLI.md +75 -0
  91. package/package.json +73 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sun Yongshen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # Skills Manager
2
+
3
+ **English** | [简体中文](README.zh-CN.md)
4
+
5
+ `skills-manager-cli` is a local-first CLI and dashboard for managing agent, Claude, and Codex skills from a registry-driven skill home.
6
+
7
+ ## Quick Start
8
+
9
+ **No setup needed** — just run:
10
+
11
+ ```sh
12
+ npx skills-manager-cli web
13
+ ```
14
+
15
+ This automatically creates and initializes `~/.skills-manager/` on first run.
16
+
17
+ **Already have skills in `~/.claude/skills` or other agent runtimes?** Fold them in with `skills-manager init` — content moves into the hub, originals become symlinks (backed up first):
18
+
19
+ ```sh
20
+ skills-manager init --dry-run # preview
21
+ skills-manager init # import
22
+ ```
23
+
24
+ Or install globally:
25
+
26
+ ```sh
27
+ npm install -g skills-manager-cli
28
+ # or
29
+ pnpm add -g skills-manager-cli
30
+ skills-manager web
31
+ ```
32
+
33
+ 👉 **[See Getting Started guide](docs/GETTING_STARTED.md)** for detailed instructions and common tasks.
34
+
35
+ ## Install and Run
36
+
37
+ Use without installing globally:
38
+
39
+ ```sh
40
+ npx skills-manager-cli web
41
+ ```
42
+
43
+ Or install globally from a published package or packed tarball:
44
+
45
+ ```sh
46
+ npm install -g skills-manager-cli
47
+ # or
48
+ pnpm add -g skills-manager-cli
49
+ skills-manager web
50
+ skills-manager doctor
51
+ ```
52
+
53
+ `web` opens a local Vue/Fastify dashboard by default. Use `--no-open` to keep the browser closed.
54
+
55
+ ## Skill home layout
56
+
57
+ A skill home contains:
58
+
59
+ - `skills/`: canonical skill directories, kept flat as `skills/<skill-name>/SKILL.md`
60
+ - `views/`: generated consumer symlink trees such as `views/agents/` and `views/claude/`
61
+ - `collections/`: generated category symlink trees
62
+ - `registry.yaml`: metadata, provenance, consumers, category, source, and update policy
63
+ - `.skills/activity.jsonl`: operation records written by the dashboard/CLI
64
+
65
+ Skill home resolution priority:
66
+
67
+ 1. `--home <path>`
68
+ 2. `SKILL_HOME`
69
+ 3. current working directory when it already looks like a skill home
70
+ 4. `~/.skills-manager`, initialized automatically
71
+
72
+ ## Common commands
73
+
74
+ ```sh
75
+ skills-manager web --home ~/.skills-manager
76
+ skills-manager doctor --home ~/.skills-manager
77
+ skills-manager list --home ~/.skills-manager
78
+ skills-manager add owner/repo --all --consumer agents --consumer claude --yes
79
+ skills-manager update --plan
80
+ skills-manager update --skill my-skill
81
+ skills-manager init --dry-run # preview runtime-skill import
82
+ skills-manager init --resolve my-skill=cursor # import with a conflict decision
83
+ skills-manager backup list # inspect init backups
84
+ skills-manager backup restore my-skill # roll one import back
85
+ skills-manager edit my-skill --source-url https://github.com/owner/repo
86
+ skills-manager archive old-skill
87
+ ```
88
+
89
+ Sources can be GitHub shorthand (`owner/repo`), Git URLs, GitHub tree URLs, or local paths.
90
+
91
+ ## Development
92
+
93
+ ```sh
94
+ pnpm install
95
+ pnpm run build
96
+ pnpm test
97
+ ```
98
+
99
+ ## Documentation
100
+
101
+ - **[Getting Started](docs/GETTING_STARTED.md)** — Installation, first launch, common tasks
102
+ - **[CLI Reference](docs/CLI.md)** — Full command reference and advanced usage
103
+ - **[Architecture](CONTEXT.md)** — Project structure and design decisions
@@ -0,0 +1,103 @@
1
+ # Skills Manager
2
+
3
+ [English](README.md) | **简体中文**
4
+
5
+ `skills-manager-cli` 是一个本地优先的 CLI 与网页控制台,基于注册表驱动的技能库(skill home)管理 agent、Claude、Codex 的技能。
6
+
7
+ ## 快速开始
8
+
9
+ **无需任何安装** —— 直接运行:
10
+
11
+ ```sh
12
+ npx skills-manager-cli web
13
+ ```
14
+
15
+ 首次运行时会自动创建并初始化 `~/.skills-manager/`。
16
+
17
+ **已经在 `~/.claude/skills` 或其他 agent 运行时目录里有技能了?** 用 `skills-manager init` 一键收纳 —— 内容移入技能库,原位置变成软链接(会先备份):
18
+
19
+ ```sh
20
+ skills-manager init --dry-run # 预览
21
+ skills-manager init # 导入
22
+ ```
23
+
24
+ 或者全局安装:
25
+
26
+ ```sh
27
+ npm install -g skills-manager-cli
28
+ # 或
29
+ pnpm add -g skills-manager-cli
30
+ skills-manager web
31
+ ```
32
+
33
+ 👉 **[查看入门指南](docs/GETTING_STARTED.zh-CN.md)** 了解详细用法与常见任务。
34
+
35
+ ## 安装与运行
36
+
37
+ 免安装直接使用:
38
+
39
+ ```sh
40
+ npx skills-manager-cli web
41
+ ```
42
+
43
+ 或从已发布的包/本地打包的 tarball 全局安装:
44
+
45
+ ```sh
46
+ npm install -g skills-manager-cli
47
+ # 或
48
+ pnpm add -g skills-manager-cli
49
+ skills-manager web
50
+ skills-manager doctor
51
+ ```
52
+
53
+ `web` 默认自动打开本地 Vue/Fastify 控制台。加 `--no-open` 可保持浏览器关闭。
54
+
55
+ ## 技能库(skill home)结构
56
+
57
+ 一个技能库包含:
58
+
59
+ - `skills/`:规范技能目录,扁平存放为 `skills/<skill-name>/SKILL.md`
60
+ - `views/`:生成的消费方软链接树,如 `views/agents/` 和 `views/claude/`
61
+ - `collections/`:生成的分类软链接树
62
+ - `registry.yaml`:元数据、来源、消费方、分类、source 与更新策略
63
+ - `.skills/activity.jsonl`:控制台/CLI 写入的操作记录
64
+
65
+ 技能库解析优先级:
66
+
67
+ 1. `--home <path>`
68
+ 2. `SKILL_HOME`
69
+ 3. 当前目录(当它已经是一个技能库时)
70
+ 4. `~/.skills-manager`(自动初始化)
71
+
72
+ ## 常用命令
73
+
74
+ ```sh
75
+ skills-manager web --home ~/.skills-manager
76
+ skills-manager doctor --home ~/.skills-manager
77
+ skills-manager list --home ~/.skills-manager
78
+ skills-manager add owner/repo --all --consumer agents --consumer claude --yes
79
+ skills-manager update --plan
80
+ skills-manager update --skill my-skill
81
+ skills-manager init --dry-run # 预览运行时技能导入
82
+ skills-manager init --resolve my-skill=cursor # 按冲突决策导入
83
+ skills-manager backup list # 查看 init 备份
84
+ skills-manager backup restore my-skill # 回滚某次导入
85
+ skills-manager edit my-skill --source-url https://github.com/owner/repo
86
+ skills-manager archive old-skill
87
+ ```
88
+
89
+ 来源(source)支持 GitHub 简写(`owner/repo`)、Git URL、GitHub tree URL 或本地路径。
90
+
91
+ ## 开发
92
+
93
+ ```sh
94
+ pnpm install
95
+ pnpm run build
96
+ pnpm test
97
+ ```
98
+
99
+ ## 文档
100
+
101
+ - **[入门指南](docs/GETTING_STARTED.zh-CN.md)** —— 安装、首次启动、常见任务
102
+ - **[CLI 参考](docs/CLI.zh-CN.md)** —— 完整命令参考与进阶用法
103
+ - **[架构](CONTEXT.md)** —— 项目结构与设计决策(英文)
@@ -0,0 +1,261 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { Command } from 'commander';
4
+ import { createRuntimeServices, projectRootFromImportMeta } from '../infra/runtime.js';
5
+ import { startDashboardServer } from '../dashboard/server/main.js';
6
+ const pkg = createRequire(import.meta.url)('../../package.json');
7
+ const projectRoot = projectRootFromImportMeta(import.meta.url);
8
+ function services(cmd) {
9
+ const opts = cmd.optsWithGlobals();
10
+ return createRuntimeServices({ home: opts.home }, projectRoot);
11
+ }
12
+ function print(value) {
13
+ if (typeof value === 'string')
14
+ console.log(value);
15
+ else
16
+ console.log(JSON.stringify(value, null, 2));
17
+ }
18
+ const program = new Command();
19
+ program
20
+ .name('skills-manager')
21
+ .description('Local-first CLI and dashboard for managing agent skills')
22
+ .version(pkg.version)
23
+ .option('--home <path>', 'skill home path; overrides SKILL_HOME and cwd detection')
24
+ .showHelpAfterError();
25
+ const webCommand = (cmd, description) => cmd
26
+ .description(description)
27
+ .option('-p, --port <port>', 'port', '4777')
28
+ .option('--host <host>', 'host', '127.0.0.1')
29
+ .option('--no-open', 'do not open a browser')
30
+ .action((opts, self) => {
31
+ const globalOpts = self.optsWithGlobals();
32
+ return startDashboardServer({ home: globalOpts.home, port: Number(opts.port), host: opts.host, open: opts.open, projectRoot });
33
+ });
34
+ webCommand(program.command('web'), 'Start the local web dashboard');
35
+ webCommand(program.command('dashboard', { hidden: true }), 'Deprecated alias for web');
36
+ program.command('doctor')
37
+ .description('Run health checks')
38
+ .option('--migrate-views', 'distribute leftover hub views to user runtimes')
39
+ .option('--delete-views', 'with --migrate-views, remove generated view symlinks')
40
+ .option('--force', 'with --migrate-views, overwrite unmanaged runtime paths')
41
+ .action((opts, cmd) => {
42
+ const s = services(cmd);
43
+ if (opts.migrateViews) {
44
+ const migrated = s.distribute.migrateViews({ deleteViews: Boolean(opts.deleteViews), force: Boolean(opts.force) });
45
+ s.activity.record({ action: 'cli-migrate-views', summary: 'Migrated leftover hub views', details: migrated });
46
+ return print({ migrated, doctor: s.doctor.check() });
47
+ }
48
+ print(s.doctor.check());
49
+ });
50
+ program.command('init')
51
+ .description('Import skills already living in agent runtime dirs into the hub (reverse of distribute); origins become managed symlinks')
52
+ .option('-a, --agent <id...>', 'catalog agent ids to scan; defaults to the detected set')
53
+ .option('-r, --resolve <skill=choice...>', 'conflict decisions: <skill>=<runtime-dir|agent-id|hub>')
54
+ .option('--all', 'import everything unambiguous; skip clashing skills (hub wins hub-vs-runtime)')
55
+ .option('--dry-run', 'print the full plan without touching disk')
56
+ .action((opts, cmd) => {
57
+ const s = services(cmd);
58
+ const result = s.init.run({ agents: opts.agent, resolve: parseResolve(opts.resolve), dryRun: Boolean(opts.dryRun), all: Boolean(opts.all) });
59
+ if (!opts.dryRun)
60
+ s.activity.record({ action: 'cli-init', summary: `Imported ${result.imported.join(', ') || 'nothing'} from runtime dirs`, details: { imported: result.imported, conflicts: result.conflicts, failed: result.failed } });
61
+ print(result);
62
+ });
63
+ function parseResolve(values = []) {
64
+ const resolve = {};
65
+ for (const value of values) {
66
+ const eq = value.indexOf('=');
67
+ if (eq <= 0)
68
+ throw new Error(`--resolve expects <skill>=<runtime-dir|agent-id|hub>, got "${value}"`);
69
+ resolve[value.slice(0, eq)] = value.slice(eq + 1);
70
+ }
71
+ return resolve;
72
+ }
73
+ program.command('edit')
74
+ .description('Edit safe registry fields for a skill (e.g. supply the upstream source of an imported skill)')
75
+ .argument('<skill>')
76
+ .option('--source-url <url>', 'upstream repository URL; enables update management for imported skills')
77
+ .option('--source-ref <ref>', 'branch or tag to track')
78
+ .option('--title <title>', 'display title')
79
+ .option('--description <description>', 'short description')
80
+ .option('--category <category>', 'category')
81
+ .option('--tags <tags...>', 'tags')
82
+ .action((skill, opts, cmd) => {
83
+ const s = services(cmd);
84
+ const patch = {};
85
+ if (opts.title !== undefined)
86
+ patch.title = opts.title;
87
+ if (opts.description !== undefined)
88
+ patch.description = opts.description;
89
+ if (opts.category !== undefined)
90
+ patch.category = opts.category;
91
+ if (opts.tags !== undefined)
92
+ patch.tags = opts.tags;
93
+ if (opts.sourceUrl !== undefined || opts.sourceRef !== undefined) {
94
+ patch.source = { ...(opts.sourceUrl !== undefined ? { type: 'git', url: opts.sourceUrl } : {}), ...(opts.sourceRef !== undefined ? { ref: opts.sourceRef } : {}) };
95
+ }
96
+ const result = s.registry.editSafeFields(skill, patch);
97
+ s.activity.record({ action: 'cli-edit', summary: `Edited ${skill}`, details: patch });
98
+ print(result);
99
+ });
100
+ const backup = program.command('backup').description('Inspect and restore init backups (hub .backups/, 30-day retention)');
101
+ backup.command('list')
102
+ .description('List saved backups')
103
+ .action((_opts, cmd) => print(services(cmd).backups.list()));
104
+ backup.command('restore')
105
+ .description('Roll one skill fully back to its pre-init state')
106
+ .argument('<skill>')
107
+ .action((skill, _opts, cmd) => {
108
+ const s = services(cmd);
109
+ const result = s.backups.restore(skill);
110
+ s.activity.record({ action: 'cli-backup-restore', summary: `Restored ${skill} from backup`, details: result });
111
+ print(result);
112
+ });
113
+ const catalog = program.command('catalog').description('Manage the bundled agent catalog snapshot');
114
+ catalog.command('refresh')
115
+ .description('Pull the upstream agent table and overwrite the local catalog snapshot')
116
+ .action(async (_opts, cmd) => {
117
+ const s = services(cmd);
118
+ const result = await s.catalog.refresh();
119
+ s.activity.record({ action: 'cli-catalog-refresh', summary: `Refreshed agent catalog to ${result.commit.slice(0, 10)} (${result.agentCount} agents)`, details: result });
120
+ print(result);
121
+ });
122
+ catalog.command('info')
123
+ .description('Show the current catalog snapshot stamp and detected agents')
124
+ .action((_opts, cmd) => {
125
+ const s = services(cmd);
126
+ print({ snapshot: s.catalog.snapshotInfo(), detected: s.catalog.detected() });
127
+ });
128
+ program.command('list')
129
+ .description('List installed skills')
130
+ .option('--category <category>', 'filter category')
131
+ .option('--include-archived', 'include archived entries')
132
+ .action((opts, cmd) => print(services(cmd).registry.listSkills({ category: opts.category, includeArchived: opts.includeArchived })));
133
+ program.command('add')
134
+ .description('Discover from a source, then install selected skills')
135
+ .argument('<source>', 'Git URL, GitHub owner/repo, GitHub tree URL, or local path')
136
+ .option('--list', 'only list discovered skills')
137
+ .option('--all', 'install all discovered skills')
138
+ .option('-s, --skill <skill...>', 'skill name or source subpath to install')
139
+ .option('-y, --yes', 'overwrite existing skills without prompting')
140
+ .action((source, opts, cmd) => {
141
+ const s = services(cmd);
142
+ const checkout = s.source.checkout(source);
143
+ const discovered = s.source.discover(checkout);
144
+ if (opts.list)
145
+ return print({ source: checkout, discovered });
146
+ const selectors = opts.all ? discovered.map((skill) => skill.subpath) : (opts.skill || []);
147
+ if (!opts.all && selectors.length === 0)
148
+ throw new Error('Use --all or --skill <name-or-subpath> to choose skills in this non-interactive CLI.');
149
+ const result = s.install.installFromSourceSelection({ source, selectors, overwrite: Boolean(opts.yes) });
150
+ s.activity.record({ action: 'cli-add', summary: `Installed ${result.installed.join(', ')}`, details: { source, installed: result.installed } });
151
+ print(result);
152
+ });
153
+ program.command('update')
154
+ .description('Update skills from registry sources')
155
+ .option('-s, --skill <skill...>', 'skill(s) to update')
156
+ .option('--source <key>', 'source group key from updates plan')
157
+ .option('--plan', 'print update plan')
158
+ .action((opts, cmd) => {
159
+ const s = services(cmd);
160
+ if (opts.plan || (!opts.skill && !opts.source))
161
+ return print(s.update.plan());
162
+ const result = opts.source ? s.update.updateSource(opts.source) : s.update.updateSkills(opts.skill);
163
+ s.activity.record({ action: 'cli-update', summary: `Updated ${result.updated.join(', ')}`, details: result });
164
+ print(result);
165
+ });
166
+ const distribute = program.command('distribute')
167
+ .description('Distribute hub skills to user or project runtime directories')
168
+ .option('--to <kind>', 'user or project')
169
+ .option('--project <path>', 'project root (required when --to project)')
170
+ .option('-s, --skill <skill...>', 'canonical skill names')
171
+ .option('-a, --agent <id...>', 'catalog agent ids (repeatable); defaults to the detected set')
172
+ .option('--mode <mode>', 'symlink or copy')
173
+ .option('--force', 'overwrite unmanaged runtime paths')
174
+ .enablePositionalOptions()
175
+ .action((opts, cmd) => {
176
+ if (!opts.to)
177
+ throw new Error('--to is required (user or project)');
178
+ const s = services(cmd);
179
+ const result = s.distribute.apply({ to: opts.to, projectRoot: opts.project, skills: opts.skill || [], agents: opts.agent, mode: opts.mode, force: Boolean(opts.force) });
180
+ s.activity.record({ action: 'cli-distribute', summary: `Distributed ${(opts.skill || []).join(', ')} to ${opts.to} for ${result.agents.join(', ')}`, details: opts });
181
+ print(result);
182
+ });
183
+ function runDistributeRollback(opts, cmd) {
184
+ const s = services(cmd);
185
+ if (opts.to !== 'user' && opts.to !== 'project')
186
+ throw new Error('--to must be user or project');
187
+ const result = s.distribute.rollback(opts.to, opts.project);
188
+ s.activity.record({ action: 'cli-distribute-rollback', summary: `Rolled back ${opts.to} distribution`, details: opts });
189
+ print(result);
190
+ }
191
+ distribute.command('rollback')
192
+ .description('Restore the last distribute snapshot for a target')
193
+ .requiredOption('--to <kind>', 'user or project')
194
+ .option('--project <path>', 'project root (required when --to project)')
195
+ .action((opts, cmd) => runDistributeRollback(opts, cmd));
196
+ program.command('undistribute')
197
+ .description('Remove managed runtime entries without deleting hub skills')
198
+ .requiredOption('--to <kind>', 'user or project')
199
+ .option('--project <path>', 'project root (required when --to project)')
200
+ .option('-s, --skill <skill...>', 'canonical skill names')
201
+ .option('-a, --agent <id...>', 'catalog agent ids (repeatable); defaults to the detected set')
202
+ .action((opts, cmd) => {
203
+ const s = services(cmd);
204
+ const result = s.distribute.undistribute({ to: opts.to, projectRoot: opts.project, skills: opts.skill || [], agents: opts.agent });
205
+ s.activity.record({ action: 'cli-undistribute', summary: `Undistributed ${(opts.skill || []).join(', ')} from ${opts.to}`, details: opts });
206
+ print(result);
207
+ });
208
+ program.command('redistribute')
209
+ .description('Re-apply managed distributions')
210
+ .option('--outdated', 'only outdated fingerprints')
211
+ .option('--to <kind>', 'user or project')
212
+ .option('--project <path>', 'project root filter')
213
+ .option('--force', 'overwrite unmanaged runtime paths')
214
+ .action((opts, cmd) => {
215
+ if (!opts.outdated)
216
+ throw new Error('Pass --outdated to refresh managed targets');
217
+ const s = services(cmd);
218
+ const result = s.distribute.redistributeOutdated({ to: opts.to, projectRoot: opts.project, force: Boolean(opts.force) });
219
+ s.activity.record({ action: 'cli-redistribute', summary: 'Redistributed outdated targets', details: opts });
220
+ print(result);
221
+ });
222
+ program.command('distribute-rollback', { hidden: true })
223
+ .description('Deprecated alias for distribute rollback')
224
+ .requiredOption('--to <kind>', 'user or project')
225
+ .option('--project <path>', 'project root (required when --to project)')
226
+ .action((opts, cmd) => runDistributeRollback(opts, cmd));
227
+ program.command('migrate-views')
228
+ .description('Distribute leftover hub views to user runtimes')
229
+ .option('--delete-views', 'remove generated view symlinks after migrate')
230
+ .option('--force', 'overwrite unmanaged runtime paths')
231
+ .action((opts, cmd) => {
232
+ const s = services(cmd);
233
+ const result = s.distribute.migrateViews({ deleteViews: Boolean(opts.deleteViews), force: Boolean(opts.force) });
234
+ s.activity.record({ action: 'cli-migrate-views', summary: 'Migrated leftover hub views', details: result });
235
+ print(result);
236
+ });
237
+ program.command('migrate-consumers')
238
+ .description('One-shot migration of legacy agents/claude tags to catalog agent ids (registry, hub index)')
239
+ .option('--dry-run', 'print the migration plan without touching disk')
240
+ .option('--rollback', 'restore the files backed up by the last migration')
241
+ .action((opts, cmd) => {
242
+ const s = services(cmd);
243
+ if (opts.rollback) {
244
+ s.migration.rollback();
245
+ s.activity.record({ action: 'cli-migrate-consumers-rollback', summary: 'Rolled back migrate-consumers' });
246
+ return print({ rolledBack: true });
247
+ }
248
+ if (opts.dryRun)
249
+ return print(s.migration.plan());
250
+ const result = s.migration.apply();
251
+ s.activity.record({ action: 'cli-migrate-consumers', summary: `Migrated legacy consumer tags (${result.migrated.indexEntries} index entries)`, details: result });
252
+ print(result);
253
+ });
254
+ program.command('rebuild-collections').description('Regenerate category collections').action((_opts, cmd) => { services(cmd).views.rebuildCollections(); print('collections rebuilt'); });
255
+ program.command('archive').description('Archive canonical skills without permanent deletion').argument('<skills...>').action((skills, cmd) => print(services(cmd).archive.archiveSkills(skills)));
256
+ program.command('adopt').description('Adopt a real directory from a generated view into canonical skills').argument('<view>').argument('<skill>').argument('[alsoConsumers...]').action((view, skill, alsoConsumers, cmd) => print(services(cmd).adopt.adopt(view, skill, alsoConsumers || [])));
257
+ program.parseAsync(process.argv).catch((error) => {
258
+ console.error(error instanceof Error ? error.message : String(error));
259
+ process.exitCode = 1;
260
+ });
261
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,MAAM,GAAG,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,oBAAoB,CAAwB,CAAC;AACxF,MAAM,WAAW,GAAG,yBAAyB,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/D,SAAS,QAAQ,CAAC,GAAY;IAC5B,MAAM,IAAI,GAAI,GAAG,CAAC,eAAe,EAAwB,CAAC;IAC1D,OAAO,qBAAqB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,KAAK,CAAC,KAAc;IAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;;QAC7C,OAAO,CAAC,GAAG,CAAC,IAAI,CAA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