aman-intelligence 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 (197) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +116 -0
  3. package/dist/bin/aman.d.ts +2 -0
  4. package/dist/bin/aman.js +165 -0
  5. package/dist/cli/global-install.d.ts +7 -0
  6. package/dist/cli/global-install.js +36 -0
  7. package/dist/cli/help-text.d.ts +1 -0
  8. package/dist/cli/help-text.js +62 -0
  9. package/dist/cli/version.d.ts +1 -0
  10. package/dist/cli/version.js +6 -0
  11. package/dist/commands/backup.d.ts +11 -0
  12. package/dist/commands/backup.js +262 -0
  13. package/dist/commands/browse.d.ts +11 -0
  14. package/dist/commands/browse.js +641 -0
  15. package/dist/commands/cache.d.ts +1 -0
  16. package/dist/commands/cache.js +38 -0
  17. package/dist/commands/config.d.ts +4 -0
  18. package/dist/commands/config.js +146 -0
  19. package/dist/commands/dashboard.d.ts +1 -0
  20. package/dist/commands/dashboard.js +1004 -0
  21. package/dist/commands/doctor.d.ts +4 -0
  22. package/dist/commands/doctor.js +54 -0
  23. package/dist/commands/export.d.ts +1 -0
  24. package/dist/commands/export.js +137 -0
  25. package/dist/commands/help.d.ts +1 -0
  26. package/dist/commands/help.js +47 -0
  27. package/dist/commands/import-wizard.d.ts +7 -0
  28. package/dist/commands/import-wizard.js +374 -0
  29. package/dist/commands/import.d.ts +9 -0
  30. package/dist/commands/import.js +351 -0
  31. package/dist/commands/info.d.ts +1 -0
  32. package/dist/commands/info.js +174 -0
  33. package/dist/commands/init.d.ts +20 -0
  34. package/dist/commands/init.js +146 -0
  35. package/dist/commands/install.d.ts +10 -0
  36. package/dist/commands/install.js +342 -0
  37. package/dist/commands/pack.d.ts +23 -0
  38. package/dist/commands/pack.js +331 -0
  39. package/dist/commands/registry.d.ts +6 -0
  40. package/dist/commands/registry.js +218 -0
  41. package/dist/commands/remove.d.ts +1 -0
  42. package/dist/commands/remove.js +76 -0
  43. package/dist/commands/search.d.ts +7 -0
  44. package/dist/commands/search.js +295 -0
  45. package/dist/commands/stack.d.ts +18 -0
  46. package/dist/commands/stack.js +327 -0
  47. package/dist/commands/sync.d.ts +9 -0
  48. package/dist/commands/sync.js +428 -0
  49. package/dist/commands/update.d.ts +1 -0
  50. package/dist/commands/update.js +97 -0
  51. package/dist/config/features.d.ts +2 -0
  52. package/dist/config/features.js +2 -0
  53. package/dist/config/index.d.ts +13 -0
  54. package/dist/config/index.js +80 -0
  55. package/dist/config/paths.d.ts +23 -0
  56. package/dist/config/paths.js +45 -0
  57. package/dist/import/adapters.d.ts +14 -0
  58. package/dist/import/adapters.js +580 -0
  59. package/dist/import/discovery.service.d.ts +8 -0
  60. package/dist/import/discovery.service.js +26 -0
  61. package/dist/import/import.service.d.ts +7 -0
  62. package/dist/import/import.service.js +259 -0
  63. package/dist/import/types.d.ts +71 -0
  64. package/dist/import/types.js +1 -0
  65. package/dist/import/utils.d.ts +36 -0
  66. package/dist/import/utils.js +428 -0
  67. package/dist/marketplace/cache.d.ts +18 -0
  68. package/dist/marketplace/cache.js +141 -0
  69. package/dist/marketplace/github-search.d.ts +17 -0
  70. package/dist/marketplace/github-search.js +268 -0
  71. package/dist/marketplace/install-from-candidate.d.ts +6 -0
  72. package/dist/marketplace/install-from-candidate.js +14 -0
  73. package/dist/marketplace/install.d.ts +15 -0
  74. package/dist/marketplace/install.js +54 -0
  75. package/dist/marketplace/metadata-validator.d.ts +8 -0
  76. package/dist/marketplace/metadata-validator.js +79 -0
  77. package/dist/marketplace/types.d.ts +34 -0
  78. package/dist/marketplace/types.js +1 -0
  79. package/dist/providers/local.provider.d.ts +9 -0
  80. package/dist/providers/local.provider.js +51 -0
  81. package/dist/providers/provider.interface.d.ts +7 -0
  82. package/dist/providers/provider.interface.js +1 -0
  83. package/dist/providers/registry.provider.d.ts +2 -0
  84. package/dist/providers/registry.provider.js +42 -0
  85. package/dist/providers/skills-sh.provider.d.ts +11 -0
  86. package/dist/providers/skills-sh.provider.js +56 -0
  87. package/dist/registry/adapter.interface.d.ts +16 -0
  88. package/dist/registry/adapter.interface.js +1 -0
  89. package/dist/registry/errors.d.ts +5 -0
  90. package/dist/registry/errors.js +8 -0
  91. package/dist/registry/filesystem-registry.adapter.d.ts +25 -0
  92. package/dist/registry/filesystem-registry.adapter.js +288 -0
  93. package/dist/registry/github-registry.adapter.d.ts +11 -0
  94. package/dist/registry/github-registry.adapter.js +32 -0
  95. package/dist/registry/index.d.ts +8 -0
  96. package/dist/registry/index.js +8 -0
  97. package/dist/registry/local-registry.adapter.d.ts +6 -0
  98. package/dist/registry/local-registry.adapter.js +9 -0
  99. package/dist/registry/registry.service.d.ts +44 -0
  100. package/dist/registry/registry.service.js +163 -0
  101. package/dist/registry/slug-utils.d.ts +12 -0
  102. package/dist/registry/slug-utils.js +51 -0
  103. package/dist/registry/types.d.ts +160 -0
  104. package/dist/registry/types.js +1 -0
  105. package/dist/services/asset.service.d.ts +12 -0
  106. package/dist/services/asset.service.js +142 -0
  107. package/dist/services/backup.service.d.ts +8 -0
  108. package/dist/services/backup.service.js +169 -0
  109. package/dist/services/classification.service.d.ts +31 -0
  110. package/dist/services/classification.service.js +271 -0
  111. package/dist/services/config.service.d.ts +9 -0
  112. package/dist/services/config.service.js +20 -0
  113. package/dist/services/doctor.service.d.ts +5 -0
  114. package/dist/services/doctor.service.js +186 -0
  115. package/dist/services/environment.service.d.ts +42 -0
  116. package/dist/services/environment.service.js +227 -0
  117. package/dist/services/github.service.d.ts +7 -0
  118. package/dist/services/github.service.js +42 -0
  119. package/dist/services/lock.service.d.ts +12 -0
  120. package/dist/services/lock.service.js +71 -0
  121. package/dist/services/marketplace.service.d.ts +40 -0
  122. package/dist/services/marketplace.service.js +225 -0
  123. package/dist/services/pack.service.d.ts +9 -0
  124. package/dist/services/pack.service.js +193 -0
  125. package/dist/services/stack.service.d.ts +9 -0
  126. package/dist/services/stack.service.js +94 -0
  127. package/dist/storage/asset-layout.d.ts +46 -0
  128. package/dist/storage/asset-layout.js +277 -0
  129. package/dist/storage/filesystem.d.ts +12 -0
  130. package/dist/storage/filesystem.js +113 -0
  131. package/dist/storage/scan-by-type.d.ts +2 -0
  132. package/dist/storage/scan-by-type.js +8 -0
  133. package/dist/storage/scanner.d.ts +11 -0
  134. package/dist/storage/scanner.js +188 -0
  135. package/dist/types/asset-metadata.d.ts +84 -0
  136. package/dist/types/asset-metadata.js +104 -0
  137. package/dist/types/index.d.ts +212 -0
  138. package/dist/types/index.js +1 -0
  139. package/dist/ui/animations/ErrorIndicator.d.ts +5 -0
  140. package/dist/ui/animations/ErrorIndicator.js +6 -0
  141. package/dist/ui/animations/GithubIndicator.d.ts +6 -0
  142. package/dist/ui/animations/GithubIndicator.js +9 -0
  143. package/dist/ui/animations/ProgressBar.d.ts +5 -0
  144. package/dist/ui/animations/ProgressBar.js +15 -0
  145. package/dist/ui/animations/Spinner.d.ts +5 -0
  146. package/dist/ui/animations/Spinner.js +21 -0
  147. package/dist/ui/animations/SuccessIndicator.d.ts +5 -0
  148. package/dist/ui/animations/SuccessIndicator.js +6 -0
  149. package/dist/ui/animations/SyncActivity.d.ts +5 -0
  150. package/dist/ui/animations/SyncActivity.js +21 -0
  151. package/dist/ui/animations/TransitionScreen.d.ts +7 -0
  152. package/dist/ui/animations/TransitionScreen.js +25 -0
  153. package/dist/ui/animations/useAnimationMode.d.ts +1 -0
  154. package/dist/ui/animations/useAnimationMode.js +16 -0
  155. package/dist/ui/assetDisplay.d.ts +19 -0
  156. package/dist/ui/assetDisplay.js +59 -0
  157. package/dist/ui/components/Confirm.d.ts +8 -0
  158. package/dist/ui/components/Confirm.js +14 -0
  159. package/dist/ui/components/CustomSelect.d.ts +19 -0
  160. package/dist/ui/components/CustomSelect.js +13 -0
  161. package/dist/ui/components/Header.d.ts +6 -0
  162. package/dist/ui/components/Header.js +9 -0
  163. package/dist/ui/components/HealthReport.d.ts +7 -0
  164. package/dist/ui/components/HealthReport.js +13 -0
  165. package/dist/ui/components/MarketplaceInstallConfirm.d.ts +19 -0
  166. package/dist/ui/components/MarketplaceInstallConfirm.js +23 -0
  167. package/dist/ui/components/Narrator.d.ts +9 -0
  168. package/dist/ui/components/Narrator.js +26 -0
  169. package/dist/ui/components/ScopePrompt.d.ts +8 -0
  170. package/dist/ui/components/ScopePrompt.js +23 -0
  171. package/dist/ui/components/TooSmallScreen.d.ts +8 -0
  172. package/dist/ui/components/TooSmallScreen.js +6 -0
  173. package/dist/ui/date.d.ts +2 -0
  174. package/dist/ui/date.js +33 -0
  175. package/dist/ui/layout.d.ts +23 -0
  176. package/dist/ui/layout.js +44 -0
  177. package/dist/ui/list-item.d.ts +12 -0
  178. package/dist/ui/list-item.js +1 -0
  179. package/dist/ui/marketplaceDisplay.d.ts +10 -0
  180. package/dist/ui/marketplaceDisplay.js +36 -0
  181. package/dist/ui/theme.d.ts +42 -0
  182. package/dist/ui/theme.js +47 -0
  183. package/dist/utils/asset-list-fields.d.ts +11 -0
  184. package/dist/utils/asset-list-fields.js +28 -0
  185. package/dist/utils/error-message.d.ts +2 -0
  186. package/dist/utils/error-message.js +6 -0
  187. package/dist/utils/integrity.d.ts +9 -0
  188. package/dist/utils/integrity.js +23 -0
  189. package/dist/utils/lock-migrate.d.ts +25 -0
  190. package/dist/utils/lock-migrate.js +93 -0
  191. package/dist/utils/mcp-local.d.ts +15 -0
  192. package/dist/utils/mcp-local.js +129 -0
  193. package/dist/utils/slug.d.ts +6 -0
  194. package/dist/utils/slug.js +13 -0
  195. package/dist/utils/stack-normalize.d.ts +3 -0
  196. package/dist/utils/stack-normalize.js +43 -0
  197. package/package.json +77 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aman Intelligence
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,116 @@
1
+ # Aman Intelligence
2
+
3
+ ![Aman Intelligence](./images/ai-cli-v1.png)
4
+
5
+ Aman is the package manager for AI workflow assets.
6
+
7
+ Most developers have skills, prompts, and MCP configurations scattered across GitHub repositories, local folders, and notes. Aman gives you one place to install, organize, sync, and share them — the same way npm manages packages.
8
+
9
+ ## What Aman manages
10
+
11
+ | Kind | What it is |
12
+ |------|------------|
13
+ | **Skills** | Reusable agent instructions (`SKILL.md`) |
14
+ | **Prompts** | System and task prompts (`PROMPT.md`) |
15
+ | **MCPs** | Model Context Protocol server configs (`mcp.json`) |
16
+ | **Packs** | Bundles of assets you can share as `.amanpack` files |
17
+ | **Stacks** | Named workflows that combine skills, prompts, and MCPs |
18
+
19
+ ## Quick install
20
+
21
+ After the package is [published to npm](https://www.npmjs.com/package/aman-cli) as `aman-cli`:
22
+
23
+ ```bash
24
+ npx aman-cli
25
+ ```
26
+
27
+ Running `npx aman-cli` with no arguments installs Aman globally. To run without installing, pass a subcommand:
28
+
29
+ ```bash
30
+ npx aman-cli doctor
31
+ ```
32
+
33
+ Then use the CLI from anywhere:
34
+
35
+ ```bash
36
+ aman --version
37
+ aman init --local
38
+ ```
39
+
40
+ **Other install paths:**
41
+
42
+ ```bash
43
+ npm install -g aman-cli
44
+ aman doctor
45
+ ```
46
+
47
+ The CLI ships with **no default assets**. Install skills, prompts, and MCPs from the registry, import, or your own directories.
48
+
49
+ ## Three commands that show the value
50
+
51
+ ```bash
52
+ # 1. Set up your environment (local or GitHub-backed)
53
+ aman init --local
54
+
55
+ # 2. Install an asset (registry example — publish or use a known slug@version)
56
+ aman install "@your-scope/your-asset@1.0.0" --global
57
+
58
+ # 3. Verify everything is healthy
59
+ aman doctor
60
+ ```
61
+
62
+ Or import from a folder, GitHub repository, another AI tool, or an Aman environment:
63
+
64
+ ```bash
65
+ aman import # interactive wizard (TTY)
66
+ aman import cursor --global # shorthand syntax for Cursor rules/MCPs
67
+ aman import antigravity --global # shorthand syntax for Antigravity rules/MCPs
68
+ aman import ./my-assets --global
69
+ aman import owner/repo --global
70
+ ```
71
+
72
+ See [docs/IMPORT-GUIDE.md](./docs/IMPORT-GUIDE.md) for the full import guide covering Claude Code, Cursor, Windsurf, Continue.dev, VS Code, Copilot, Codex, Antigravity, and Aman Environment imports.
73
+
74
+ ## Documentation (GitHub)
75
+
76
+ | Document | Audience |
77
+ |----------|----------|
78
+ | [QUICK-START.md](./QUICK-START.md) | New users — zero to first asset in minutes |
79
+ | [docs/IMPORT-GUIDE.md](./docs/IMPORT-GUIDE.md) | Import from Claude Code, VS Code, Copilot, Codex, and local folders |
80
+ | [docs/ASSET-SPEC.md](./docs/ASSET-SPEC.md) | Publishers — canonical asset format |
81
+ | [docs/REGISTRY-SPEC.md](./docs/REGISTRY-SPEC.md) | Contributors — registry contract |
82
+ | [docs/LOCKFILE-SPEC.md](./docs/LOCKFILE-SPEC.md) | Developers — reproducible installs |
83
+ | [CONTRIBUTING.md](./CONTRIBUTING.md) | Contributors — code, assets, and PRs |
84
+ | [SECURITY.md](./SECURITY.md) | Security model and reporting |
85
+ | [RELEASE-NOTES.md](./RELEASE-NOTES.md) | Release history |
86
+ | [AMAN_CONSTITUTION.md](./AMAN_CONSTITUTION.md) | Permanent architectural principles |
87
+ | [PUBLISHING.md](./PUBLISHING.md) | Maintainers — npm pack and publish |
88
+
89
+ Normative specs: [docs/specs/](./docs/specs/) (`AMAN-ASSET-SPEC-V1.md`, `AMAN-REGISTRY-SPEC-V1.md`, `AMAN-LOCKFILE-SPEC-V1.md`, and related).
90
+
91
+ ## Configuration
92
+
93
+ ### `AMAN_REGISTRY_BACKEND`
94
+
95
+ | Value | Adapter | Storage |
96
+ |-------|---------|---------|
97
+ | `local` (default) | Local filesystem | `~/.aman/registry/` |
98
+ | `github` | GitHub mirror | `~/.aman/repositories/{repo}/registry/` |
99
+
100
+ ```bash
101
+ export AMAN_REGISTRY_BACKEND=github
102
+ ```
103
+
104
+ ## Requirements
105
+
106
+ - Node.js 18+
107
+ - Git (for import and GitHub sync)
108
+ - GitHub CLI (`gh`) optional — for `aman init --github` and `aman sync`
109
+
110
+ ## Contributing
111
+
112
+ See [CONTRIBUTING.md](./CONTRIBUTING.md).
113
+
114
+ ## License
115
+
116
+ MIT — see [LICENSE](./LICENSE).
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,165 @@
1
+ #!/usr/bin/env node
2
+ import meow from 'meow';
3
+ import { CLI_VERSION } from '../cli/version.js';
4
+ import { printHelpText } from '../cli/help-text.js';
5
+ import { isAmanCliEntrypoint, runGlobalInstall } from '../cli/global-install.js';
6
+ import { ensureGlobalDirs } from '../config/paths.js';
7
+ import { dashboardCommand } from '../commands/dashboard.js';
8
+ import { browseCommand } from '../commands/browse.js';
9
+ import { searchCommand } from '../commands/search.js';
10
+ import { installCommand } from '../commands/install.js';
11
+ import { removeCommand } from '../commands/remove.js';
12
+ import { updateCommand } from '../commands/update.js';
13
+ import { importCommand } from '../commands/import.js';
14
+ import { exportCommand } from '../commands/export.js';
15
+ import { packCommand } from '../commands/pack.js';
16
+ import { stackCommand } from '../commands/stack.js';
17
+ import { backupCommand } from '../commands/backup.js';
18
+ import { doctorCommand } from '../commands/doctor.js';
19
+ import { configCommand } from '../commands/config.js';
20
+ import { helpCommand } from '../commands/help.js';
21
+ import { initCommand } from '../commands/init.js';
22
+ import { syncCommand } from '../commands/sync.js';
23
+ import { infoCommand } from '../commands/info.js';
24
+ import { registryCommand } from '../commands/registry.js';
25
+ import { cacheCommand } from '../commands/cache.js';
26
+ const preArgs = process.argv.slice(2);
27
+ if (preArgs.includes('--version') || preArgs.includes('-v') || preArgs[0] === 'version') {
28
+ console.log(CLI_VERSION);
29
+ process.exit(0);
30
+ }
31
+ if (preArgs.length === 1 && (preArgs[0] === '--help' || preArgs[0] === '-h')) {
32
+ printHelpText();
33
+ process.exit(0);
34
+ }
35
+ // `npx aman-cli` (no subcommand) → global install; use `aman` afterward.
36
+ if (isAmanCliEntrypoint() && preArgs.length === 0) {
37
+ runGlobalInstall();
38
+ process.exit(0);
39
+ }
40
+ const cli = meow(`
41
+ Usage
42
+ $ aman <command> [options]
43
+
44
+ Options
45
+ --global, -g Target global scope
46
+ --project, -p Target project scope
47
+ --github Initialize with GitHub storage
48
+ --local Initialize with local storage
49
+ --repo Repository name for GitHub init
50
+ --path Storage path for local init
51
+ --format Output format (json, yaml, zip)
52
+ --all Apply command to all installed items
53
+ --type Asset type: skill, prompt, or mcp
54
+ --list, -l List mode (browse)
55
+ --json JSON output (browse)
56
+ --version, -v Print CLI version
57
+ `, {
58
+ importMeta: import.meta,
59
+ flags: {
60
+ global: { type: 'boolean', shortFlag: 'g' },
61
+ project: { type: 'boolean', shortFlag: 'p' },
62
+ type: { type: 'string' },
63
+ list: { type: 'boolean', shortFlag: 'l' },
64
+ json: { type: 'boolean' },
65
+ github: { type: 'boolean' },
66
+ local: { type: 'boolean' },
67
+ existing: { type: 'boolean' },
68
+ repo: { type: 'string' },
69
+ repository: { type: 'string' },
70
+ path: { type: 'string' },
71
+ format: { type: 'string' },
72
+ all: { type: 'boolean' },
73
+ version: { type: 'boolean', shortFlag: 'v' },
74
+ yes: { type: 'boolean', shortFlag: 'y' },
75
+ noTty: { type: 'boolean' },
76
+ from: { type: 'string' },
77
+ githubDest: { type: 'boolean' },
78
+ },
79
+ });
80
+ async function main() {
81
+ await ensureGlobalDirs().catch(() => { });
82
+ if (cli.flags.version) {
83
+ console.log(CLI_VERSION);
84
+ return;
85
+ }
86
+ const input = cli.input;
87
+ const cmd = input[0];
88
+ const args = input.slice(1);
89
+ const options = cli.flags;
90
+ switch (cmd) {
91
+ case undefined:
92
+ await dashboardCommand();
93
+ break;
94
+ case 'init':
95
+ await initCommand(args, options);
96
+ break;
97
+ case 'browse':
98
+ await browseCommand(args, options);
99
+ break;
100
+ case 'search':
101
+ await searchCommand(args, options);
102
+ break;
103
+ case 'cache':
104
+ await cacheCommand(args);
105
+ break;
106
+ case 'install':
107
+ await installCommand(args, options);
108
+ break;
109
+ case 'remove':
110
+ await removeCommand(args, options);
111
+ break;
112
+ case 'update':
113
+ await updateCommand(args, options);
114
+ break;
115
+ case 'import':
116
+ await importCommand(args, options);
117
+ break;
118
+ case 'export':
119
+ await exportCommand(args, options);
120
+ break;
121
+ case 'pack':
122
+ await packCommand(args, options);
123
+ break;
124
+ case 'stack':
125
+ await stackCommand(args, options);
126
+ break;
127
+ case 'backup':
128
+ await backupCommand(args, options);
129
+ break;
130
+ case 'doctor':
131
+ await doctorCommand();
132
+ break;
133
+ case 'config':
134
+ await configCommand(args);
135
+ break;
136
+ case 'sync':
137
+ await syncCommand(args);
138
+ break;
139
+ case 'info':
140
+ await infoCommand(args);
141
+ break;
142
+ case 'registry':
143
+ await registryCommand(args, options);
144
+ break;
145
+ case 'help':
146
+ await helpCommand();
147
+ break;
148
+ default:
149
+ if (cmd) {
150
+ console.error(`Unknown command: ${cmd}`);
151
+ }
152
+ if (!process.stdin.isTTY || !process.stdout.isTTY) {
153
+ printHelpText();
154
+ process.exit(cmd ? 1 : 0);
155
+ }
156
+ await helpCommand();
157
+ if (cmd)
158
+ process.exit(1);
159
+ }
160
+ }
161
+ main().catch((err) => {
162
+ const message = err instanceof Error ? err.message : String(err);
163
+ console.error(`Error: ${message}`);
164
+ process.exit(1);
165
+ });
@@ -0,0 +1,7 @@
1
+ /** True when the process was started via the `aman-cli` or `aman-intelligence` bin. */
2
+ export declare function isAmanCliEntrypoint(): boolean;
3
+ /**
4
+ * Installs this package globally so users can run `aman` from any directory.
5
+ * Invoked by `npx aman-intelligence` with no subcommand.
6
+ */
7
+ export declare function runGlobalInstall(): void;
@@ -0,0 +1,36 @@
1
+ import { spawnSync } from 'child_process';
2
+ import path from 'path';
3
+ import { CLI_VERSION } from './version.js';
4
+ /** True when the process was started via the `aman-cli` or `aman-intelligence` bin. */
5
+ export function isAmanCliEntrypoint() {
6
+ const bin = path.basename(process.argv[1] ?? '');
7
+ return (bin === 'aman-cli' || bin === 'aman-cli.cmd' || bin === 'aman-cli.ps1' ||
8
+ bin === 'aman-intelligence' || bin === 'aman-intelligence.cmd' || bin === 'aman-intelligence.ps1');
9
+ }
10
+ /**
11
+ * Installs this package globally so users can run `aman` from any directory.
12
+ * Invoked by `npx aman-intelligence` with no subcommand.
13
+ */
14
+ export function runGlobalInstall() {
15
+ if (process.env.AMAN_SKIP_GLOBAL_INSTALL === '1') {
16
+ console.log('AMAN_SKIP_GLOBAL_INSTALL=1 — skipping global install.');
17
+ return;
18
+ }
19
+ console.log(`\n Installing aman ${CLI_VERSION} globally…\n`);
20
+ const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
21
+ const result = spawnSync(npm, ['install', '-g', `aman-intelligence@${CLI_VERSION}`], {
22
+ stdio: 'inherit',
23
+ shell: process.platform === 'win32',
24
+ env: process.env,
25
+ });
26
+ if (result.status !== 0) {
27
+ console.error('\n Global install failed.');
28
+ console.error(' Try manually: npm install -g aman-intelligence\n');
29
+ process.exit(result.status === null ? 1 : result.status);
30
+ }
31
+ console.log('\n ✓ aman is installed globally.\n');
32
+ console.log(' Next steps:');
33
+ console.log(' aman init --local');
34
+ console.log(' aman install caveman --global');
35
+ console.log(' aman doctor\n');
36
+ }
@@ -0,0 +1 @@
1
+ export declare function printHelpText(): void;
@@ -0,0 +1,62 @@
1
+ import { CLI_VERSION } from './version.js';
2
+ import { MARKETPLACE_ENABLED } from '../config/features.js';
3
+ export function printHelpText() {
4
+ const cacheSection = MARKETPLACE_ENABLED
5
+ ? ` cache <cmd> Marketplace cache status or clear
6
+
7
+ Cache:
8
+ cache status Show marketplace cache size and age
9
+ cache clear Clear marketplace discovery cache`
10
+ : ` cache <cmd> Discovery cache (coming in a future release)`;
11
+ console.log(`aman ${CLI_VERSION} — package manager for AI workflow assets
12
+
13
+ Install globally (one command):
14
+ npx aman-intelligence
15
+
16
+ Usage:
17
+ aman <command> [options]
18
+
19
+ Commands:
20
+ (none) Open dashboard (interactive terminal required)
21
+ init Set up local or GitHub-backed storage
22
+ browse Browse skills, prompts, and MCPs
23
+ search <query> Search across asset types
24
+ info <name> View asset details
25
+ install [ref] Install asset or @scope/name@version from registry
26
+ remove <name> Remove an installed asset
27
+ update [name] Update installed assets
28
+ import <source> Import from GitHub URL, repo, local folder, or AI tool
29
+ Sources: claude-code, cursor, windsurf, continue,
30
+ vscode, github-copilot, codex, local-folder,
31
+ custom-path, aman-environment, antigravity
32
+ export [name] Export assets (--all, --type skill|prompt|mcp)
33
+ pack <cmd> Create, inspect, or install packs
34
+ stack <cmd> Manage workflow stacks
35
+ sync <push|pull> Sync environment with GitHub
36
+ backup <cmd> Save, list, restore, or delete backups
37
+ doctor Check environment health
38
+ config <cmd> Manage CLI settings
39
+ registry <cmd> Publish and query the canonical asset registry
40
+ ${cacheSection}
41
+ help Show this help
42
+
43
+ Registry:
44
+ registry publish Publish an immutable asset version
45
+ registry deprecate Mark a version deprecated (still installable)
46
+ registry list List published versions for a slug
47
+ registry search Search published assets
48
+ registry resolve Show metadata for slug@version
49
+
50
+ Options:
51
+ --global, -g Target global scope (~/.aman)
52
+ --project, -p Target project scope (.aman/)
53
+ --type Asset type: skill, prompt, or mcp
54
+ --version, -v Print CLI version
55
+
56
+ Environment:
57
+ AMAN_REGISTRY_BACKEND Registry adapter: local (default) or github
58
+
59
+ Documentation:
60
+ https://github.com/amandeavor/aman-intelligence-CLI#readme
61
+ `);
62
+ }
@@ -0,0 +1 @@
1
+ export declare const CLI_VERSION: string;
@@ -0,0 +1,6 @@
1
+ import { createRequire } from 'module';
2
+ import { fileURLToPath } from 'url';
3
+ import path from 'path';
4
+ const require = createRequire(import.meta.url);
5
+ const packagePath = path.join(path.dirname(fileURLToPath(import.meta.url)), '../../package.json');
6
+ export const CLI_VERSION = require(packagePath).version;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface BackupAppProps {
3
+ subcmd: string;
4
+ idOrName?: string;
5
+ bypassConfirm?: boolean;
6
+ }
7
+ export declare const BackupApp: React.FC<BackupAppProps & {
8
+ onBack?: () => void;
9
+ }>;
10
+ export declare function backupCommand(args: string[], options?: any): Promise<void>;
11
+ export {};