@rivocode-cli/cli 3.0.3 → 3.0.5

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/rivo.cjs +48 -2
  2. package/package.json +6 -6
package/bin/rivo.cjs CHANGED
@@ -3,12 +3,17 @@
3
3
  const os = require('os');
4
4
  const { spawnSync } = require('child_process');
5
5
  const path = require('path');
6
+ const fs = require('fs');
6
7
 
7
8
  const platform = os.platform();
8
9
  const architecture = os.arch();
9
10
 
10
11
  const platformPackage = `@rivocode-cli/cli-${platform}-${architecture}`;
11
12
 
13
+ const platformNames = { darwin: 'macOS', linux: 'Linux', win32: 'Windows' };
14
+ const archNames = { x64: 'x86_64', arm64: 'ARM64' };
15
+ const platformEmoji = { darwin: '🍎', linux: '🐧', win32: '🪟' };
16
+
12
17
  let binaryPath;
13
18
  try {
14
19
  const packageJsonPath = require.resolve(`${platformPackage}/package.json`);
@@ -16,11 +21,52 @@ try {
16
21
  const binaryName = platform === 'win32' ? 'rivo.exe' : 'rivo';
17
22
  binaryPath = path.join(packageDir, 'bin', binaryName);
18
23
  } catch (error) {
19
- console.error(`Error: Unsupported platform or architecture: ${platform}-${architecture}`);
20
- console.error(`Please ensure the optional dependency ${platformPackage} was installed.`);
24
+ const osName = platformNames[platform] || platform;
25
+ const archName = archNames[architecture] || architecture;
26
+ const emoji = platformEmoji[platform] || '💻';
27
+
28
+ console.error('');
29
+ console.error(` ${emoji} Platform: ${osName} (${archName})`);
30
+ console.error(` ❌ No binary found for ${platform}-${architecture}`);
31
+ console.error(` 📦 Missing package: ${platformPackage}`);
32
+ console.error('');
33
+ console.error(' Your platform may not be supported.');
34
+ console.error(' Supported: macOS (x64/ARM64), Linux (x64/ARM64), Windows (x64)');
35
+ console.error('');
21
36
  process.exit(1);
22
37
  }
23
38
 
39
+ // Show welcome message on first run
40
+ const markerDir = path.join(os.homedir(), '.rivocode');
41
+ const markerFile = path.join(markerDir, '.first-run-done');
42
+
43
+ if (!fs.existsSync(markerFile)) {
44
+ const osName = platformNames[platform] || platform;
45
+ const archName = archNames[architecture] || architecture;
46
+ const emoji = platformEmoji[platform] || '💻';
47
+
48
+ const G = '\x1b[32m';
49
+ const C = '\x1b[36m';
50
+ const B = '\x1b[1m';
51
+ const D = '\x1b[2m';
52
+ const R = '\x1b[0m';
53
+
54
+ console.log('');
55
+ console.log(`${B}${G} ╔══════════════════════════════════════════╗${R}`);
56
+ console.log(`${B}${G} ║ RivoCode CLI installed! ║${R}`);
57
+ console.log(`${B}${G} ╚══════════════════════════════════════════╝${R}`);
58
+ console.log('');
59
+ console.log(` ${emoji} ${B}Platform:${R} ${osName} (${archName})`);
60
+ console.log(` 📦 ${B}Binary:${R} ${G}✔ ${platformPackage}${R}`);
61
+ console.log(` 📍 ${B}Node:${R} ${process.version}`);
62
+ console.log('');
63
+
64
+ try {
65
+ if (!fs.existsSync(markerDir)) fs.mkdirSync(markerDir, { recursive: true });
66
+ fs.writeFileSync(markerFile, new Date().toISOString());
67
+ } catch {}
68
+ }
69
+
24
70
  const args = process.argv.slice(2);
25
71
  const result = spawnSync(binaryPath, args, { stdio: 'inherit' });
26
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivocode-cli/cli",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "RivoCode — AI-powered terminal coding assistant",
5
5
  "author": "Sanket Padhyal <mrsanketpadhyal@gmail.com>",
6
6
  "license": "MIT",
@@ -15,11 +15,11 @@
15
15
  "LICENSE"
16
16
  ],
17
17
  "optionalDependencies": {
18
- "@rivocode-cli/cli-linux-x64": "3.0.3",
19
- "@rivocode-cli/cli-linux-arm64": "3.0.3",
20
- "@rivocode-cli/cli-darwin-x64": "3.0.3",
21
- "@rivocode-cli/cli-darwin-arm64": "3.0.3",
22
- "@rivocode-cli/cli-win32-x64": "3.0.3"
18
+ "@rivocode-cli/cli-linux-x64": "3.0.5",
19
+ "@rivocode-cli/cli-linux-arm64": "3.0.5",
20
+ "@rivocode-cli/cli-darwin-x64": "3.0.5",
21
+ "@rivocode-cli/cli-darwin-arm64": "3.0.5",
22
+ "@rivocode-cli/cli-win32-x64": "3.0.5"
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",