clevotics-claude-bootstrap 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.
Files changed (2) hide show
  1. package/bin/cli.js +40 -12
  2. package/package.json +7 -2
package/bin/cli.js CHANGED
@@ -1,23 +1,51 @@
1
1
  #!/usr/bin/env node
2
2
  // Installs the project-bootstrap skill for Claude Code on macOS, Linux and Windows
3
- // npx clevotics-claude-bootstrap -> global, all projects (~/.claude/skills)
3
+ // npx clevotics-claude-bootstrap -> asks: this project or global
4
4
  // npx clevotics-claude-bootstrap project -> this repo only (./.claude/skills), commit it to share
5
+ // npx clevotics-claude-bootstrap global -> all projects (~/.claude/skills)
5
6
  const fs = require("fs");
6
7
  const os = require("os");
7
8
  const path = require("path");
9
+ const readline = require("readline");
8
10
 
9
- const scope = process.argv[2] || "global";
10
- if (scope !== "global" && scope !== "project") {
11
- console.error(`Unknown option "${scope}". Use "global" (default) or "project"`);
12
- process.exit(1);
11
+ function install(scope) {
12
+ const base = scope === "project" ? process.cwd() : os.homedir();
13
+ const dest = path.join(base, ".claude", "skills", "project-bootstrap");
14
+ const src = path.join(__dirname, "..", "project-bootstrap", "SKILL.md");
15
+
16
+ fs.mkdirSync(dest, { recursive: true });
17
+ fs.copyFileSync(src, path.join(dest, "SKILL.md"));
18
+
19
+ console.log(`\nInstalled project-bootstrap to ${dest}`);
20
+ console.log("Restart Claude Code, then run /project-bootstrap in a folder that has your Project Plan.md");
13
21
  }
14
22
 
15
- const base = scope === "project" ? process.cwd() : os.homedir();
16
- const dest = path.join(base, ".claude", "skills", "project-bootstrap");
17
- const src = path.join(__dirname, "..", "project-bootstrap", "SKILL.md");
23
+ function askScope() {
24
+ console.log("Where should the project-bootstrap skill be installed?");
25
+ console.log(` 1) This project only (${process.cwd()})`);
26
+ console.log(` 2) Global, all projects (${path.join(os.homedir(), ".claude")})`);
18
27
 
19
- fs.mkdirSync(dest, { recursive: true });
20
- fs.copyFileSync(src, path.join(dest, "SKILL.md"));
28
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
29
+ rl.question("Choose 1 or 2 [1]: ", (answer) => {
30
+ rl.close();
31
+ const choice = answer.trim() || "1";
32
+ if (choice !== "1" && choice !== "2") {
33
+ console.error(`Invalid choice "${choice}". Run again and enter 1 or 2`);
34
+ process.exit(1);
35
+ }
36
+ install(choice === "1" ? "project" : "global");
37
+ });
38
+ }
21
39
 
22
- console.log(`Installed project-bootstrap to ${dest}`);
23
- console.log("Restart Claude Code, then run /project-bootstrap in a folder that has your Project Plan.md");
40
+ const scope = process.argv[2];
41
+ if (scope === "project" || scope === "global") {
42
+ install(scope);
43
+ } else if (scope) {
44
+ console.error(`Unknown option "${scope}". Use "project" or "global", or no option to choose interactively`);
45
+ process.exit(1);
46
+ } else if (!process.stdin.isTTY) {
47
+ console.error('No terminal to ask in. Pass "project" or "global"');
48
+ process.exit(1);
49
+ } else {
50
+ askScope();
51
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clevotics-claude-bootstrap",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Claude Code skill that splits one Project Plan.md into PRD, ARCHITECTURE, DESIGN, a phased PLAN and a CLAUDE.md",
5
5
  "bin": {
6
6
  "clevotics-claude-bootstrap": "bin/cli.js"
@@ -9,7 +9,12 @@
9
9
  "bin",
10
10
  "project-bootstrap"
11
11
  ],
12
- "keywords": ["claude", "claude-code", "skill", "project-plan"],
12
+ "keywords": [
13
+ "claude",
14
+ "claude-code",
15
+ "skill",
16
+ "project-plan"
17
+ ],
13
18
  "author": "Clevotics",
14
19
  "license": "MIT",
15
20
  "engines": {