get-shit-done-cc 1.0.3 → 1.0.6

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/install.js +71 -17
  2. package/package.json +2 -2
package/bin/install.js CHANGED
@@ -3,10 +3,12 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const os = require('os');
6
+ const readline = require('readline');
6
7
 
7
8
  // Colors
8
9
  const cyan = '\x1b[36m';
9
10
  const green = '\x1b[32m';
11
+ const yellow = '\x1b[33m';
10
12
  const dim = '\x1b[2m';
11
13
  const reset = '\x1b[0m';
12
14
 
@@ -26,28 +28,80 @@ ${cyan} ██████╗ ███████╗██████╗
26
28
  development system for Claude Code by TÂCHES.
27
29
  `;
28
30
 
31
+ // Parse args
32
+ const args = process.argv.slice(2);
33
+ const hasGlobal = args.includes('--global') || args.includes('-g');
34
+ const hasLocal = args.includes('--local') || args.includes('-l');
35
+
29
36
  console.log(banner);
30
37
 
31
- // Paths
32
- const src = path.join(__dirname, '..');
33
- const claudeDir = path.join(os.homedir(), '.claude');
34
- const commandsDir = path.join(claudeDir, 'commands');
38
+ /**
39
+ * Install to the specified directory
40
+ */
41
+ function install(isGlobal) {
42
+ const src = path.join(__dirname, '..');
43
+ const claudeDir = isGlobal
44
+ ? path.join(os.homedir(), '.claude')
45
+ : path.join(process.cwd(), '.claude');
46
+
47
+ const locationLabel = isGlobal
48
+ ? claudeDir.replace(os.homedir(), '~')
49
+ : claudeDir.replace(process.cwd(), '.');
50
+
51
+ console.log(` Installing to ${cyan}${locationLabel}${reset}\n`);
35
52
 
36
- // Create directories
37
- fs.mkdirSync(commandsDir, { recursive: true });
53
+ // Create commands directory
54
+ const commandsDir = path.join(claudeDir, 'commands');
55
+ fs.mkdirSync(commandsDir, { recursive: true });
38
56
 
39
- // Copy commands/gsd
40
- const gsdSrc = path.join(src, 'commands', 'gsd');
41
- const gsdDest = path.join(commandsDir, 'gsd');
42
- fs.cpSync(gsdSrc, gsdDest, { recursive: true });
43
- console.log(` ${green}✓${reset} Installed commands/gsd`);
57
+ // Copy commands/gsd
58
+ const gsdSrc = path.join(src, 'commands', 'gsd');
59
+ const gsdDest = path.join(commandsDir, 'gsd');
60
+ fs.cpSync(gsdSrc, gsdDest, { recursive: true });
61
+ console.log(` ${green}✓${reset} Installed commands/gsd`);
44
62
 
45
- // Copy get-shit-done
46
- const skillSrc = path.join(src, 'get-shit-done');
47
- const skillDest = path.join(claudeDir, 'get-shit-done');
48
- fs.cpSync(skillSrc, skillDest, { recursive: true });
49
- console.log(` ${green}✓${reset} Installed get-shit-done`);
63
+ // Copy get-shit-done skill
64
+ const skillSrc = path.join(src, 'get-shit-done');
65
+ const skillDest = path.join(claudeDir, 'get-shit-done');
66
+ fs.cpSync(skillSrc, skillDest, { recursive: true });
67
+ console.log(` ${green}✓${reset} Installed get-shit-done`);
50
68
 
51
- console.log(`
69
+ console.log(`
52
70
  ${green}Done!${reset} Run ${cyan}/gsd:help${reset} to get started.
53
71
  `);
72
+ }
73
+
74
+ /**
75
+ * Prompt for install location
76
+ */
77
+ function promptLocation() {
78
+ const rl = readline.createInterface({
79
+ input: process.stdin,
80
+ output: process.stdout
81
+ });
82
+
83
+ console.log(` ${yellow}Where would you like to install?${reset}
84
+
85
+ ${cyan}1${reset}) Global ${dim}(~/.claude)${reset} - available in all projects
86
+ ${cyan}2${reset}) Local ${dim}(./.claude)${reset} - this project only
87
+ `);
88
+
89
+ rl.question(` Choice ${dim}[1]${reset}: `, (answer) => {
90
+ rl.close();
91
+ const choice = answer.trim() || '1';
92
+ const isGlobal = choice !== '2';
93
+ install(isGlobal);
94
+ });
95
+ }
96
+
97
+ // Main
98
+ if (hasGlobal && hasLocal) {
99
+ console.error(` ${yellow}Cannot specify both --global and --local${reset}`);
100
+ process.exit(1);
101
+ } else if (hasGlobal) {
102
+ install(true);
103
+ } else if (hasLocal) {
104
+ install(false);
105
+ } else {
106
+ promptLocation();
107
+ }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "get-shit-done-cc",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.",
5
5
  "bin": {
6
- "get-shit-done": "./bin/install.js"
6
+ "get-shit-done-cc": "bin/install.js"
7
7
  },
8
8
  "files": [
9
9
  "bin",