the-grid-cc 1.7.6 → 1.7.7

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/bin/install.js CHANGED
@@ -19,23 +19,27 @@ const readline = require('readline');
19
19
 
20
20
  // TRON Colors (for terminal output)
21
21
  const CYAN = '\x1b[36m';
22
+ const BRIGHT_CYAN = '\x1b[96m';
22
23
  const YELLOW = '\x1b[33m';
23
24
  const GREEN = '\x1b[32m';
24
25
  const RED = '\x1b[31m';
25
26
  const DIM = '\x1b[2m';
26
27
  const RESET = '\x1b[0m';
27
28
  const BOLD = '\x1b[1m';
28
-
29
- const BANNER = `
30
- ${CYAN}+============================================================+
31
- | |
32
- | M A S T E R C O N T R O L P R O G R A M |
33
- | |
34
- | "I fight for the Users." |
35
- | |
36
- +============================================================+${RESET}
29
+ const WHITE = '\x1b[97m';
30
+
31
+ // TRON-style ASCII art logo
32
+ const LOGO = `
33
+ ${BRIGHT_CYAN} ████████╗██╗ ██╗███████╗ ██████╗ ██████╗ ██╗██████╗
34
+ ╚══██╔══╝██║ ██║██╔════╝ ██╔════╝ ██╔══██╗██║██╔══██╗
35
+ ██║ ███████║█████╗ ██║ ███╗██████╔╝██║██║ ██║
36
+ ██║ ██╔══██║██╔══╝ ██║ ██║██╔══██╗██║██║ ██║
37
+ ██║ ██║ ██║███████╗ ╚██████╔╝██║ ██║██║██████╔╝
38
+ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═════╝${RESET}
37
39
  `;
38
40
 
41
+ const BANNER = LOGO;
42
+
39
43
  const REPO_URL = 'https://github.com/JamesWeatherhead/grid.git';
40
44
 
41
45
  // Parse command line args
@@ -64,24 +68,29 @@ function logError(msg) {
64
68
  console.log(`${RED}✗${RESET} ${msg}`);
65
69
  }
66
70
 
67
- function showHelp() {
68
- console.log(`
69
- ${BANNER}
70
-
71
- ${BOLD}Usage:${RESET}
72
- npx the-grid-cc Install to Claude Code
73
- npx the-grid-cc --uninstall Remove The Grid
74
-
75
- ${BOLD}Options:${RESET}
76
- -u, --uninstall Uninstall The Grid
77
- -y, --yes Skip confirmation prompts
78
- -h, --help Show this help
79
-
80
- ${BOLD}After Installation:${RESET}
81
- In Claude Code, type: /grid
71
+ function getVersion() {
72
+ try {
73
+ const pkgPath = path.join(__dirname, '..', 'package.json');
74
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
75
+ return pkg.version || '1.0.0';
76
+ } catch {
77
+ return '1.0.0';
78
+ }
79
+ }
82
80
 
83
- ${DIM}"I fight for the Users."${RESET}
84
- `);
81
+ function showHelp() {
82
+ console.log(LOGO);
83
+ console.log(`${WHITE}The Grid${RESET} ${DIM}v${getVersion()}${RESET}`);
84
+ console.log(`${DIM}Multi-agent orchestration for Claude Code${RESET}`);
85
+ console.log();
86
+ console.log(`${BOLD}Usage:${RESET}`);
87
+ console.log(` npx the-grid-cc Install to Claude Code`);
88
+ console.log(` npx the-grid-cc --uninstall Remove The Grid`);
89
+ console.log();
90
+ console.log(`${BOLD}After Installation:${RESET}`);
91
+ console.log(` In Claude Code, type: ${CYAN}/grid${RESET}`);
92
+ console.log();
93
+ console.log(`${DIM}"I fight for the Users."${RESET}`);
85
94
  }
86
95
 
87
96
  function checkGit() {
@@ -108,7 +117,11 @@ function copyDir(src, dest) {
108
117
  }
109
118
 
110
119
  async function install() {
111
- console.log(BANNER);
120
+ // Show logo and version
121
+ console.log(LOGO);
122
+ console.log(`${WHITE}The Grid${RESET} ${DIM}v${getVersion()}${RESET}`);
123
+ console.log(`${DIM}Multi-agent orchestration for Claude Code${RESET}`);
124
+ console.log();
112
125
 
113
126
  const home = process.env.HOME || process.env.USERPROFILE;
114
127
  const claudeDir = path.join(home, '.claude');
@@ -116,22 +129,17 @@ async function install() {
116
129
  const agentsDir = path.join(claudeDir, 'agents');
117
130
  const tempDir = path.join(home, '.grid-temp');
118
131
 
119
- // Check prerequisites
120
- logStep('1/4', 'Checking prerequisites...');
121
-
132
+ // Check prerequisites (silent unless error)
122
133
  if (!checkGit()) {
123
134
  logError('Git is required but not found.');
124
135
  process.exit(1);
125
136
  }
126
- logSuccess('Git found');
127
137
 
128
138
  // Ensure .claude directories exist
129
139
  fs.mkdirSync(commandsDir, { recursive: true });
130
140
  fs.mkdirSync(agentsDir, { recursive: true });
131
- logSuccess('Claude Code directories ready');
132
141
 
133
- // Clone to temp
134
- logStep('2/4', 'Downloading The Grid...');
142
+ // Clone to temp (silent)
135
143
  if (fs.existsSync(tempDir)) {
136
144
  fs.rmSync(tempDir, { recursive: true, force: true });
137
145
  }
@@ -141,14 +149,12 @@ async function install() {
141
149
  stdio: 'pipe',
142
150
  encoding: 'utf8'
143
151
  });
144
- logSuccess('Download complete');
145
152
  } catch (error) {
146
- logError('Failed to clone repository');
153
+ logError('Failed to download. Check your internet connection.');
147
154
  process.exit(1);
148
155
  }
149
156
 
150
157
  // Copy commands and agents
151
- logStep('3/4', 'Installing to Claude Code...');
152
158
  try {
153
159
  const srcCommands = path.join(tempDir, 'commands');
154
160
  const srcAgents = path.join(tempDir, 'agents');
@@ -165,8 +171,8 @@ async function install() {
165
171
  fs.copyFileSync(src, dest);
166
172
  }
167
173
  }
168
- logSuccess('Commands installed');
169
174
  }
175
+ logSuccess('Installed commands/grid');
170
176
 
171
177
  // Copy agents
172
178
  if (fs.existsSync(srcAgents)) {
@@ -176,41 +182,27 @@ async function install() {
176
182
  const dest = path.join(agentsDir, entry.name);
177
183
  fs.copyFileSync(src, dest);
178
184
  }
179
- logSuccess('Agents installed');
180
185
  }
186
+ logSuccess('Installed agents');
181
187
  } catch (error) {
182
- logError('Failed to copy files');
188
+ logError('Failed to install files');
183
189
  process.exit(1);
184
190
  }
185
191
 
186
- // Cleanup
187
- logStep('4/4', 'Cleaning up...');
192
+ // Cleanup (silent)
188
193
  fs.rmSync(tempDir, { recursive: true, force: true });
189
- logSuccess('Done');
190
194
 
191
195
  // Success message
192
- console.log(`
193
- ${GREEN}+============================================================+
194
- | |
195
- | THE GRID INSTALLED SUCCESSFULLY |
196
- | |
197
- +============================================================+${RESET}
198
-
199
- ${BOLD}Enter The Grid:${RESET}
200
- In Claude Code, type: ${CYAN}/grid${RESET}
201
-
202
- ${BOLD}Files installed:${RESET}
203
- ${DIM}~/.claude/commands/grid.md${RESET}
204
- ${DIM}~/.claude/commands/grid/${RESET}
205
- ${DIM}~/.claude/agents/grid-*.md${RESET}
206
-
207
- ${DIM}"End of Line."${RESET}
208
- `);
196
+ console.log();
197
+ console.log(`${GREEN}Done!${RESET} Run ${WHITE}/grid${RESET} to get started.`);
198
+ console.log();
209
199
  }
210
200
 
211
201
  async function uninstall() {
212
- console.log(BANNER);
213
- log('Uninstalling The Grid...', YELLOW);
202
+ console.log(LOGO);
203
+ console.log(`${WHITE}The Grid${RESET} ${DIM}v${getVersion()}${RESET}`);
204
+ console.log(`${YELLOW}Uninstalling...${RESET}`);
205
+ console.log();
214
206
 
215
207
  const home = process.env.HOME || process.env.USERPROFILE;
216
208
  const commandsDir = path.join(home, '.claude', 'commands');
@@ -224,35 +216,40 @@ async function uninstall() {
224
216
 
225
217
  if (fs.existsSync(gridMd)) {
226
218
  fs.rmSync(gridMd);
227
- logSuccess('Removed grid.md');
228
219
  removed = true;
229
220
  }
230
221
 
231
222
  if (fs.existsSync(gridDir)) {
232
223
  fs.rmSync(gridDir, { recursive: true, force: true });
233
- logSuccess('Removed grid/ commands');
234
224
  removed = true;
235
225
  }
236
226
 
227
+ if (removed) {
228
+ logSuccess('Removed commands/grid');
229
+ }
230
+
237
231
  // Remove grid agents
238
- const agentFiles = ['grid-planner.md', 'grid-executor.md', 'grid-recognizer.md', 'grid-guard.md'];
239
- for (const file of agentFiles) {
240
- const agentPath = path.join(agentsDir, file);
241
- if (fs.existsSync(agentPath)) {
242
- fs.rmSync(agentPath);
243
- logSuccess(`Removed ${file}`);
244
- removed = true;
232
+ let agentsRemoved = false;
233
+ if (fs.existsSync(agentsDir)) {
234
+ const entries = fs.readdirSync(agentsDir);
235
+ for (const file of entries) {
236
+ if (file.startsWith('grid-')) {
237
+ fs.rmSync(path.join(agentsDir, file));
238
+ agentsRemoved = true;
239
+ }
245
240
  }
246
241
  }
247
242
 
248
- if (!removed) {
249
- log('No Grid installations found.', DIM);
250
- } else {
251
- console.log(`
252
- ${GREEN}The Grid has been derezzed.${RESET}
243
+ if (agentsRemoved) {
244
+ logSuccess('Removed agents');
245
+ }
253
246
 
254
- ${DIM}"End of Line."${RESET}
255
- `);
247
+ if (!removed && !agentsRemoved) {
248
+ console.log(`${DIM}No Grid installation found.${RESET}`);
249
+ } else {
250
+ console.log();
251
+ console.log(`${GREEN}Derezzed.${RESET} ${DIM}End of Line.${RESET}`);
252
+ console.log();
256
253
  }
257
254
  }
258
255
 
@@ -1 +1 @@
1
- 1.7.6
1
+ 1.7.7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "the-grid-cc",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "Agent orchestration for Claude Code. You talk to Master Control. Master Control handles the rest.",
5
5
  "main": "index.js",
6
6
  "bin": {