@moltbankhq/openclaw 0.1.4 → 0.1.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.
- package/README.md +8 -0
- package/bin/moltbank.mjs +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,12 +8,20 @@ Standalone CLI and optional OpenClaw plugin for [MoltBank](https://moltbank.bot)
|
|
|
8
8
|
npm install -g @moltbankhq/openclaw
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
Plain `npm install @moltbankhq/openclaw` installs the package locally in the current directory, but it does **not** put `moltbank` on your interactive shell `PATH`.
|
|
12
|
+
|
|
11
13
|
You can also run it without a global install:
|
|
12
14
|
|
|
13
15
|
```bash
|
|
14
16
|
npx @moltbankhq/openclaw setup
|
|
15
17
|
```
|
|
16
18
|
|
|
19
|
+
Or from a local install:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm exec --package @moltbankhq/openclaw -- moltbank setup
|
|
23
|
+
```
|
|
24
|
+
|
|
17
25
|
OpenClaw plugin mode still exists in this pass for compatibility:
|
|
18
26
|
|
|
19
27
|
```bash
|
package/bin/moltbank.mjs
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { createRequire } from 'module';
|
|
3
4
|
import { spawnSync } from 'child_process';
|
|
4
5
|
import { dirname, resolve } from 'path';
|
|
5
6
|
import { fileURLToPath } from 'url';
|
|
6
7
|
|
|
7
8
|
const binDir = dirname(fileURLToPath(import.meta.url));
|
|
8
9
|
const cliPath = resolve(binDir, '../cli.ts');
|
|
9
|
-
const
|
|
10
|
+
const require = createRequire(import.meta.url);
|
|
11
|
+
const tsxImportPath = require.resolve('tsx/esm');
|
|
12
|
+
|
|
13
|
+
const result = spawnSync(process.execPath, ['--import', tsxImportPath, cliPath, ...process.argv.slice(2)], {
|
|
10
14
|
stdio: 'inherit',
|
|
11
15
|
env: process.env
|
|
12
16
|
});
|