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.
Files changed (3) hide show
  1. package/README.md +58 -28
  2. package/dist/index.js +1 -1
  3. 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 or from npm.
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` or `tar` available in your PATH
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 a bot from an npm package
19
+ ### Install an agent from a download token
20
20
 
21
21
  ```bash
22
- clawmarketbot config install-npm @clawmarket/my-bot
22
+ clawmarketbot config install <token>
23
23
  ```
24
24
 
25
- Optionally pin a version:
25
+ Tokens are obtained from the ClawMarket download modal on the config detail page.
26
26
 
27
- ```bash
28
- clawmarketbot config install-npm @clawmarket/my-bot@1.2.0
29
- ```
27
+ The command will:
30
28
 
31
- ### Install a bot from a one-time download token
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 install <token>
45
+ clawmarketbot config download <token>
35
46
  ```
36
47
 
37
- Tokens are obtained from the ClawMarket download modal.
48
+ Saves the raw zip file to the current directory.
38
49
 
39
- ### Download a config artifact to disk
50
+ ### Authentication
40
51
 
41
52
  ```bash
42
- clawmarketbot config download <token>
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
- ### Auth
58
+ You can also pass the API key via stdin (recommended for automation):
46
59
 
47
60
  ```bash
48
- clawmarketbot auth login # save an API key
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` | `https://api.clawmarket.cc` | ClawMarket backend URL |
58
- | `OPENCLAW_HOME` | `os.homedir()` | OpenClaw home directory |
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
- ## How npm-based install works
73
+ Example:
63
74
 
64
- When you run `clawmarketbot config install-npm @clawmarket/some-bot`:
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
- 1. Package metadata is fetched from the npm registry
67
- 2. The tarball is downloaded and its integrity verified
68
- 3. A `bot.zip` bundled inside the package is extracted
69
- 4. The bot's `installer.sh` is run, registering the agent in your OpenClaw config
70
- 5. All temp files are cleaned up automatically
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.0");
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmarketbot",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "description": "CLI tool for ClawMarket - discover, download, and install OpenClaw configs",
6
6
  "type": "module",