claude-code-pack 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,19 +2,36 @@
2
2
 
3
3
  Portable Claude Code setup — installs your plugins, skills, MCP servers, and settings on any machine with a single command.
4
4
 
5
- ## Quick Start
5
+ ## Installation
6
+
7
+ ### From npm
6
8
 
7
9
  ```bash
8
- npx claude-pack install
10
+ npx claude-code-pack install
9
11
  ```
10
12
 
11
13
  Or install globally:
12
14
 
13
15
  ```bash
14
- npm install -g claude-pack
16
+ npm install -g claude-code-pack
17
+ claude-pack install
18
+ ```
19
+
20
+ ### From GitHub
21
+
22
+ ```bash
23
+ git clone git@github.com:lvtan71/claude-pack.git
24
+ cd claude-pack
25
+ npm link
15
26
  claude-pack install
16
27
  ```
17
28
 
29
+ Or run directly without installing:
30
+
31
+ ```bash
32
+ npx github:lvtan71/claude-pack install
33
+ ```
34
+
18
35
  ## What It Does
19
36
 
20
37
  `claude-pack` reads `claude-pack.config.json` and sets up your Claude Code environment:
@@ -28,43 +45,51 @@ claude-pack install
28
45
 
29
46
  Everything is fetched fresh from GitHub, so you always get the latest version.
30
47
 
31
- ## Configuration
48
+ ## What's Included
32
49
 
33
- Edit `claude-pack.config.json` to customize your setup:
50
+ ### Plugins
34
51
 
35
- ```json
36
- {
37
- "plugins": [
38
- {
39
- "name": "claude-mem",
40
- "marketplace": "thedotmack",
41
- "repo": "thedotmack/claude-mem",
42
- "enabled": true
43
- }
44
- ],
45
- "marketplaces": [
46
- { "name": "thedotmack", "repo": "thedotmack/claude-mem" }
47
- ],
48
- "skills": [
49
- { "name": "my-skill", "source": "bundled" },
50
- { "name": "remote-skill", "source": "github", "repo": "user/repo" }
51
- ],
52
- "mcpServers": {
53
- "my-server": {
54
- "command": "npx",
55
- "args": ["-y", "@some/mcp-server"]
56
- }
57
- },
58
- "settings": {
59
- "model": "opus"
60
- }
61
- }
62
- ```
52
+ | Plugin | Source | Description |
53
+ |--------|--------|-------------|
54
+ | **claude-mem** | [thedotmack/claude-mem](https://github.com/thedotmack/claude-mem) | Persistent cross-session memory, smart code exploration (AST-based), phased implementation plans, and timeline reports |
55
+ | **understand-anything** | [Lum1104/Understand-Anything](https://github.com/Lum1104/Understand-Anything) | Codebase analysis, interactive knowledge graphs, architecture visualization, onboarding guides, and diff analysis |
63
56
 
64
- ### Skill Sources
57
+ ### Marketplaces
65
58
 
66
- - `"source": "bundled"` copies from the `skills/` directory in this package
67
- - `"source": "github", "repo": "user/repo"` — clones from GitHub
59
+ | Marketplace | Source | Description |
60
+ |-------------|--------|-------------|
61
+ | **thedotmack** | [thedotmack/claude-mem](https://github.com/thedotmack/claude-mem) | Plugin marketplace for claude-mem and related tools |
62
+ | **understand-anything** | [Lum1104/Understand-Anything](https://github.com/Lum1104/Understand-Anything) | Codebase understanding, onboarding, and architecture analysis tools |
63
+
64
+ ### Skills (Bundled)
65
+
66
+ | Skill | Description |
67
+ |-------|-------------|
68
+ | **cloud-devops** | Cloud infrastructure and DevOps workflows — AWS, Azure, GCP, Kubernetes, Terraform, CI/CD, monitoring |
69
+ | **fastapi** | FastAPI best practices, Pydantic models, dependency injection, streaming, and latest patterns |
70
+ | **senior-ml-engineer** | MLOps pipelines, model deployment, drift monitoring, RAG systems, LLM integration, cost optimization |
71
+ | **technical-writer** | Documentation, API references, guides, tutorials, and technical content creation |
72
+
73
+ ### MCP Servers
74
+
75
+ | Server | Type | Source | Description |
76
+ |--------|------|--------|-------------|
77
+ | **linear** | HTTP | [mcp.linear.app](https://mcp.linear.app/mcp) | Linear project management — issues, projects, comments, milestones |
78
+ | **context7** | HTTP | [mcp.context7.com](https://mcp.context7.com/mcp) | Up-to-date library documentation and code examples |
79
+ | **fetch** | stdio | `mcp-server-fetch` (uvx) | Fetch web content for processing |
80
+ | **filesystem** | stdio | `@modelcontextprotocol/server-filesystem` (npx) | File system access (defaults to `$HOME`, configurable at install) |
81
+ | **sequential-thinking** | stdio | `@modelcontextprotocol/server-sequential-thinking` (npx) | Step-by-step reasoning and problem decomposition |
82
+ | **time** | stdio | `mcp-server-time` (uvx) | Current time and timezone operations |
83
+
84
+ > `$HOME` in MCP server args is automatically resolved to the user's home directory at install time.
85
+ > The **filesystem** server prompts you during install to confirm or customize the path. Works on Linux/WSL, macOS, and Windows.
86
+
87
+ ### Settings
88
+
89
+ | Setting | Value |
90
+ |---------|-------|
91
+ | **Model** | `opus` |
92
+ | **Statusline** | Custom bash script with context window, 5h/7d rate limit bars, and color-coded usage indicators |
68
93
 
69
94
  ## Commands
70
95
 
@@ -81,29 +106,62 @@ claude-pack install --skip-settings # Skip settings merge
81
106
  claude-pack install --dry-run # Preview without changes
82
107
  ```
83
108
 
84
- ## Adding New Components
109
+ ## Contributing
85
110
 
86
- ### Add a plugin
111
+ ### Setup
87
112
 
88
- 1. Add to `claude-pack.config.json` under `plugins` and `marketplaces`
89
- 2. Run `claude-pack install`
113
+ ```bash
114
+ git clone git@github.com:lvtan71/claude-pack.git
115
+ cd claude-pack
116
+ npm link # makes `claude-pack` command available locally
117
+ ```
118
+
119
+ ### Adding a Plugin
90
120
 
91
- ### Add a skill from GitHub
121
+ 1. Edit `claude-pack.config.json` add entries to both `plugins` and `marketplaces`:
92
122
 
93
123
  ```json
124
+ // In "plugins" array:
94
125
  {
95
- "name": "my-skill",
96
- "source": "github",
97
- "repo": "username/my-skill-repo"
126
+ "name": "my-plugin",
127
+ "marketplace": "marketplace-name",
128
+ "repo": "github-user/repo-name",
129
+ "enabled": true
130
+ }
131
+
132
+ // In "marketplaces" array:
133
+ {
134
+ "name": "marketplace-name",
135
+ "repo": "github-user/repo-name"
98
136
  }
99
137
  ```
100
138
 
101
- ### Add a bundled skill
139
+ 2. Update the **Plugins** and **Marketplaces** tables in this README.
140
+
141
+ ### Adding a Skill
102
142
 
103
- 1. Create `skills/my-skill/SKILL.md`
104
- 2. Add to config: `{ "name": "my-skill", "source": "bundled" }`
143
+ **Option A — Bundled skill** (skill files live in this repo):
105
144
 
106
- ### Add an MCP server
145
+ 1. Create `skills/my-skill/SKILL.md` (and optional `references/` directory).
146
+ 2. Add to `claude-pack.config.json`:
147
+
148
+ ```json
149
+ { "name": "my-skill", "source": "bundled" }
150
+ ```
151
+
152
+ **Option B — GitHub-hosted skill** (cloned at install time):
153
+
154
+ 1. Add to `claude-pack.config.json`:
155
+
156
+ ```json
157
+ { "name": "my-skill", "source": "github", "repo": "github-user/my-skill-repo" }
158
+ ```
159
+
160
+ 2. Update the **Skills** table in this README.
161
+
162
+ ### Adding an MCP Server
163
+
164
+ 1. Add to the `mcpServers` object in `claude-pack.config.json`:
107
165
 
108
166
  ```json
109
167
  "mcpServers": {
@@ -114,7 +172,46 @@ claude-pack install --dry-run # Preview without changes
114
172
  }
115
173
  ```
116
174
 
175
+ 2. Update the **MCP Servers** section in this README.
176
+
177
+ ### Publishing a New Version
178
+
179
+ 1. Make your changes and commit.
180
+ 2. Bump the version:
181
+
182
+ ```bash
183
+ npm version patch # 1.0.0 → 1.0.1 (bug fixes, small updates)
184
+ npm version minor # 1.0.0 → 1.1.0 (new plugins/skills added)
185
+ npm version major # 1.0.0 → 2.0.0 (breaking config changes)
186
+ ```
187
+
188
+ 3. Push with tags:
189
+
190
+ ```bash
191
+ git push origin main --tags
192
+ ```
193
+
194
+ 4. Publish to npm:
195
+
196
+ ```bash
197
+ npm publish
198
+ ```
199
+
200
+ > `npm version` automatically creates a git commit and tag (e.g., `v1.1.0`).
201
+ > Make sure all changes are committed before running it.
202
+
203
+ ### Pull Request Guidelines
204
+
205
+ - One plugin/skill/MCP server per PR when possible.
206
+ - Update the README tables to reflect your additions.
207
+ - Test with `claude-pack install --dry-run` before submitting.
208
+ - Test a full install with `claude-pack install --force` on a clean environment if possible.
209
+
117
210
  ## Requirements
118
211
 
119
212
  - Node.js >= 18
120
213
  - git
214
+
215
+ ## License
216
+
217
+ MIT
@@ -5,6 +5,12 @@
5
5
  "marketplace": "thedotmack",
6
6
  "repo": "thedotmack/claude-mem",
7
7
  "enabled": true
8
+ },
9
+ {
10
+ "name": "understand-anything",
11
+ "marketplace": "understand-anything",
12
+ "repo": "Lum1104/Understand-Anything",
13
+ "enabled": true
8
14
  }
9
15
  ],
10
16
  "marketplaces": [
@@ -18,12 +24,60 @@
18
24
  }
19
25
  ],
20
26
  "skills": [
21
- { "name": "cloud-devops", "source": "bundled" },
22
- { "name": "fastapi", "source": "bundled" },
23
- { "name": "senior-ml-engineer", "source": "bundled" },
24
- { "name": "technical-writer", "source": "bundled" }
27
+ {
28
+ "name": "cloud-devops",
29
+ "source": "bundled"
30
+ },
31
+ {
32
+ "name": "fastapi",
33
+ "source": "bundled"
34
+ },
35
+ {
36
+ "name": "senior-ml-engineer",
37
+ "source": "bundled"
38
+ },
39
+ {
40
+ "name": "technical-writer",
41
+ "source": "bundled"
42
+ }
25
43
  ],
26
- "mcpServers": {},
44
+ "mcpServers": {
45
+ "linear": {
46
+ "type": "http",
47
+ "url": "https://mcp.linear.app/mcp"
48
+ },
49
+ "context7": {
50
+ "type": "http",
51
+ "url": "https://mcp.context7.com/mcp"
52
+ },
53
+ "fetch": {
54
+ "command": "uvx",
55
+ "args": [
56
+ "mcp-server-fetch"
57
+ ]
58
+ },
59
+ "filesystem": {
60
+ "command": "npx",
61
+ "args": [
62
+ "-y",
63
+ "@modelcontextprotocol/server-filesystem",
64
+ "$HOME"
65
+ ]
66
+ },
67
+ "sequential-thinking": {
68
+ "command": "npx",
69
+ "args": [
70
+ "-y",
71
+ "@modelcontextprotocol/server-sequential-thinking"
72
+ ]
73
+ },
74
+ "time": {
75
+ "command": "uvx",
76
+ "args": [
77
+ "mcp-server-time"
78
+ ]
79
+ }
80
+ },
27
81
  "settings": {
28
82
  "model": "opus",
29
83
  "statusLine": {
@@ -34,4 +88,4 @@
34
88
  "assets": {
35
89
  "statusline": "assets/statusline-command.sh"
36
90
  }
37
- }
91
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-pack",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Portable Claude Code setup — installs plugins, skills, MCP servers, and statusline on any machine",
5
5
  "type": "module",
6
6
  "bin": {
@@ -23,7 +23,7 @@
23
23
  "license": "MIT",
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "git+https://github.com/tanle/claude-pack.git"
26
+ "url": "git+https://github.com/lvtan71/claude-pack.git"
27
27
  },
28
28
  "engines": {
29
29
  "node": ">=18"
package/src/install.mjs CHANGED
@@ -1,8 +1,9 @@
1
1
  import { execSync } from 'node:child_process';
2
2
  import { existsSync, mkdirSync, readFileSync, writeFileSync, cpSync } from 'node:fs';
3
3
  import { join, dirname, resolve } from 'node:path';
4
- import { homedir } from 'node:os';
4
+ import { homedir, platform } from 'node:os';
5
5
  import { fileURLToPath } from 'node:url';
6
+ import { createInterface } from 'node:readline';
6
7
 
7
8
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
9
  const PACK_ROOT = resolve(__dirname, '..');
@@ -37,6 +38,37 @@ function writeJSON(path, data) {
37
38
  writeFileSync(path, JSON.stringify(data, null, 2) + '\n');
38
39
  }
39
40
 
41
+ function prompt(question) {
42
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
43
+ return new Promise((resolve) => {
44
+ rl.question(question, (answer) => {
45
+ rl.close();
46
+ resolve(answer.trim());
47
+ });
48
+ });
49
+ }
50
+
51
+ function getDefaultHome() {
52
+ return homedir();
53
+ }
54
+
55
+ function resolveHomeInConfig(obj) {
56
+ if (typeof obj === 'string') {
57
+ return obj.replace(/\$HOME/g, homedir());
58
+ }
59
+ if (Array.isArray(obj)) {
60
+ return obj.map(resolveHomeInConfig);
61
+ }
62
+ if (obj && typeof obj === 'object') {
63
+ const resolved = {};
64
+ for (const [k, v] of Object.entries(obj)) {
65
+ resolved[k] = resolveHomeInConfig(v);
66
+ }
67
+ return resolved;
68
+ }
69
+ return obj;
70
+ }
71
+
40
72
  function loadConfig() {
41
73
  const configPath = join(PACK_ROOT, 'claude-pack.config.json');
42
74
  return JSON.parse(readFileSync(configPath, 'utf8'));
@@ -59,7 +91,7 @@ function gitClone(repo, dest) {
59
91
  return 'cloned';
60
92
  }
61
93
 
62
- function getPluginVersion(marketplaceDir, pluginName) {
94
+ function getPluginVersion(marketplaceDir) {
63
95
  // Try to read version from plugin's package.json or manifest
64
96
  const candidates = [
65
97
  join(marketplaceDir, 'plugin', 'package.json'),
@@ -82,7 +114,7 @@ function getGitCommitSha(dir) {
82
114
  }
83
115
  }
84
116
 
85
- function findPluginInstallPath(marketplaceDir, pluginName) {
117
+ function findPluginInstallPath(marketplaceDir) {
86
118
  // Look for a plugin/ subdirectory or the root
87
119
  const pluginSubdir = join(marketplaceDir, 'plugin');
88
120
  if (existsSync(pluginSubdir)) return pluginSubdir;
@@ -288,7 +320,7 @@ function installSkills(config, flags) {
288
320
 
289
321
  // ─── Settings Merge ────────────────────────────────────────────────────
290
322
 
291
- function installSettings(config, flags) {
323
+ async function installSettings(config, flags) {
292
324
  console.log('\n⚙ Settings');
293
325
 
294
326
  const settings = readJSON(SETTINGS_PATH);
@@ -330,17 +362,52 @@ function installSettings(config, flags) {
330
362
 
331
363
  // Merge MCP servers
332
364
  if (config.mcpServers && Object.keys(config.mcpServers).length > 0) {
365
+ console.log('\n🔌 MCP Servers');
333
366
  if (!settings.mcpServers) settings.mcpServers = {};
367
+
368
+ // Resolve filesystem server path interactively
369
+ const home = getDefaultHome();
370
+ const os = platform();
371
+ const osLabel = os === 'win32' ? 'Windows' : os === 'darwin' ? 'macOS' : 'Linux/WSL';
372
+
334
373
  for (const [name, serverConfig] of Object.entries(config.mcpServers)) {
374
+ if (name === 'filesystem' && !flags.dryRun) {
375
+ console.log(`\n Detected OS: ${osLabel}`);
376
+ console.log(` Default filesystem path: ${home}`);
377
+ const answer = await prompt(` Use "${home}" as filesystem root? [Y/n/custom path] `);
378
+
379
+ if (answer === '' || answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes') {
380
+ const resolved = JSON.parse(JSON.stringify(serverConfig));
381
+ resolved.args = resolved.args.map((a) => a === '$HOME' ? home : a);
382
+ settings.mcpServers[name] = resolved;
383
+ log('✓', `MCP server "${name}" configured (${home})`);
384
+ } else if (answer.toLowerCase() === 'n' || answer.toLowerCase() === 'no') {
385
+ log('⊘', `MCP server "${name}" skipped — configure manually in ~/.claude/settings.json:`);
386
+ console.log(` "mcpServers": {`);
387
+ console.log(` "filesystem": {`);
388
+ console.log(` "command": "npx",`);
389
+ console.log(` "args": ["-y", "@modelcontextprotocol/server-filesystem", "/your/path"]`);
390
+ console.log(` }`);
391
+ console.log(` }`);
392
+ } else {
393
+ // User provided a custom path
394
+ const customPath = answer.replace(/^~/, home);
395
+ const resolved = JSON.parse(JSON.stringify(serverConfig));
396
+ resolved.args = resolved.args.map((a) => a === '$HOME' ? customPath : a);
397
+ settings.mcpServers[name] = resolved;
398
+ log('✓', `MCP server "${name}" configured (${customPath})`);
399
+ }
400
+ continue;
401
+ }
402
+
403
+ const resolved = resolveHomeInConfig(serverConfig);
335
404
  if (flags.dryRun) {
336
405
  log('○', `Would configure MCP server "${name}"`);
337
406
  } else {
338
- settings.mcpServers[name] = serverConfig;
407
+ settings.mcpServers[name] = resolved;
339
408
  log('✓', `MCP server "${name}" configured`);
340
409
  }
341
410
  }
342
- } else {
343
- log('●', 'No MCP servers to configure (they come from plugins)');
344
411
  }
345
412
 
346
413
  if (!flags.dryRun) {
@@ -379,7 +446,7 @@ export async function install(flags = {}) {
379
446
 
380
447
  if (!flags.skipPlugins) installPlugins(config, flags);
381
448
  if (!flags.skipSkills) installSkills(config, flags);
382
- if (!flags.skipSettings) installSettings(config, flags);
449
+ if (!flags.skipSettings) await installSettings(config, flags);
383
450
 
384
451
  console.log('\n────────────────────────────────────────────');
385
452
  if (flags.dryRun) {