@botwallet/agent-cli 0.1.0-beta.2 → 0.1.0-beta.4
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/botwallet +44 -0
- package/package.json +6 -1
package/bin/botwallet
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// =============================================================================
|
|
3
|
+
// Botwallet CLI npm bin wrapper
|
|
4
|
+
// =============================================================================
|
|
5
|
+
// This wrapper calls the actual Go binary.
|
|
6
|
+
// =============================================================================
|
|
7
|
+
|
|
8
|
+
const { spawn } = require('child_process');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
|
|
12
|
+
const isWindows = process.platform === 'win32';
|
|
13
|
+
const binaryName = isWindows ? 'botwallet.exe' : 'botwallet';
|
|
14
|
+
const binaryPath = path.join(__dirname, binaryName);
|
|
15
|
+
|
|
16
|
+
// Check if binary exists
|
|
17
|
+
if (!fs.existsSync(binaryPath)) {
|
|
18
|
+
console.error('Error: Botwallet CLI binary not found.');
|
|
19
|
+
console.error('Try reinstalling: npm install -g @botwallet/agent-cli');
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Spawn the binary with all arguments
|
|
24
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
25
|
+
stdio: 'inherit',
|
|
26
|
+
shell: false
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
child.on('error', (error) => {
|
|
30
|
+
console.error('Failed to run Botwallet CLI:', error.message);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
child.on('exit', (code) => {
|
|
35
|
+
process.exit(code || 0);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botwallet/agent-cli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.4",
|
|
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
|
},
|