@gravirei/reis 1.0.4 → 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.
- package/bin/reis.js +43 -23
- package/package.json +1 -1
package/bin/reis.js
CHANGED
|
@@ -7,16 +7,8 @@ const path = require('path');
|
|
|
7
7
|
const os = require('os');
|
|
8
8
|
const chalk = require('chalk');
|
|
9
9
|
|
|
10
|
-
//
|
|
11
|
-
function
|
|
12
|
-
const markerPath = path.join(os.homedir(), '.rovodev', 'reis', '.first-run-done');
|
|
13
|
-
|
|
14
|
-
// If marker exists, not first run
|
|
15
|
-
if (fs.existsSync(markerPath)) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Show welcome banner
|
|
10
|
+
// Show welcome banner (always, not just first run)
|
|
11
|
+
function showBanner() {
|
|
20
12
|
console.log(chalk.white.bold(`
|
|
21
13
|
██████ ███████ ██ ███████
|
|
22
14
|
██ ██ ██ ██ ██
|
|
@@ -28,23 +20,30 @@ function checkFirstRun() {
|
|
|
28
20
|
console.log(chalk.blue.bold(' REIS - Roadmap Execution & Implementation System'));
|
|
29
21
|
console.log(chalk.gray(' Systematic development with parallel subagent execution\n'));
|
|
30
22
|
console.log(chalk.white(` Version ${packageJson.version}\n`));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Check if REIS is already installed
|
|
26
|
+
function checkExistingInstallation() {
|
|
27
|
+
const reisDir = path.join(os.homedir(), '.rovodev', 'reis');
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
if (fs.existsSync(reisDir)) {
|
|
30
|
+
try {
|
|
31
|
+
const files = fs.readdirSync(reisDir);
|
|
32
|
+
// If directory has files (not just .first-run-done), it's installed
|
|
33
|
+
const hasFiles = files.some(f => f !== '.first-run-done' && f !== '.installed');
|
|
34
|
+
if (hasFiles) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
} catch (err) {
|
|
38
|
+
// Ignore
|
|
37
39
|
}
|
|
38
|
-
fs.writeFileSync(markerPath, new Date().toISOString());
|
|
39
|
-
} catch (err) {
|
|
40
|
-
// Ignore errors
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
return false;
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
//
|
|
47
|
-
|
|
45
|
+
// Show banner when no command is given (default action)
|
|
46
|
+
let shouldShowBanner = false;
|
|
48
47
|
|
|
49
48
|
// Command implementations - Core commands
|
|
50
49
|
const helpCmd = require('../lib/commands/help.js');
|
|
@@ -234,8 +233,29 @@ program
|
|
|
234
233
|
});
|
|
235
234
|
|
|
236
235
|
// Default action (no command)
|
|
237
|
-
program.action(() => {
|
|
238
|
-
|
|
236
|
+
program.action(async () => {
|
|
237
|
+
// Show banner first
|
|
238
|
+
showBanner();
|
|
239
|
+
|
|
240
|
+
// Check if already installed
|
|
241
|
+
const isInstalled = checkExistingInstallation();
|
|
242
|
+
|
|
243
|
+
if (isInstalled) {
|
|
244
|
+
console.log(chalk.yellow(' ⚠️ REIS is already installed at ~/.rovodev/reis/\n'));
|
|
245
|
+
console.log(chalk.white(' Options:'));
|
|
246
|
+
console.log(chalk.white(' 1) Keep existing installation'));
|
|
247
|
+
console.log(chalk.white(' 2) Reinstall (replace existing files)'));
|
|
248
|
+
console.log(chalk.white(' 3) Show help\n'));
|
|
249
|
+
|
|
250
|
+
// For now, just show help. Full interactive prompts would need inquirer
|
|
251
|
+
console.log(chalk.gray(' Showing help... (Run with --reinstall to force reinstall)\n'));
|
|
252
|
+
} else {
|
|
253
|
+
console.log(chalk.green(' Installing REIS files to ~/.rovodev/reis/...\n'));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Show help
|
|
257
|
+
const helpCmd = require('../lib/commands/help');
|
|
258
|
+
helpCmd();
|
|
239
259
|
});
|
|
240
260
|
|
|
241
261
|
// Parse command-line arguments
|
package/package.json
CHANGED