@botwallet/agent-cli 0.1.0-beta.3 → 0.1.0-beta.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/package.json +6 -1
  2. package/scripts/install.js +29 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botwallet/agent-cli",
3
- "version": "0.1.0-beta.3",
3
+ "version": "0.1.0-beta.5",
4
4
  "description": "CLI for AI agents to manage their Botwallet accounts",
5
5
  "keywords": [
6
6
  "botwallet",
@@ -23,6 +23,11 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "author": "Botwallet <support@botwallet.co>",
26
+ "files": [
27
+ "bin/",
28
+ "scripts/",
29
+ "README.md"
30
+ ],
26
31
  "bin": {
27
32
  "botwallet": "./bin/botwallet"
28
33
  },
@@ -157,7 +157,35 @@ async function install() {
157
157
  fs.rmSync(tmpDir, { recursive: true });
158
158
 
159
159
  console.log('Botwallet CLI installed successfully!');
160
- console.log('Run "botwallet --help" to get started.');
160
+
161
+ try {
162
+ const npmPrefix = execSync('npm prefix -g', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
163
+ const isWindows = process.platform === 'win32';
164
+ const npmBinDir = isWindows ? npmPrefix : path.join(npmPrefix, 'bin');
165
+
166
+ const normalize = (p) => path.resolve(p).replace(/[\\/]+$/, '');
167
+ const caseSensitive = !isWindows;
168
+ const npmBinNorm = normalize(npmBinDir);
169
+
170
+ const pathDirs = (process.env.PATH || '').split(path.delimiter);
171
+ const inPath = pathDirs.some(d => {
172
+ const norm = normalize(d);
173
+ return caseSensitive ? norm === npmBinNorm : norm.toLowerCase() === npmBinNorm.toLowerCase();
174
+ });
175
+
176
+ if (!inPath) {
177
+ const fullCmd = isWindows ? path.join(npmBinDir, 'botwallet.cmd') : path.join(npmBinDir, 'botwallet');
178
+ console.log('');
179
+ console.log(`NOTE: npm global bin directory is not in your PATH.`);
180
+ console.log(`If "botwallet" is not recognized as a command, use the full path:`);
181
+ console.log(` ${fullCmd}`);
182
+ console.log(`To fix permanently, add to your PATH: ${npmBinDir}`);
183
+ } else {
184
+ console.log('Run "botwallet --help" to get started.');
185
+ }
186
+ } catch {
187
+ console.log('Run "botwallet --help" to get started.');
188
+ }
161
189
 
162
190
  } catch (error) {
163
191
  console.error('Installation failed:', error.message);