memvid-cli 2.0.138 → 2.0.140

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memvid-cli",
3
- "version": "2.0.138",
3
+ "version": "2.0.140",
4
4
  "description": "AI memory CLI - crash-safe, single-file storage with semantic search",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -32,10 +32,10 @@
32
32
  "postinstall": "node scripts/postinstall.js"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@memvid/cli-darwin-arm64": "2.0.138",
36
- "@memvid/cli-darwin-x64": "2.0.138",
37
- "@memvid/cli-linux-x64": "2.0.138",
38
- "@memvid/cli-win32-x64": "2.0.138"
35
+ "@memvid/cli-darwin-arm64": "2.0.140",
36
+ "@memvid/cli-darwin-x64": "2.0.140",
37
+ "@memvid/cli-linux-x64": "2.0.140",
38
+ "@memvid/cli-win32-x64": "2.0.140"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=14"
@@ -3,6 +3,7 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const os = require('os');
6
+ const { execSync } = require('child_process');
6
7
 
7
8
  const platform = os.platform();
8
9
  const arch = os.arch();
@@ -78,5 +79,47 @@ if (platform !== 'win32') {
78
79
  }
79
80
  }
80
81
 
82
+ console.log('');
81
83
  console.log('memvid-cli installed successfully!');
82
- console.log('Run: memvid --help');
84
+
85
+ // On Windows, check if npm global bin is in PATH and provide guidance
86
+ if (platform === 'win32') {
87
+ try {
88
+ // Get npm's global prefix
89
+ const npmPrefix = execSync('npm config get prefix', { encoding: 'utf8' }).trim();
90
+ const npmBinDir = npmPrefix; // On Windows, binaries are directly in prefix
91
+
92
+ // Check if it's in PATH
93
+ const pathDirs = (process.env.PATH || '').split(path.delimiter).map(p => p.toLowerCase());
94
+ const npmBinLower = npmBinDir.toLowerCase();
95
+ const isInPath = pathDirs.some(p => p === npmBinLower || p === path.join(npmBinLower, 'bin').toLowerCase());
96
+
97
+ if (!isInPath) {
98
+ console.log('');
99
+ console.log('NOTE: npm global bin directory is not in your PATH.');
100
+ console.log('');
101
+ console.log('To use "memvid" command directly, add this to your PATH:');
102
+ console.log(` ${npmBinDir}`);
103
+ console.log('');
104
+ console.log('Quick fix (run in PowerShell as Administrator):');
105
+ console.log(` [Environment]::SetEnvironmentVariable("Path", $env:Path + ";${npmBinDir}", "Machine")`);
106
+ console.log('');
107
+ console.log('Or for current user only (no admin needed):');
108
+ console.log(` [Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";${npmBinDir}", "User")`);
109
+ console.log('');
110
+ console.log('After adding to PATH, restart your terminal.');
111
+ console.log('');
112
+ console.log('Alternative: Use npx (works without PATH changes):');
113
+ console.log(' npx memvid-cli --help');
114
+ } else {
115
+ console.log('Run: memvid --help');
116
+ }
117
+ } catch (err) {
118
+ // If we can't determine PATH status, just show basic instructions
119
+ console.log('Run: memvid --help');
120
+ console.log('');
121
+ console.log('If "memvid" is not recognized, use: npx memvid-cli --help');
122
+ }
123
+ } else {
124
+ console.log('Run: memvid --help');
125
+ }