claude-bundle 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 (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +84 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +114 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands/add.d.ts +2 -0
  8. package/dist/commands/add.d.ts.map +1 -0
  9. package/dist/commands/add.js +15 -0
  10. package/dist/commands/add.js.map +1 -0
  11. package/dist/commands/init.d.ts +2 -0
  12. package/dist/commands/init.d.ts.map +1 -0
  13. package/dist/commands/init.js +41 -0
  14. package/dist/commands/init.js.map +1 -0
  15. package/dist/commands/list.d.ts +2 -0
  16. package/dist/commands/list.d.ts.map +1 -0
  17. package/dist/commands/list.js +26 -0
  18. package/dist/commands/list.js.map +1 -0
  19. package/dist/commands/remove.d.ts +2 -0
  20. package/dist/commands/remove.d.ts.map +1 -0
  21. package/dist/commands/remove.js +15 -0
  22. package/dist/commands/remove.js.map +1 -0
  23. package/dist/commands/secrets.d.ts +2 -0
  24. package/dist/commands/secrets.d.ts.map +1 -0
  25. package/dist/commands/secrets.js +41 -0
  26. package/dist/commands/secrets.js.map +1 -0
  27. package/dist/commands/setup.d.ts +2 -0
  28. package/dist/commands/setup.d.ts.map +1 -0
  29. package/dist/commands/setup.js +46 -0
  30. package/dist/commands/setup.js.map +1 -0
  31. package/dist/commands/update.d.ts +2 -0
  32. package/dist/commands/update.d.ts.map +1 -0
  33. package/dist/commands/update.js +30 -0
  34. package/dist/commands/update.js.map +1 -0
  35. package/dist/commands/use.d.ts +2 -0
  36. package/dist/commands/use.d.ts.map +1 -0
  37. package/dist/commands/use.js +28 -0
  38. package/dist/commands/use.js.map +1 -0
  39. package/dist/core/config.d.ts +5 -0
  40. package/dist/core/config.d.ts.map +1 -0
  41. package/dist/core/config.js +31 -0
  42. package/dist/core/config.js.map +1 -0
  43. package/dist/core/launcher.d.ts +3 -0
  44. package/dist/core/launcher.d.ts.map +1 -0
  45. package/dist/core/launcher.js +63 -0
  46. package/dist/core/launcher.js.map +1 -0
  47. package/dist/core/manifest.d.ts +4 -0
  48. package/dist/core/manifest.d.ts.map +1 -0
  49. package/dist/core/manifest.js +25 -0
  50. package/dist/core/manifest.js.map +1 -0
  51. package/dist/core/menu.d.ts +3 -0
  52. package/dist/core/menu.d.ts.map +1 -0
  53. package/dist/core/menu.js +24 -0
  54. package/dist/core/menu.js.map +1 -0
  55. package/dist/core/paths.d.ts +5 -0
  56. package/dist/core/paths.d.ts.map +1 -0
  57. package/dist/core/paths.js +20 -0
  58. package/dist/core/paths.js.map +1 -0
  59. package/dist/core/registry.d.ts +10 -0
  60. package/dist/core/registry.d.ts.map +1 -0
  61. package/dist/core/registry.js +62 -0
  62. package/dist/core/registry.js.map +1 -0
  63. package/dist/core/resolver.d.ts +5 -0
  64. package/dist/core/resolver.d.ts.map +1 -0
  65. package/dist/core/resolver.js +73 -0
  66. package/dist/core/resolver.js.map +1 -0
  67. package/dist/core/secrets.d.ts +6 -0
  68. package/dist/core/secrets.d.ts.map +1 -0
  69. package/dist/core/secrets.js +54 -0
  70. package/dist/core/secrets.js.map +1 -0
  71. package/dist/index.d.ts +3 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +9 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/types/index.d.ts +29 -0
  76. package/dist/types/index.d.ts.map +1 -0
  77. package/dist/types/index.js +3 -0
  78. package/dist/types/index.js.map +1 -0
  79. package/dist/utils/git.d.ts +3 -0
  80. package/dist/utils/git.d.ts.map +1 -0
  81. package/dist/utils/git.js +17 -0
  82. package/dist/utils/git.js.map +1 -0
  83. package/package.json +43 -0
@@ -0,0 +1,3 @@
1
+ import type { ResolvedBundle } from '../types/index.js';
2
+ export declare function launchBundle(resolved: ResolvedBundle, userArgs?: string[]): Promise<void>;
3
+ //# sourceMappingURL=launcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../../src/core/launcher.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAsB,YAAY,CAChC,QAAQ,EAAE,cAAc,EACxB,QAAQ,GAAE,MAAM,EAAO,GACtB,OAAO,CAAC,IAAI,CAAC,CA+Df"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.launchBundle = launchBundle;
4
+ const execa_1 = require("execa");
5
+ const fs_1 = require("fs");
6
+ const path_1 = require("path");
7
+ const config_js_1 = require("./config.js");
8
+ const resolver_js_1 = require("./resolver.js");
9
+ async function launchBundle(resolved, userArgs = []) {
10
+ const config = (0, config_js_1.loadConfig)();
11
+ if (!config.realClaudePath) {
12
+ throw new Error('Real claude path not configured. Run: claude-bundle setup');
13
+ }
14
+ // Build command line arguments
15
+ const args = [];
16
+ // Add plugin directories
17
+ for (const pluginDir of resolved.pluginDirs) {
18
+ args.push('--plugin-dir', pluginDir);
19
+ }
20
+ // Handle MCP config
21
+ const mcpPaths = [];
22
+ if (resolved.mcpPath) {
23
+ mcpPaths.push(resolved.mcpPath);
24
+ }
25
+ // Also check included plugins for mcp.json
26
+ for (const pluginDir of resolved.pluginDirs) {
27
+ const pluginMcp = (0, path_1.join)(pluginDir, 'mcp.json');
28
+ if ((0, fs_1.existsSync)(pluginMcp)) {
29
+ mcpPaths.push(pluginMcp);
30
+ }
31
+ }
32
+ if (mcpPaths.length > 0) {
33
+ const merged = (0, resolver_js_1.mergeMcpConfigs)(mcpPaths);
34
+ const tmpDir = (0, path_1.join)(process.env.TMPDIR || '/tmp', 'claude-bundle');
35
+ (0, fs_1.mkdirSync)(tmpDir, { recursive: true });
36
+ const mergedMcpPath = (0, path_1.join)(tmpDir, `mcp-${resolved.name}.json`);
37
+ (0, fs_1.writeFileSync)(mergedMcpPath, JSON.stringify(merged, null, 2));
38
+ args.push('--strict-mcp-config', '--mcp-config', mergedMcpPath);
39
+ }
40
+ // Add memory directory
41
+ if (resolved.memoryPath) {
42
+ args.push('--add-dir', resolved.memoryPath);
43
+ }
44
+ // Inject readme as system prompt
45
+ const readmePath = (0, path_1.join)(resolved.bundlePath, 'README.md');
46
+ if ((0, fs_1.existsSync)(readmePath)) {
47
+ const readme = (0, fs_1.readFileSync)(readmePath, 'utf-8');
48
+ args.push('--append-system-prompt', readme);
49
+ }
50
+ // Add user arguments
51
+ args.push(...userArgs);
52
+ // Print banner
53
+ console.log(`\n┌─ claude-bundle ──────────────────┐`);
54
+ console.log(`│ Launching: ${resolved.name.padEnd(26)} │`);
55
+ console.log(`│ ${resolved.manifest.description.slice(0, 32).padEnd(32)} │`);
56
+ console.log(`└──────────────────────────────────┘\n`);
57
+ // Exec with secrets as env vars
58
+ await (0, execa_1.execa)(config.realClaudePath, args, {
59
+ stdio: 'inherit',
60
+ env: { ...process.env, ...resolved.secrets },
61
+ });
62
+ }
63
+ //# sourceMappingURL=launcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launcher.js","sourceRoot":"","sources":["../../src/core/launcher.ts"],"names":[],"mappings":";;AAOA,oCAkEC;AAzED,iCAA8B;AAC9B,2BAAwE;AACxE,+BAA4B;AAC5B,2CAAyC;AACzC,+CAAgD;AAGzC,KAAK,UAAU,YAAY,CAChC,QAAwB,EACxB,WAAqB,EAAE;IAEvB,MAAM,MAAM,GAAG,IAAA,sBAAU,GAAE,CAAC;IAE5B,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC/E,CAAC;IAED,+BAA+B;IAC/B,MAAM,IAAI,GAAa,EAAE,CAAC;IAE1B,yBAAyB;IACzB,KAAK,MAAM,SAAS,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC5C,IAAI,CAAC,IAAI,CAAC,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IAED,iCAAiC;IACjC,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAC1D,IAAI,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,IAAA,iBAAY,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,qBAAqB;IACrB,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;IAEvB,eAAe;IACf,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,iBAAiB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAC3D,OAAO,CAAC,GAAG,CAAC,MAAM,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;IAEtD,gCAAgC;IAChC,MAAM,IAAA,aAAK,EAAC,MAAM,CAAC,cAAc,EAAE,IAAI,EAAE;QACvC,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE;KAC7C,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BundleManifest } from '../types/index.js';
2
+ export declare function parseManifest(json: unknown): BundleManifest;
3
+ export declare function loadManifest(bundlePath: string): BundleManifest;
4
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/core/manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWxD,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,CAE3D;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,CAK/D"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseManifest = parseManifest;
4
+ exports.loadManifest = loadManifest;
5
+ const zod_1 = require("zod");
6
+ const fs_1 = require("fs");
7
+ const path_1 = require("path");
8
+ const manifestSchema = zod_1.z.object({
9
+ name: zod_1.z.string().min(1),
10
+ description: zod_1.z.string().min(1),
11
+ include_plugins: zod_1.z.array(zod_1.z.string()).default([]),
12
+ mcp: zod_1.z.string().optional(),
13
+ memory: zod_1.z.string().optional(),
14
+ requires_secrets: zod_1.z.array(zod_1.z.string()).default([]),
15
+ });
16
+ function parseManifest(json) {
17
+ return manifestSchema.parse(json);
18
+ }
19
+ function loadManifest(bundlePath) {
20
+ const manifestPath = (0, path_1.join)(bundlePath, 'bundle.json');
21
+ const content = (0, fs_1.readFileSync)(manifestPath, 'utf-8');
22
+ const parsed = JSON.parse(content);
23
+ return parseManifest(parsed);
24
+ }
25
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/core/manifest.ts"],"names":[],"mappings":";;AAcA,sCAEC;AAED,oCAKC;AAvBD,6BAAwB;AACxB,2BAAkC;AAClC,+BAA4B;AAG5B,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,eAAe,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAChD,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,gBAAgB,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAClD,CAAC,CAAC;AAEH,SAAgB,aAAa,CAAC,IAAa;IACzC,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAgB,YAAY,CAAC,UAAkB;IAC7C,MAAM,YAAY,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,IAAA,iBAAY,EAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { BundleEntry } from './registry.js';
2
+ export declare function showMenu(bundles: BundleEntry[]): Promise<string | null>;
3
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/core/menu.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,wBAAsB,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqB7E"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.showMenu = showMenu;
4
+ const prompts_1 = require("@inquirer/prompts");
5
+ async function showMenu(bundles) {
6
+ if (bundles.length === 0) {
7
+ console.log('No bundles installed. Run: claude-bundle add <git-url>');
8
+ return null;
9
+ }
10
+ const choices = [
11
+ ...bundles.map((b) => ({
12
+ name: `${b.name.padEnd(20)} ${b.description || ''}`,
13
+ value: b.name,
14
+ })),
15
+ { name: '─'.repeat(40), value: '---', disabled: true },
16
+ { name: '(none) Plain Claude session', value: null },
17
+ ];
18
+ const result = await (0, prompts_1.select)({
19
+ message: 'Which bundle?',
20
+ choices,
21
+ });
22
+ return result;
23
+ }
24
+ //# sourceMappingURL=menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/core/menu.ts"],"names":[],"mappings":";;AAGA,4BAqBC;AAxBD,+CAA2C;AAGpC,KAAK,UAAU,QAAQ,CAAC,OAAsB;IACnD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,OAAO,GAAG;QACd,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACrB,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,IAAI,EAAE,EAAE;YACnD,KAAK,EAAE,CAAC,CAAC,IAAI;SACd,CAAC,CAAC;QACH,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE;QACtD,EAAE,IAAI,EAAE,gCAAgC,EAAE,KAAK,EAAE,IAAI,EAAE;KACxD,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,IAAA,gBAAM,EAAC;QAC1B,OAAO,EAAE,eAAe;QACxB,OAAO;KACR,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const getBundleDir: () => string;
2
+ export declare const getPluginsDir: () => string;
3
+ export declare const getSecretsDir: () => string;
4
+ export declare const getConfigPath: () => string;
5
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/core/paths.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY,cAAsC,CAAC;AAChE,eAAO,MAAM,aAAa,cAAsC,CAAC;AACjE,eAAO,MAAM,aAAa,cAAsC,CAAC;AACjE,eAAO,MAAM,aAAa,cAA0C,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getConfigPath = exports.getSecretsDir = exports.getPluginsDir = exports.getBundleDir = void 0;
4
+ const os_1 = require("os");
5
+ const path_1 = require("path");
6
+ function getBaseDir() {
7
+ if (process.env.CLAUDE_BUNDLE_TEST_DIR) {
8
+ return (0, path_1.join)(process.env.CLAUDE_BUNDLE_TEST_DIR, '.claude-bundle');
9
+ }
10
+ return (0, path_1.join)((0, os_1.homedir)(), '.claude-bundle');
11
+ }
12
+ const getBundleDir = () => (0, path_1.join)(getBaseDir(), 'bundles');
13
+ exports.getBundleDir = getBundleDir;
14
+ const getPluginsDir = () => (0, path_1.join)(getBaseDir(), 'plugins');
15
+ exports.getPluginsDir = getPluginsDir;
16
+ const getSecretsDir = () => (0, path_1.join)(getBaseDir(), 'secrets');
17
+ exports.getSecretsDir = getSecretsDir;
18
+ const getConfigPath = () => (0, path_1.join)(getBaseDir(), 'config.json');
19
+ exports.getConfigPath = getConfigPath;
20
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/core/paths.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAC7B,+BAA4B;AAE5B,SAAS,UAAU;IACjB,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,CAAC;QACvC,OAAO,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,IAAA,WAAI,EAAC,IAAA,YAAO,GAAE,EAAE,gBAAgB,CAAC,CAAC;AAC3C,CAAC;AAEM,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,IAAA,WAAI,EAAC,UAAU,EAAE,EAAE,SAAS,CAAC,CAAC;AAAnD,QAAA,YAAY,gBAAuC;AACzD,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAA,WAAI,EAAC,UAAU,EAAE,EAAE,SAAS,CAAC,CAAC;AAApD,QAAA,aAAa,iBAAuC;AAC1D,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAA,WAAI,EAAC,UAAU,EAAE,EAAE,SAAS,CAAC,CAAC;AAApD,QAAA,aAAa,iBAAuC;AAC1D,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAA,WAAI,EAAC,UAAU,EAAE,EAAE,aAAa,CAAC,CAAC;AAAxD,QAAA,aAAa,iBAA2C"}
@@ -0,0 +1,10 @@
1
+ export interface BundleEntry {
2
+ name: string;
3
+ path: string;
4
+ url: string;
5
+ description?: string;
6
+ }
7
+ export declare function addBundle(url: string): Promise<void>;
8
+ export declare function removeBundle(name: string, deleteFiles?: boolean): void;
9
+ export declare function listBundles(): BundleEntry[];
10
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/core/registry.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB1D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,UAAQ,GAAG,IAAI,CAcpE;AAED,wBAAgB,WAAW,IAAI,WAAW,EAAE,CAoB3C"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addBundle = addBundle;
4
+ exports.removeBundle = removeBundle;
5
+ exports.listBundles = listBundles;
6
+ const path_1 = require("path");
7
+ const fs_1 = require("fs");
8
+ const config_js_1 = require("./config.js");
9
+ const paths_js_1 = require("./paths.js");
10
+ const git_js_1 = require("../utils/git.js");
11
+ async function addBundle(url) {
12
+ const config = (0, config_js_1.loadConfig)();
13
+ const bundleDir = (0, paths_js_1.getBundleDir)();
14
+ (0, fs_1.mkdirSync)(bundleDir, { recursive: true });
15
+ // Extract name from URL (e.g., "owner/repo" -> "repo")
16
+ const repoName = (0, path_1.basename)(url.replace(/\.git$/, ''));
17
+ const destPath = (0, path_1.join)(bundleDir, repoName);
18
+ if ((0, fs_1.existsSync)(destPath)) {
19
+ throw new Error(`Bundle "${repoName}" already exists at ${destPath}`);
20
+ }
21
+ await (0, git_js_1.cloneRepo)(url, destPath);
22
+ config.bundles[repoName] = {
23
+ path: destPath,
24
+ url,
25
+ };
26
+ (0, config_js_1.saveConfig)(config);
27
+ }
28
+ function removeBundle(name, deleteFiles = false) {
29
+ const config = (0, config_js_1.loadConfig)();
30
+ if (!config.bundles[name]) {
31
+ throw new Error(`Bundle "${name}" not found`);
32
+ }
33
+ const bundlePath = config.bundles[name].path;
34
+ delete config.bundles[name];
35
+ (0, config_js_1.saveConfig)(config);
36
+ if (deleteFiles && (0, fs_1.existsSync)(bundlePath)) {
37
+ (0, fs_1.rmSync)(bundlePath, { recursive: true, force: true });
38
+ }
39
+ }
40
+ function listBundles() {
41
+ const config = (0, config_js_1.loadConfig)();
42
+ return Object.entries(config.bundles).map(([name, info]) => {
43
+ let description = '';
44
+ try {
45
+ const manifestPath = (0, path_1.join)(info.path, 'bundle.json');
46
+ if ((0, fs_1.existsSync)(manifestPath)) {
47
+ const manifest = JSON.parse((0, fs_1.readFileSync)(manifestPath, 'utf-8'));
48
+ description = manifest.description || '';
49
+ }
50
+ }
51
+ catch {
52
+ // ignore
53
+ }
54
+ return {
55
+ name,
56
+ path: info.path,
57
+ url: info.url,
58
+ description,
59
+ };
60
+ });
61
+ }
62
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/core/registry.ts"],"names":[],"mappings":";;AAaA,8BAqBC;AAED,oCAcC;AAED,kCAoBC;AAxED,+BAAsC;AACtC,2BAAiE;AACjE,2CAAqD;AACrD,yCAA0C;AAC1C,4CAA4C;AASrC,KAAK,UAAU,SAAS,CAAC,GAAW;IACzC,MAAM,MAAM,GAAG,IAAA,sBAAU,GAAE,CAAC;IAC5B,MAAM,SAAS,GAAG,IAAA,uBAAY,GAAE,CAAC;IACjC,IAAA,cAAS,EAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1C,uDAAuD;IACvD,MAAM,QAAQ,GAAG,IAAA,eAAQ,EAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;IACrD,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE3C,IAAI,IAAA,eAAU,EAAC,QAAQ,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,WAAW,QAAQ,uBAAuB,QAAQ,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,IAAA,kBAAS,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAE/B,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG;QACzB,IAAI,EAAE,QAAQ;QACd,GAAG;KACJ,CAAC;IAEF,IAAA,sBAAU,EAAC,MAAM,CAAC,CAAC;AACrB,CAAC;AAED,SAAgB,YAAY,CAAC,IAAY,EAAE,WAAW,GAAG,K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IAAI;YACf,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,WAAW;SACZ,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { BundleManifest, ResolvedBundle } from '../types/index.js';
2
+ export declare function resolveBundle(bundleName: string, bundlePath: string, manifest: BundleManifest): Promise<ResolvedBundle>;
3
+ export declare function mergeMcpConfigs(mcpPaths: string[]): Record<string, unknown>;
4
+ export declare function writeMergedMcpConfig(merged: Record<string, unknown>, destPath: string): void;
5
+ //# sourceMappingURL=resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/core/resolver.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAe,MAAM,mBAAmB,CAAC;AAErF,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,cAAc,CAAC,CAsDzB;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAa3E;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE5F"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveBundle = resolveBundle;
4
+ exports.mergeMcpConfigs = mergeMcpConfigs;
5
+ exports.writeMergedMcpConfig = writeMergedMcpConfig;
6
+ const path_1 = require("path");
7
+ const fs_1 = require("fs");
8
+ const paths_js_1 = require("./paths.js");
9
+ const git_js_1 = require("../utils/git.js");
10
+ async function resolveBundle(bundleName, bundlePath, manifest) {
11
+ const pluginDirs = [];
12
+ // Add bundle's own plugin dir if it exists
13
+ const ownPluginDir = (0, path_1.join)(bundlePath, 'plugin');
14
+ if ((0, fs_1.existsSync)(ownPluginDir)) {
15
+ pluginDirs.push(ownPluginDir);
16
+ }
17
+ // Resolve included plugins
18
+ const pluginsDir = (0, paths_js_1.getPluginsDir)();
19
+ (0, fs_1.mkdirSync)(pluginsDir, { recursive: true });
20
+ for (const pluginRef of manifest.include_plugins || []) {
21
+ if (pluginRef.startsWith('https://') || pluginRef.startsWith('http://') || pluginRef.startsWith('git@')) {
22
+ const pluginName = (0, path_1.basename)(pluginRef.replace(/\.git$/, ''));
23
+ const pluginPath = (0, path_1.join)(pluginsDir, pluginName);
24
+ if (!(0, fs_1.existsSync)(pluginPath)) {
25
+ await (0, git_js_1.cloneRepo)(pluginRef, pluginPath);
26
+ }
27
+ pluginDirs.push(pluginPath);
28
+ }
29
+ // TODO: marketplace refs deferred to future version
30
+ }
31
+ // Determine MCP path
32
+ let mcpPath;
33
+ if (manifest.mcp) {
34
+ const fullPath = (0, path_1.join)(bundlePath, manifest.mcp);
35
+ if ((0, fs_1.existsSync)(fullPath)) {
36
+ mcpPath = fullPath;
37
+ }
38
+ }
39
+ // Determine memory path
40
+ let memoryPath;
41
+ if (manifest.memory) {
42
+ const fullPath = (0, path_1.join)(bundlePath, manifest.memory);
43
+ if ((0, fs_1.existsSync)(fullPath)) {
44
+ memoryPath = fullPath;
45
+ }
46
+ }
47
+ return {
48
+ name: bundleName,
49
+ manifest,
50
+ bundlePath,
51
+ pluginDirs,
52
+ mcpPath,
53
+ memoryPath,
54
+ secrets: {}, // populated by caller after prompting
55
+ };
56
+ }
57
+ function mergeMcpConfigs(mcpPaths) {
58
+ const merged = { mcpServers: {} };
59
+ for (const path of mcpPaths) {
60
+ if (!(0, fs_1.existsSync)(path))
61
+ continue;
62
+ const content = (0, fs_1.readFileSync)(path, 'utf-8');
63
+ const config = JSON.parse(content);
64
+ if (config.mcpServers) {
65
+ Object.assign(merged.mcpServers, config.mcpServers);
66
+ }
67
+ }
68
+ return merged;
69
+ }
70
+ function writeMergedMcpConfig(merged, destPath) {
71
+ (0, fs_1.writeFileSync)(destPath, JSON.stringify(merged, null, 2) + '\n');
72
+ }
73
+ //# sourceMappingURL=resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../src/core/resolver.ts"],"names":[],"mappings":";;AAMA,sCA0DC;AAED,0CAaC;AAED,oDAEC;AAnFD,+BAAsC;AACtC,2BAAwE;AACxE,yCAA2C;AAC3C,4CAA4C;AAGrC,KAAK,UAAU,aAAa,CACjC,UAAkB,EAClB,UAAkB,EAClB,QAAwB;IAExB,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,2CAA2C;IAC3C,MAAM,YAAY,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAChD,IAAI,IAAA,eAAU,EAAC,YAAY,CAAC,EAAE,CAAC;QAC7B,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAChC,CAAC;IAED,2BAA2B;IAC3B,MAAM,UAAU,GAAG,IAAA,wBAAa,GAAE,CAAC;IACnC,IAAA,cAAS,EAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE3C,KAAK,MAAM,SAAS,IAAI,QAAQ,CAAC,eAAe,IAAI,EAAE,EAAE,CAAC;QACvD,IAAI,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YACxG,MAAM,UAAU,GAAG,IAAA,eAAQ,EAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;YAC7D,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YAEhD,IAAI,CAAC,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAAC;gBAC5B,MAAM,IAAA,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AC;YACtB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAqC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAgB,oBAAoB,CAAC,MAA+B,EAAE,QAAgB;IACpF,IAAA,kBAAa,EAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { SecretStore } from '../types/index.js';
2
+ export declare function getSecretsPath(bundleName: string): string;
3
+ export declare function loadSecrets(bundleName: string): SecretStore;
4
+ export declare function saveSecrets(bundleName: string, secrets: SecretStore): void;
5
+ export declare function promptForSecrets(bundleName: string, required: string[]): Promise<SecretStore>;
6
+ //# sourceMappingURL=secrets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/core/secrets.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAmB3D;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAQ1E;AAED,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAenG"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSecretsPath = getSecretsPath;
4
+ exports.loadSecrets = loadSecrets;
5
+ exports.saveSecrets = saveSecrets;
6
+ exports.promptForSecrets = promptForSecrets;
7
+ const fs_1 = require("fs");
8
+ const path_1 = require("path");
9
+ const prompts_1 = require("@inquirer/prompts");
10
+ const paths_js_1 = require("./paths.js");
11
+ function getSecretsPath(bundleName) {
12
+ return (0, path_1.join)((0, paths_js_1.getSecretsDir)(), `${bundleName}.env`);
13
+ }
14
+ function loadSecrets(bundleName) {
15
+ const secretsPath = getSecretsPath(bundleName);
16
+ if (!(0, fs_1.existsSync)(secretsPath)) {
17
+ return {};
18
+ }
19
+ const content = (0, fs_1.readFileSync)(secretsPath, 'utf-8');
20
+ const secrets = {};
21
+ for (const line of content.split('\n')) {
22
+ const trimmed = line.trim();
23
+ if (!trimmed || trimmed.startsWith('#'))
24
+ continue;
25
+ const [key, ...valueParts] = trimmed.split('=');
26
+ if (key && valueParts.length > 0) {
27
+ secrets[key] = valueParts.join('=').replace(/^["']|["']$/g, '');
28
+ }
29
+ }
30
+ return secrets;
31
+ }
32
+ function saveSecrets(bundleName, secrets) {
33
+ const secretsDir = (0, paths_js_1.getSecretsDir)();
34
+ (0, fs_1.mkdirSync)(secretsDir, { recursive: true });
35
+ const secretsPath = getSecretsPath(bundleName);
36
+ const lines = Object.entries(secrets).map(([key, value]) => `${key}=${value}`);
37
+ (0, fs_1.writeFileSync)(secretsPath, lines.join('\n') + '\n');
38
+ (0, fs_1.chmodSync)(secretsPath, 0o600);
39
+ }
40
+ async function promptForSecrets(bundleName, required) {
41
+ const existing = loadSecrets(bundleName);
42
+ const secrets = { ...existing };
43
+ for (const key of required) {
44
+ if (!secrets[key]) {
45
+ const value = await (0, prompts_1.input)({
46
+ message: `Enter ${key} for bundle "${bundleName}":`,
47
+ });
48
+ secrets[key] = value;
49
+ }
50
+ }
51
+ saveSecrets(bundleName, secrets);
52
+ return secrets;
53
+ }
54
+ //# sourceMappingURL=secrets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/core/secrets.ts"],"names":[],"mappings":";;AAMA,wCAEC;AAED,kCAmBC;AAED,kCAQC;AAED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AM,WAAW,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;IAC/E,IAAA,kBAAa,EAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACpD,IAAA,cAAS,EAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAChC,CAAC;AAEM,KAAK,UAAU,gBAAgB,CAAC,UAAkB,EAAE,QAAkB;IAC3E,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,OAAO,GAAgB,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE7C,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YAClB,MAAM,KAAK,GAAG,MAAM,IAAA,eAAK,EAAC;gBACxB,OAAO,EAAE,SAAS,GAAG,gBAAgB,UAAU,IAAI;aACpD,CAAC,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACjC,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const cli_js_1 = require("./cli.js");
5
+ (0, cli_js_1.dispatch)(process.argv.slice(2)).catch((err) => {
6
+ console.error(err.message);
7
+ process.exit(1);
8
+ });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,qCAAoC;AAEpC,IAAA,iBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAC5C,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ export interface BundleConfig {
2
+ version: string;
3
+ realClaudePath: string;
4
+ bundles: Record<string, {
5
+ path: string;
6
+ url: string;
7
+ }>;
8
+ }
9
+ export interface BundleManifest {
10
+ name: string;
11
+ description: string;
12
+ include_plugins?: string[];
13
+ mcp?: string;
14
+ memory?: string;
15
+ requires_secrets?: string[];
16
+ }
17
+ export interface SecretStore {
18
+ [key: string]: string;
19
+ }
20
+ export interface ResolvedBundle {
21
+ name: string;
22
+ manifest: BundleManifest;
23
+ bundlePath: string;
24
+ pluginDirs: string[];
25
+ mcpPath?: string;
26
+ memoryPath?: string;
27
+ secrets: SecretStore;
28
+ }
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,WAAW,CAAC;CACtB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export declare function cloneRepo(url: string, dest: string): Promise<void>;
2
+ export declare function pullRepo(path: string): Promise<void>;
3
+ //# sourceMappingURL=git.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAEA,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxE;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1D"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.cloneRepo = cloneRepo;
7
+ exports.pullRepo = pullRepo;
8
+ const simple_git_1 = __importDefault(require("simple-git"));
9
+ async function cloneRepo(url, dest) {
10
+ const git = (0, simple_git_1.default)();
11
+ await git.clone(url, dest);
12
+ }
13
+ async function pullRepo(path) {
14
+ const git = (0, simple_git_1.default)(path);
15
+ await git.pull();
16
+ }
17
+ //# sourceMappingURL=git.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":";;;;;AAEA,8BAGC;AAED,4BAGC;AAVD,4DAAmC;AAE5B,KAAK,UAAU,SAAS,CAAC,GAAW,EAAE,IAAY;IACvD,MAAM,GAAG,GAAG,IAAA,oBAAS,GAAE,CAAC;IACxB,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC7B,CAAC;AAEM,KAAK,UAAU,QAAQ,CAAC,IAAY;IACzC,MAAM,GAAG,GAAG,IAAA,oBAAS,EAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;AACnB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "claude-bundle",
3
+ "version": "0.1.0",
4
+ "description": "Bundle manager for Claude Code — focused sessions with exclusive component sets",
5
+ "bin": {
6
+ "claude-bundle": "./dist/index.js"
7
+ },
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "dev": "tsc --watch",
11
+ "test": "vitest",
12
+ "test:run": "vitest run",
13
+ "lint": "tsc --noEmit",
14
+ "prepublishOnly": "npm run build"
15
+ },
16
+ "keywords": ["claude", "bundle", "mcp", "launcher"],
17
+ "author": "adamkopelman",
18
+ "license": "MIT",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/adamkopelman/cluade-bundle.git"
22
+ },
23
+ "homepage": "https://github.com/adamkopelman/cluade-bundle#readme",
24
+ "bugs": {
25
+ "url": "https://github.com/adamkopelman/cluade-bundle/issues"
26
+ },
27
+ "files": ["dist/**/*"],
28
+ "engines": {
29
+ "node": ">=20.0.0"
30
+ },
31
+ "dependencies": {
32
+ "@inquirer/prompts": "^5.0.0",
33
+ "simple-git": "^3.22.0",
34
+ "execa": "^8.0.0",
35
+ "zod": "^3.23.0",
36
+ "dotenv": "^16.4.0"
37
+ },
38
+ "devDependencies": {
39
+ "@types/node": "^20.0.0",
40
+ "typescript": "^5.4.0",
41
+ "vitest": "^1.6.0"
42
+ }
43
+ }