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.
- package/LICENSE +21 -0
- package/README.md +84 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +114 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/add.d.ts +2 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +15 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +41 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +26 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/remove.d.ts +2 -0
- package/dist/commands/remove.d.ts.map +1 -0
- package/dist/commands/remove.js +15 -0
- package/dist/commands/remove.js.map +1 -0
- package/dist/commands/secrets.d.ts +2 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +41 -0
- package/dist/commands/secrets.js.map +1 -0
- package/dist/commands/setup.d.ts +2 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +46 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +30 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/use.d.ts +2 -0
- package/dist/commands/use.d.ts.map +1 -0
- package/dist/commands/use.js +28 -0
- package/dist/commands/use.js.map +1 -0
- package/dist/core/config.d.ts +5 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +31 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/launcher.d.ts +3 -0
- package/dist/core/launcher.d.ts.map +1 -0
- package/dist/core/launcher.js +63 -0
- package/dist/core/launcher.js.map +1 -0
- package/dist/core/manifest.d.ts +4 -0
- package/dist/core/manifest.d.ts.map +1 -0
- package/dist/core/manifest.js +25 -0
- package/dist/core/manifest.js.map +1 -0
- package/dist/core/menu.d.ts +3 -0
- package/dist/core/menu.d.ts.map +1 -0
- package/dist/core/menu.js +24 -0
- package/dist/core/menu.js.map +1 -0
- package/dist/core/paths.d.ts +5 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/paths.js +20 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/registry.d.ts +10 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +62 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/resolver.d.ts +5 -0
- package/dist/core/resolver.d.ts.map +1 -0
- package/dist/core/resolver.js +73 -0
- package/dist/core/resolver.js.map +1 -0
- package/dist/core/secrets.d.ts +6 -0
- package/dist/core/secrets.d.ts.map +1 -0
- package/dist/core/secrets.js +54 -0
- package/dist/core/secrets.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +29 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/git.d.ts +3 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +17 -0
- package/dist/utils/git.js.map +1 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 adamkopelman
|
|
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,84 @@
|
|
|
1
|
+
# claude-bundle
|
|
2
|
+
|
|
3
|
+
Bundle manager for Claude Code — focused sessions with exclusive component sets.
|
|
4
|
+
|
|
5
|
+
## What is claude-bundle?
|
|
6
|
+
|
|
7
|
+
`claude-bundle` lets you group Claude Code components — MCP servers, skills,
|
|
8
|
+
slash commands, agents, hooks, and memory — into named, purpose-built
|
|
9
|
+
**bundles**. When you start Claude Code it asks which bundle you want;
|
|
10
|
+
the chosen bundle's components are loaded and **everything else is off**,
|
|
11
|
+
giving you a clean, focused session tailored to what you're doing.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g claude-bundle
|
|
17
|
+
claude-bundle setup
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then add the alias to your shell profile:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
alias claude="claude-bundle"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Add a bundle
|
|
30
|
+
claude-bundle add https://github.com/user/manager-bundle
|
|
31
|
+
|
|
32
|
+
# List installed bundles
|
|
33
|
+
claude-bundle list
|
|
34
|
+
|
|
35
|
+
# Launch a specific bundle
|
|
36
|
+
claude-bundle use manager
|
|
37
|
+
|
|
38
|
+
# Or just run `claude` to see the menu
|
|
39
|
+
claude
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Creating Bundles
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Scaffold a new bundle
|
|
46
|
+
claude-bundle init my-bundle
|
|
47
|
+
cd my-bundle
|
|
48
|
+
|
|
49
|
+
# Edit bundle.json, README.md, add your skills/commands
|
|
50
|
+
# Then publish to git and add it
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Bundle Format
|
|
54
|
+
|
|
55
|
+
A bundle is a git repo with:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
my-bundle/
|
|
59
|
+
├── bundle.json # Required manifest
|
|
60
|
+
├── README.md # Shown to user + injected into session
|
|
61
|
+
├── plugin/ # Your inline plugin content
|
|
62
|
+
│ ├── skills/
|
|
63
|
+
│ ├── commands/
|
|
64
|
+
│ ├── agents/
|
|
65
|
+
│ └── hooks/
|
|
66
|
+
├── mcp.json # Your MCP servers
|
|
67
|
+
└── memory/
|
|
68
|
+
└── CLAUDE.md # Team/project memory
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
See `docs/usage.md` for full documentation.
|
|
72
|
+
|
|
73
|
+
## Commands
|
|
74
|
+
|
|
75
|
+
| Command | Description |
|
|
76
|
+
|---------|-------------|
|
|
77
|
+
| `claude-bundle add <url>` | Add a bundle from git |
|
|
78
|
+
| `claude-bundle remove <name>` | Remove a bundle |
|
|
79
|
+
| `claude-bundle list` | List installed bundles |
|
|
80
|
+
| `claude-bundle update [name]` | Update bundle(s) |
|
|
81
|
+
| `claude-bundle use <name>` | Launch a specific bundle |
|
|
82
|
+
| `claude-bundle init [name]` | Scaffold a new bundle |
|
|
83
|
+
| `claude-bundle secrets <name>` | Configure secrets |
|
|
84
|
+
| `claude-bundle setup` | Configure shell alias |
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AASA,wBAAgB,QAAQ,IAAI,IAAI,CA0B/B;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwC5D"}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.showHelp = showHelp;
|
|
4
|
+
exports.dispatch = dispatch;
|
|
5
|
+
const add_js_1 = require("./commands/add.js");
|
|
6
|
+
const remove_js_1 = require("./commands/remove.js");
|
|
7
|
+
const list_js_1 = require("./commands/list.js");
|
|
8
|
+
const update_js_1 = require("./commands/update.js");
|
|
9
|
+
const use_js_1 = require("./commands/use.js");
|
|
10
|
+
const init_js_1 = require("./commands/init.js");
|
|
11
|
+
const secrets_js_1 = require("./commands/secrets.js");
|
|
12
|
+
const setup_js_1 = require("./commands/setup.js");
|
|
13
|
+
function showHelp() {
|
|
14
|
+
console.log(`
|
|
15
|
+
claude-bundle - Bundle manager for Claude Code
|
|
16
|
+
|
|
17
|
+
Usage:
|
|
18
|
+
claude-bundle [command] [options]
|
|
19
|
+
|
|
20
|
+
Commands:
|
|
21
|
+
add <git-url> Add a bundle from a git repository
|
|
22
|
+
remove <name> Remove a bundle
|
|
23
|
+
list List installed bundles
|
|
24
|
+
update [name] Update bundle(s) from git
|
|
25
|
+
use <name> Launch a specific bundle
|
|
26
|
+
init [name] Scaffold a new bundle
|
|
27
|
+
secrets <name> Configure secrets for a bundle
|
|
28
|
+
setup Configure shell alias
|
|
29
|
+
|
|
30
|
+
Options:
|
|
31
|
+
-h, --help Show this help message
|
|
32
|
+
-v, --version Show version
|
|
33
|
+
|
|
34
|
+
Examples:
|
|
35
|
+
claude-bundle add https://github.com/user/manager-bundle
|
|
36
|
+
claude-bundle use manager
|
|
37
|
+
claude-bundle setup
|
|
38
|
+
`);
|
|
39
|
+
}
|
|
40
|
+
async function dispatch(args) {
|
|
41
|
+
const [command, ...rest] = args;
|
|
42
|
+
switch (command) {
|
|
43
|
+
case 'add':
|
|
44
|
+
await (0, add_js_1.addCommand)(rest);
|
|
45
|
+
break;
|
|
46
|
+
case 'remove':
|
|
47
|
+
await (0, remove_js_1.removeCommand)(rest);
|
|
48
|
+
break;
|
|
49
|
+
case 'list':
|
|
50
|
+
await (0, list_js_1.listCommand)();
|
|
51
|
+
break;
|
|
52
|
+
case 'update':
|
|
53
|
+
await (0, update_js_1.updateCommand)(rest);
|
|
54
|
+
break;
|
|
55
|
+
case 'use':
|
|
56
|
+
await (0, use_js_1.useCommand)(rest);
|
|
57
|
+
break;
|
|
58
|
+
case 'init':
|
|
59
|
+
await (0, init_js_1.initCommand)(rest);
|
|
60
|
+
break;
|
|
61
|
+
case 'secrets':
|
|
62
|
+
await (0, secrets_js_1.secretsCommand)(rest);
|
|
63
|
+
break;
|
|
64
|
+
case 'setup':
|
|
65
|
+
await (0, setup_js_1.setupCommand)();
|
|
66
|
+
break;
|
|
67
|
+
case '-h':
|
|
68
|
+
case '--help':
|
|
69
|
+
showHelp();
|
|
70
|
+
break;
|
|
71
|
+
case '-v':
|
|
72
|
+
case '--version':
|
|
73
|
+
console.log('claude-bundle v0.1.0');
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
// No command or unknown - show menu and launch
|
|
77
|
+
await defaultCommand();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function defaultCommand() {
|
|
81
|
+
const { listBundles } = await import('./core/registry.js');
|
|
82
|
+
const { showMenu } = await import('./core/menu.js');
|
|
83
|
+
const { loadManifest } = await import('./core/manifest.js');
|
|
84
|
+
const { resolveBundle } = await import('./core/resolver.js');
|
|
85
|
+
const { promptForSecrets } = await import('./core/secrets.js');
|
|
86
|
+
const { launchBundle } = await import('./core/launcher.js');
|
|
87
|
+
const bundles = listBundles();
|
|
88
|
+
const selected = await showMenu(bundles);
|
|
89
|
+
if (selected === null) {
|
|
90
|
+
// Plain session - launch real claude with no bundle
|
|
91
|
+
const { loadConfig } = await import('./core/config.js');
|
|
92
|
+
const config = loadConfig();
|
|
93
|
+
if (!config.realClaudePath) {
|
|
94
|
+
console.error('Real claude path not configured. Run: claude-bundle setup');
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
const { execa } = await import('execa');
|
|
98
|
+
await execa(config.realClaudePath, process.argv.slice(2), { stdio: 'inherit' });
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const bundle = bundles.find((b) => b.name === selected);
|
|
102
|
+
if (!bundle) {
|
|
103
|
+
console.error(`Bundle "${selected}" not found`);
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
const manifest = loadManifest(bundle.path);
|
|
107
|
+
const resolved = await resolveBundle(bundle.name, bundle.path, manifest);
|
|
108
|
+
// Prompt for any missing secrets
|
|
109
|
+
if (manifest.requires_secrets && manifest.requires_secrets.length > 0) {
|
|
110
|
+
resolved.secrets = await promptForSecrets(bundle.name, manifest.requires_secrets);
|
|
111
|
+
}
|
|
112
|
+
await launchBundle(resolved, process.argv.slice(2));
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AASA,4BA0BC;AAED,4BAwCC;AA7ED,8CAA+C;AAC/C,oDAAqD;AACrD,gDAAiD;AACjD,oDAAqD;AACrD,8CAA+C;AAC/C,gDAAiD;AACjD,sDAAuD;AACvD,kDAAmD;AAEnD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C,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAEzE,iCAAiC;IACjC,IAAI,QAAQ,CAAC,gBAAgB,IAAI,QAAQ,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtE,QAAQ,CAAC,OAAO,GAAG,MAAM,gBAAgB,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IACpF,CAAC;IAED,MAAM,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAEA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAU9D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addCommand = addCommand;
|
|
4
|
+
const registry_js_1 = require("../core/registry.js");
|
|
5
|
+
async function addCommand(args) {
|
|
6
|
+
const [url] = args;
|
|
7
|
+
if (!url) {
|
|
8
|
+
console.error('Usage: claude-bundle add <git-url>');
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
console.log(`Adding bundle from ${url}...`);
|
|
12
|
+
await (0, registry_js_1.addBundle)(url);
|
|
13
|
+
console.log('Bundle added successfully');
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=add.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":";;AAEA,gCAUC;AAZD,qDAAgD;AAEzC,KAAK,UAAU,UAAU,CAAC,IAAc;IAC7C,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,KAAK,CAAC,CAAC;IAC5C,MAAM,IAAA,uBAAS,EAAC,GAAG,CAAC,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAuBA,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB/D"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initCommand = initCommand;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const DEFAULT_BUNDLE_JSON = {
|
|
7
|
+
name: 'my-bundle',
|
|
8
|
+
description: 'My custom Claude Code bundle',
|
|
9
|
+
include_plugins: [],
|
|
10
|
+
requires_secrets: [],
|
|
11
|
+
};
|
|
12
|
+
const DEFAULT_README = `# My Bundle
|
|
13
|
+
|
|
14
|
+
Description of what this bundle provides.
|
|
15
|
+
|
|
16
|
+
## Commands
|
|
17
|
+
|
|
18
|
+
- \`/my-command\` - Description
|
|
19
|
+
|
|
20
|
+
## Secrets Required
|
|
21
|
+
|
|
22
|
+
None
|
|
23
|
+
`;
|
|
24
|
+
async function initCommand(args) {
|
|
25
|
+
const [name = 'my-bundle'] = args;
|
|
26
|
+
const cwd = process.cwd();
|
|
27
|
+
const bundleDir = (0, path_1.join)(cwd, name);
|
|
28
|
+
(0, fs_1.mkdirSync)(bundleDir, { recursive: true });
|
|
29
|
+
(0, fs_1.mkdirSync)((0, path_1.join)(bundleDir, 'plugin'), { recursive: true });
|
|
30
|
+
(0, fs_1.mkdirSync)((0, path_1.join)(bundleDir, 'memory'), { recursive: true });
|
|
31
|
+
const bundleJson = { ...DEFAULT_BUNDLE_JSON, name };
|
|
32
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(bundleDir, 'bundle.json'), JSON.stringify(bundleJson, null, 2) + '\n');
|
|
33
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(bundleDir, 'README.md'), DEFAULT_README);
|
|
34
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(bundleDir, 'mcp.json'), JSON.stringify({ mcpServers: {} }, null, 2) + '\n');
|
|
35
|
+
console.log(`Created bundle "${name}" at ${bundleDir}`);
|
|
36
|
+
console.log('Next steps:');
|
|
37
|
+
console.log(` cd ${name}`);
|
|
38
|
+
console.log(' git init && git add . && git commit -m "initial"');
|
|
39
|
+
console.log(' claude-bundle add <this-repo-url>');
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;AAuBA,kCAmBC;AA1CD,2BAA8C;AAC9C,+BAA4B;AAE5B,MAAM,mBAAmB,GAAG;IAC1B,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,8BAA8B;IAC3C,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,EAAE;CACrB,CAAC;AAEF,MAAM,cAAc,GAAG;;;;;;;;;;;CAWtB,CAAC;AAEK,KAAK,UAAU,WAAW,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C,oDAAoD,CAAC,CAAC;IAClE,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAqBjD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listCommand = listCommand;
|
|
4
|
+
const registry_js_1 = require("../core/registry.js");
|
|
5
|
+
const secrets_js_1 = require("../core/secrets.js");
|
|
6
|
+
const manifest_js_1 = require("../core/manifest.js");
|
|
7
|
+
async function listCommand() {
|
|
8
|
+
const bundles = (0, registry_js_1.listBundles)();
|
|
9
|
+
if (bundles.length === 0) {
|
|
10
|
+
console.log('No bundles installed.');
|
|
11
|
+
console.log('Run: claude-bundle add <git-url>');
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
console.log('\nInstalled bundles:\n');
|
|
15
|
+
for (const bundle of bundles) {
|
|
16
|
+
const manifest = (0, manifest_js_1.loadManifest)(bundle.path);
|
|
17
|
+
const secrets = (0, secrets_js_1.loadSecrets)(bundle.name);
|
|
18
|
+
const secretsStatus = manifest.requires_secrets
|
|
19
|
+
? `${Object.keys(secrets).length}/${manifest.requires_secrets.length} secrets set`
|
|
20
|
+
: 'no secrets required';
|
|
21
|
+
console.log(` ${bundle.name.padEnd(20)} ${(bundle.description ?? '').slice(0, 40)}`);
|
|
22
|
+
console.log(` ${secretsStatus}`);
|
|
23
|
+
}
|
|
24
|
+
console.log();
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":";;AAIA,kCAqBC;AAz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AAI,CAAC,CAUjE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeCommand = removeCommand;
|
|
4
|
+
const registry_js_1 = require("../core/registry.js");
|
|
5
|
+
async function removeCommand(args) {
|
|
6
|
+
const [name, ...rest] = args;
|
|
7
|
+
if (!name) {
|
|
8
|
+
console.error('Usage: claude-bundle remove <name> [--delete-files]');
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
const deleteFiles = rest.includes('--delete-files');
|
|
12
|
+
(0, registry_js_1.removeBundle)(name, deleteFiles);
|
|
13
|
+
console.log(`Bundle "${name}" removed`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=remove.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../src/commands/remove.ts"],"names":[],"mappings":";;AAEA,sCAUC;AAZD,qDAAmD;AAE5C,KAAK,UAAU,aAAa,CAAC,IAAc;IAChD,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IACpD,IAAA,0BAAY,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAChC,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,WAAW,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/commands/secrets.ts"],"names":[],"mappings":"AAKA,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAqClE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.secretsCommand = secretsCommand;
|
|
4
|
+
const registry_js_1 = require("../core/registry.js");
|
|
5
|
+
const secrets_js_1 = require("../core/secrets.js");
|
|
6
|
+
const manifest_js_1 = require("../core/manifest.js");
|
|
7
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
8
|
+
async function secretsCommand(args) {
|
|
9
|
+
const [name] = args;
|
|
10
|
+
if (!name) {
|
|
11
|
+
console.error('Usage: claude-bundle secrets <name>');
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
const bundles = (0, registry_js_1.listBundles)();
|
|
15
|
+
const bundle = bundles.find((b) => b.name === name);
|
|
16
|
+
if (!bundle) {
|
|
17
|
+
console.error(`Bundle "${name}" not found`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
const manifest = (0, manifest_js_1.loadManifest)(bundle.path);
|
|
21
|
+
const existing = (0, secrets_js_1.loadSecrets)(name);
|
|
22
|
+
console.log(`\nConfiguring secrets for "${name}":\n`);
|
|
23
|
+
const secrets = {};
|
|
24
|
+
const required = manifest.requires_secrets || [];
|
|
25
|
+
for (const key of required) {
|
|
26
|
+
const current = existing[key];
|
|
27
|
+
const value = await (0, prompts_1.input)({
|
|
28
|
+
message: `${key}${current ? ' (press enter to keep current)' : ''}:`,
|
|
29
|
+
default: current || '',
|
|
30
|
+
});
|
|
31
|
+
if (value) {
|
|
32
|
+
secrets[key] = value;
|
|
33
|
+
}
|
|
34
|
+
else if (current) {
|
|
35
|
+
secrets[key] = current;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
(0, secrets_js_1.saveSecrets)(name, secrets);
|
|
39
|
+
console.log('\nSecrets saved');
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=secrets.js.map
|
|
@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O,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,EAAE,GAAG;YACpE,OAAO,EAAE,OAAO,IAAI,EAAE;SACvB,CAAC,CAAC;QACH,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACvB,CAAC;aAAM,IAAI,OAAO,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;QACzB,CAAC;IACH,CAAC;IAED,IAAA,wBAAW,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAMA,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CA0ClD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupCommand = setupCommand;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
const os_1 = require("os");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const config_js_1 = require("../core/config.js");
|
|
9
|
+
async function setupCommand() {
|
|
10
|
+
console.log('Setting up claude-bundle...\n');
|
|
11
|
+
// Find real claude binary
|
|
12
|
+
let realClaudePath = '';
|
|
13
|
+
try {
|
|
14
|
+
realClaudePath = (0, child_process_1.execSync)('which claude', { encoding: 'utf-8' }).trim();
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
console.error('Could not find "claude" in PATH');
|
|
18
|
+
console.error('Please ensure Claude Code is installed');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
// Store in config
|
|
22
|
+
const config = (0, config_js_1.loadConfig)();
|
|
23
|
+
config.realClaudePath = realClaudePath;
|
|
24
|
+
(0, config_js_1.saveConfig)(config);
|
|
25
|
+
console.log(`Found claude at: ${realClaudePath}`);
|
|
26
|
+
console.log('\nTo use claude-bundle as your default claude command:');
|
|
27
|
+
console.log(' Add this to your shell profile (.bashrc, .zshrc, etc.):');
|
|
28
|
+
console.log(` alias claude="claude-bundle"\n`);
|
|
29
|
+
// Optionally offer to add alias
|
|
30
|
+
const { input } = await import('@inquirer/prompts');
|
|
31
|
+
const shell = process.env.SHELL?.split('/').pop() || 'bash';
|
|
32
|
+
const rcFile = shell === 'zsh' ? '.zshrc' : '.bashrc';
|
|
33
|
+
const rcPath = (0, path_1.join)((0, os_1.homedir)(), rcFile);
|
|
34
|
+
const shouldAdd = await input({
|
|
35
|
+
message: `Add alias to ~/${rcFile}? (yes/no)`,
|
|
36
|
+
default: 'no',
|
|
37
|
+
});
|
|
38
|
+
if (shouldAdd.toLowerCase() === 'yes') {
|
|
39
|
+
const aliasLine = `alias claude="claude-bundle"\n`;
|
|
40
|
+
(0, fs_1.appendFileSync)(rcPath, aliasLine);
|
|
41
|
+
console.log(`Added alias to ~/${rcFile}`);
|
|
42
|
+
console.log('Run: source ~/' + rcFile);
|
|
43
|
+
}
|
|
44
|
+
console.log('\nSetup complete!');
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":";;AAMA,oCA0CC;AAhDD,iDAAyC;AACzC,2BAA8D;AAC9D,2BAA6B;AAC7B,+BAA4B;AAC5B,iDAA2D;AAEpD,KAAK,UAAU,YAAY;IAChC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAE7C,0BAA0B;IAC1B,IAAI,cAAc,GAAG,EAAE,CAAC;IACxB,IAAI,CAAC;QACH,cAAc,GAAG,IAAA,wBAAQ,EAAC,cAAc,EAAE,E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;QACnD,IAAA,mBAAc,EAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,oBAAoB,MAAM,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAGA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBjE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateCommand = updateCommand;
|
|
4
|
+
const registry_js_1 = require("../core/registry.js");
|
|
5
|
+
const git_js_1 = require("../utils/git.js");
|
|
6
|
+
async function updateCommand(args) {
|
|
7
|
+
const [name] = args;
|
|
8
|
+
if (name) {
|
|
9
|
+
// Update specific bundle
|
|
10
|
+
const bundles = (0, registry_js_1.listBundles)();
|
|
11
|
+
const bundle = bundles.find((b) => b.name === name);
|
|
12
|
+
if (!bundle) {
|
|
13
|
+
console.error(`Bundle "${name}" not found`);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
console.log(`Updating ${name}...`);
|
|
17
|
+
await (0, git_js_1.pullRepo)(bundle.path);
|
|
18
|
+
console.log('Updated successfully');
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
// Update all bundles
|
|
22
|
+
const bundles = (0, registry_js_1.listBundles)();
|
|
23
|
+
for (const bundle of bundles) {
|
|
24
|
+
console.log(`Updating ${bundle.name}...`);
|
|
25
|
+
await (0, git_js_1.pullRepo)(bundle.path);
|
|
26
|
+
}
|
|
27
|
+
console.log('All bundles updated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
+
{"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../src/commands/use.ts"],"names":[],"mappings":"AAMA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB9D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCommand = useCommand;
|
|
4
|
+
const registry_js_1 = require("../core/registry.js");
|
|
5
|
+
const manifest_js_1 = require("../core/manifest.js");
|
|
6
|
+
const resolver_js_1 = require("../core/resolver.js");
|
|
7
|
+
const secrets_js_1 = require("../core/secrets.js");
|
|
8
|
+
const launcher_js_1 = require("../core/launcher.js");
|
|
9
|
+
async function useCommand(args) {
|
|
10
|
+
const [name, ...userArgs] = args;
|
|
11
|
+
if (!name) {
|
|
12
|
+
console.error('Usage: claude-bundle use <name>');
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
const bundles = (0, registry_js_1.listBundles)();
|
|
16
|
+
const bundle = bundles.find((b) => b.name === name);
|
|
17
|
+
if (!bundle) {
|
|
18
|
+
console.error(`Bundle "${name}" not found`);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
const manifest = (0, manifest_js_1.loadManifest)(bundle.path);
|
|
22
|
+
const resolved = await (0, resolver_js_1.resolveBundle)(bundle.name, bundle.path, manifest);
|
|
23
|
+
if (manifest.requires_secrets && manifest.requires_secrets.length > 0) {
|
|
24
|
+
resolved.secrets = await (0, secrets_js_1.promptForSecrets)(bundle.name, manifest.requires_secrets);
|
|
25
|
+
}
|
|
26
|
+
await (0, launcher_js_1.launchBundle)(resolved, userArgs);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=use.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../src/commands/use.ts"],"names":[],"mappings":";;AAMA,gCAsBC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ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQtD,wBAAgB,eAAe,IAAI,IAAI,CAGtC;AAED,wBAAgB,UAAU,IAAI,YAAY,CAOzC;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIrD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ensureConfigDir = ensureConfigDir;
|
|
4
|
+
exports.loadConfig = loadConfig;
|
|
5
|
+
exports.saveConfig = saveConfig;
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const paths_js_1 = require("./paths.js");
|
|
9
|
+
const DEFAULT_CONFIG = {
|
|
10
|
+
version: '1',
|
|
11
|
+
realClaudePath: '',
|
|
12
|
+
bundles: {},
|
|
13
|
+
};
|
|
14
|
+
function ensureConfigDir() {
|
|
15
|
+
const configPath = (0, paths_js_1.getConfigPath)();
|
|
16
|
+
(0, fs_1.mkdirSync)((0, path_1.dirname)(configPath), { recursive: true });
|
|
17
|
+
}
|
|
18
|
+
function loadConfig() {
|
|
19
|
+
const configPath = (0, paths_js_1.getConfigPath)();
|
|
20
|
+
if (!(0, fs_1.existsSync)(configPath)) {
|
|
21
|
+
return { ...DEFAULT_CONFIG };
|
|
22
|
+
}
|
|
23
|
+
const content = (0, fs_1.readFileSync)(configPath, 'utf-8');
|
|
24
|
+
return { ...DEFAULT_CONFIG, ...JSON.parse(content) };
|
|
25
|
+
}
|
|
26
|
+
function saveConfig(config) {
|
|
27
|
+
ensureConfigDir();
|
|
28
|
+
const configPath = (0, paths_js_1.getConfigPath)();
|
|
29
|
+
(0, fs_1.writeFileSync)(configPath, JSON.stringify(config, null, 2) + '\n');
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":";;AAWA,0CAGC;AAED,gCAOC;AAED,gCAIC;AA7BD,2BAAwE;AACxE,+BAA+B;AAC/B,yCAA2C;AAG3C,MAAM,cAAc,GAAiB;IACnC,OAAO,EAAE,GAAG;IACZ,cAAc,EAAE,EAAE;IAClB,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,SAAgB,eAAe;IAC7B,MAAM,UAAU,GAAG,IAAA,wBAAa,GAAE,CAAC;IACnC,IAAA,cAAS,EAAC,IAAA,cAAO,EAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,SAAgB,UAAU;IACxB,MAAM,UAAU,GAAG,IAAA,wBAAa,GAAE,CAAC;IACnC,IAAI,CAAC,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAAC;QAC5B,OAAO,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,CAAC;IACD,MAAM,OAAO,GAAG,IAAA,iBAAY,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAClD,OAAO,EAAE,GAAG,cAAc,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;AACvD,CAAC;AAED,SAAgB,UAAU,CAAC,MAAoB;IAC7C,eAAe,EAAE,CAAC;IAClB,MAAM,UAAU,GAAG,IAAA,wBAAa,GAAE,CAAC;IACnC,IAAA,kBAAa,EAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AACpE,CAAC"}
|