clawmarketbot 0.1.2 → 0.1.3
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 +58 -28
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# clawmarketbot
|
|
2
2
|
|
|
3
|
-
CLI for [ClawMarket](https://clawmarket.cc) — download and install OpenClaw agent configs directly from the marketplace
|
|
3
|
+
CLI for [ClawMarket](https://clawmarket.cc) — download and install OpenClaw agent configs directly from the marketplace.
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
7
7
|
- Node.js 18+
|
|
8
8
|
- OpenClaw installed and configured (`~/.openclaw/openclaw.json` must exist)
|
|
9
|
-
- `unzip`
|
|
9
|
+
- `unzip` available in your PATH (macOS and most Linux distros include it)
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -16,55 +16,85 @@ npm install -g clawmarketbot
|
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
### Install
|
|
19
|
+
### Install an agent from a download token
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
clawmarketbot config install
|
|
22
|
+
clawmarketbot config install <token>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Tokens are obtained from the ClawMarket download modal on the config detail page.
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
clawmarketbot config install-npm @clawmarket/my-bot@1.2.0
|
|
29
|
-
```
|
|
27
|
+
The command will:
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
1. Download the bot package from ClawMarket and verify its checksum
|
|
30
|
+
2. Locate the `source/bot-config.json` manifest inside the zip
|
|
31
|
+
3. Prompt you for an agent ID (a unique name for this instance)
|
|
32
|
+
4. Resolve source → target install paths using the manifest
|
|
33
|
+
5. Stage workspace and agent state into a temp directory
|
|
34
|
+
6. Patch `openclaw.json` with the new agent entry (heartbeat, identity, tools.web)
|
|
35
|
+
7. Prompt you to install any packaged cron jobs
|
|
36
|
+
8. Atomically commit everything — workspace, agent state, memory DB, cron jobs, and config update — with full rollback on failure
|
|
37
|
+
9. Prompt for any required API keys and save them to `openclaw.json` / `.env`
|
|
38
|
+
10. Run an optional `installer.sh` post-hook if bundled in the package
|
|
39
|
+
11. Validate required workspace files and directories
|
|
40
|
+
12. Print a summary
|
|
41
|
+
|
|
42
|
+
### Download a config artifact to disk (without installing)
|
|
32
43
|
|
|
33
44
|
```bash
|
|
34
|
-
clawmarketbot config
|
|
45
|
+
clawmarketbot config download <token>
|
|
35
46
|
```
|
|
36
47
|
|
|
37
|
-
|
|
48
|
+
Saves the raw zip file to the current directory.
|
|
38
49
|
|
|
39
|
-
###
|
|
50
|
+
### Authentication
|
|
40
51
|
|
|
41
52
|
```bash
|
|
42
|
-
clawmarketbot
|
|
53
|
+
clawmarketbot auth login # save a ClawMarket API key
|
|
54
|
+
clawmarketbot auth status # check current login status
|
|
55
|
+
clawmarketbot auth logout # clear saved credentials
|
|
43
56
|
```
|
|
44
57
|
|
|
45
|
-
|
|
58
|
+
You can also pass the API key via stdin (recommended for automation):
|
|
46
59
|
|
|
47
60
|
```bash
|
|
48
|
-
clawmarketbot auth login
|
|
49
|
-
clawmarketbot auth status # check current auth
|
|
50
|
-
clawmarketbot auth logout # clear credentials
|
|
61
|
+
echo "$MY_API_KEY" | clawmarketbot auth login --stdin
|
|
51
62
|
```
|
|
52
63
|
|
|
53
64
|
## Environment Variables
|
|
54
65
|
|
|
55
66
|
| Variable | Default | Purpose |
|
|
56
67
|
|---|---|---|
|
|
57
|
-
| `CLAWMARKET_API_URL` |
|
|
58
|
-
| `OPENCLAW_HOME` | `os.homedir()` |
|
|
59
|
-
| `OPENCLAW_STATE_DIR` | `~/.openclaw` | OpenClaw state directory |
|
|
60
|
-
| `OPENCLAW_CONFIG_PATH` | `~/.openclaw/openclaw.json` | OpenClaw config file |
|
|
68
|
+
| `CLAWMARKET_API_URL` | *(required)* | ClawMarket backend base URL — set this to your ClawMarket instance |
|
|
69
|
+
| `OPENCLAW_HOME` | `os.homedir()` | Override the home directory used for tilde expansion |
|
|
70
|
+
| `OPENCLAW_STATE_DIR` | `~/.openclaw` | Override the OpenClaw state directory |
|
|
71
|
+
| `OPENCLAW_CONFIG_PATH` | `~/.openclaw/openclaw.json` | Override the OpenClaw config file path |
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
Example:
|
|
63
74
|
|
|
64
|
-
|
|
75
|
+
```bash
|
|
76
|
+
export CLAWMARKET_API_URL=https://api.clawmarket.cc
|
|
77
|
+
clawmarketbot config install <token>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## What gets installed
|
|
81
|
+
|
|
82
|
+
When you run `config install`, the CLI installs:
|
|
83
|
+
|
|
84
|
+
| What | Where |
|
|
85
|
+
|---|---|
|
|
86
|
+
| Agent workspace | `~/.openclaw/workspace-<agent-id>/` |
|
|
87
|
+
| Agent state dir | `~/.openclaw/agents/<agent-id>/` |
|
|
88
|
+
| Memory database (SQLite) | `~/.openclaw/memory/<agent-id>.sqlite` *(if bundled)* |
|
|
89
|
+
| Cron jobs | `~/.openclaw/cron/jobs.json` *(merged, not overwritten)* |
|
|
90
|
+
| Agent registration | `~/.openclaw/openclaw.json` *(appended to agents.list)* |
|
|
91
|
+
| API keys | `~/.openclaw/openclaw.json` and/or `~/.openclaw/.env` |
|
|
65
92
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
93
|
+
All install paths are declared inside the package's `bot-config.json` manifest and may use `{agent_id}` template substitution.
|
|
94
|
+
|
|
95
|
+
## After installing
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
openclaw agents list # confirm the new agent appears
|
|
99
|
+
openclaw gateway restart # pick up the new config
|
|
100
|
+
```
|
package/dist/index.js
CHANGED
|
@@ -1199,7 +1199,7 @@ function registerConfigCommands(program2) {
|
|
|
1199
1199
|
|
|
1200
1200
|
// src/index.ts
|
|
1201
1201
|
var program = new Command();
|
|
1202
|
-
program.name("clawmarketbot").description("CLI tool for ClawMarket - discover, download, and install OpenClaw configs").version("0.1.
|
|
1202
|
+
program.name("clawmarketbot").description("CLI tool for ClawMarket - discover, download, and install OpenClaw configs").version("0.1.3");
|
|
1203
1203
|
registerAuthCommands(program);
|
|
1204
1204
|
registerConfigCommands(program);
|
|
1205
1205
|
program.parse();
|