@botwallet/agent-cli 0.1.0-beta.4 → 0.1.0-beta.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/README.md +17 -0
- package/package.json +1 -1
- package/scripts/install.js +29 -1
package/README.md
CHANGED
|
@@ -63,6 +63,23 @@ Payments, withdrawals, and x402 API access use a two-step flow:
|
|
|
63
63
|
|
|
64
64
|
This ensures neither party can sign alone.
|
|
65
65
|
|
|
66
|
+
## Troubleshooting
|
|
67
|
+
|
|
68
|
+
**`botwallet: command not found` after install?**
|
|
69
|
+
|
|
70
|
+
The npm global bin directory may not be in your PATH. Find and run it directly:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Find the full path
|
|
74
|
+
npm prefix -g
|
|
75
|
+
# Then run using the full path (example for Windows):
|
|
76
|
+
C:\Users\<you>\AppData\Roaming\npm\botwallet.cmd version
|
|
77
|
+
# Or on macOS/Linux:
|
|
78
|
+
$(npm prefix -g)/bin/botwallet version
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
To fix permanently, add the npm global bin directory to your system PATH.
|
|
82
|
+
|
|
66
83
|
## Alternative Installation
|
|
67
84
|
|
|
68
85
|
### Direct Download
|
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -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
|
-
|
|
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);
|