claudemesh-cli 1.2.0 → 1.3.0
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/dist/entrypoints/cli.js +1217 -126
- package/dist/entrypoints/cli.js.map +7 -6
- package/dist/entrypoints/mcp.js +2 -2
- package/dist/entrypoints/mcp.js.map +1 -1
- package/package.json +2 -1
- package/skills/claudemesh/SKILL.md +351 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claudemesh
|
|
3
|
+
description: Use when the user asks to send a message to a peer Claude session, list mesh peers, share state across meshes, schedule cross-session reminders, or otherwise interact with claudemesh — a peer mesh runtime for Claude Code sessions. Provides the canonical reference for every `claudemesh` CLI verb, its flags, JSON output shape, and common patterns.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# claudemesh skill
|
|
7
|
+
|
|
8
|
+
`claudemesh` is the peer mesh runtime for Claude Code sessions. Each session in a mesh has a name, identity (ed25519 keypair), and shared resources: peers, messages, state, memory, files, vectors, scheduled jobs, skills.
|
|
9
|
+
|
|
10
|
+
**You invoke claudemesh exclusively through the `claudemesh` CLI via Bash.** There are no MCP tools to call — `tools/list` returns empty for the claudemesh MCP server. The MCP server exists only to deliver inbound peer messages as `<channel source="claudemesh">` interrupts mid-turn. Everything else is CLI.
|
|
11
|
+
|
|
12
|
+
## When you receive a `<channel source="claudemesh">` message
|
|
13
|
+
|
|
14
|
+
Respond IMMEDIATELY. Pause your current task, reply via `claudemesh send`, then resume. Read `from_name`, `mesh_slug`, and `priority` from the channel attributes. Reply by setting `<to>` to the sender's `from_name`. Do not ignore low-priority messages — acknowledge them briefly even if you defer action. If the channel meta contains `subtype: reminder`, this is a scheduled reminder you set yourself — act on it.
|
|
15
|
+
|
|
16
|
+
## Performance model (warm vs cold path)
|
|
17
|
+
|
|
18
|
+
If the parent Claude session was launched via `claudemesh launch`, an MCP push-pipe is running and holds the per-mesh WS connection. CLI invocations dial `~/.claudemesh/sockets/<mesh-slug>.sock` and reuse that warm connection (~200ms total round-trip including Node.js startup). If no push-pipe is running (cron, scripts, hooks fired outside a session), the CLI opens its own WS, which takes ~500-700ms cold. **You don't manage this** — every verb auto-detects and falls through.
|
|
19
|
+
|
|
20
|
+
## Universal flags
|
|
21
|
+
|
|
22
|
+
| Flag | Behavior |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `--mesh <slug>` | Target a specific mesh. Required when the user has multiple meshes joined. Default: first/only joined mesh, or interactive picker. |
|
|
25
|
+
| `--json` | Emit JSON instead of human-readable text. Use this when you need to parse the output. |
|
|
26
|
+
| `--json field1,field2` | Project specific fields (modeled on `gh --json`). Friendly aliases like `name` → `displayName` are resolved automatically. |
|
|
27
|
+
|
|
28
|
+
## Resources and verbs
|
|
29
|
+
|
|
30
|
+
### `peer` — read connected peers
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
claudemesh peers # human-readable
|
|
34
|
+
claudemesh peers --json # full record
|
|
35
|
+
claudemesh peers --json name,status # field projection
|
|
36
|
+
claudemesh peers --mesh openclaw --json # specific mesh
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
JSON shape (per peer):
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"displayName": "Mou",
|
|
43
|
+
"pubkey": "abc123...",
|
|
44
|
+
"status": "idle | working | dnd",
|
|
45
|
+
"summary": "string or null",
|
|
46
|
+
"groups": [{ "name": "reviewers", "role": "lead" }],
|
|
47
|
+
"peerType": "claude | telegram | ...",
|
|
48
|
+
"channel": "claude-code | api | ...",
|
|
49
|
+
"model": "claude-opus-4-7 | ...",
|
|
50
|
+
"cwd": "/path/to/working/dir or null",
|
|
51
|
+
"stats": { "messagesIn": 0, "messagesOut": 0, "toolCalls": 0, "errors": 0, "uptime": 1200 }
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### `message` — send and inspect messages
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# send
|
|
59
|
+
claudemesh send <peer-name|@group|*|pubkey> "message text"
|
|
60
|
+
claudemesh send Mou "hi" # by display name
|
|
61
|
+
claudemesh send "@reviewers" "ready for review" # to a group
|
|
62
|
+
claudemesh send "*" "broadcast to all" # to everyone
|
|
63
|
+
claudemesh send <peer> "msg" --priority now # bypass busy gates
|
|
64
|
+
claudemesh send <peer> "msg" --priority next # default — waits for idle
|
|
65
|
+
claudemesh send <peer> "msg" --priority low # pull-only
|
|
66
|
+
|
|
67
|
+
# inbox (drain pending)
|
|
68
|
+
claudemesh inbox # human-readable
|
|
69
|
+
claudemesh inbox --json # JSON
|
|
70
|
+
|
|
71
|
+
# delivery status of a message you sent
|
|
72
|
+
claudemesh msg-status <message-id>
|
|
73
|
+
claudemesh msg-status <message-id> --json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`send` JSON output: `{"ok": true, "messageId": "...", "target": "..."}`. Errors: `{"ok": false, "error": "..."}`.
|
|
77
|
+
|
|
78
|
+
### `state` — shared per-mesh key-value store
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
claudemesh state set <key> <value> # value can be JSON or string
|
|
82
|
+
claudemesh state get <key>
|
|
83
|
+
claudemesh state get <key> --json # includes updatedBy, updatedAt
|
|
84
|
+
claudemesh state list
|
|
85
|
+
claudemesh state list --json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
State is broadcast to all peers when changed. Use it for shared scratch space: status flags, current focus, agreed-on values.
|
|
89
|
+
|
|
90
|
+
### `memory` — recall-able knowledge per mesh
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
claudemesh remember "fact text" --tags tag1,tag2
|
|
94
|
+
claudemesh recall "search query"
|
|
95
|
+
claudemesh recall "search query" --json
|
|
96
|
+
claudemesh forget <memory-id>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Memories are searchable across the mesh. Use for shared documentation, decisions, lessons learned.
|
|
100
|
+
|
|
101
|
+
### `task` — typed work-units claim/complete
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
claudemesh task create "<title>" --assignee <peer> --priority <p> --tags a,b
|
|
105
|
+
claudemesh task list [--status open|claimed|done] [--assignee <peer>] [--json]
|
|
106
|
+
claudemesh task claim <task-id>
|
|
107
|
+
claudemesh task complete <task-id> [result text]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Tasks are exact-once: claiming is atomic at broker. Use for work coordination across peers.
|
|
111
|
+
|
|
112
|
+
### `schedule` — time-based delivery
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# one-shot or recurring reminder to yourself or a peer
|
|
116
|
+
claudemesh remind "your message" --in 30m # fires in 30 min
|
|
117
|
+
claudemesh remind "your message" --at 15:00 # next 15:00
|
|
118
|
+
claudemesh remind "ping me" --cron "0 9 * * *" # 9am daily
|
|
119
|
+
claudemesh remind "to peer" --to <peer-name> # send to someone else
|
|
120
|
+
claudemesh remind list --json
|
|
121
|
+
claudemesh remind cancel <reminder-id>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### `profile / status / visibility / groups` — peer presence
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
claudemesh status set idle | working | dnd # explicit status
|
|
128
|
+
claudemesh summary "what you're working on" # 1-2 sentence summary, broadcast
|
|
129
|
+
claudemesh visible true | false # toggle visibility
|
|
130
|
+
claudemesh group join @reviewers --role lead # join a group
|
|
131
|
+
claudemesh group leave @reviewers # leave a group
|
|
132
|
+
claudemesh profile # view/edit your profile
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### `vector` — embedding store + similarity search
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
claudemesh vector store <collection> "<text>" [--metadata '<json>']
|
|
139
|
+
claudemesh vector search <collection> "<query>" [--limit N] [--json]
|
|
140
|
+
claudemesh vector delete <collection> <id>
|
|
141
|
+
claudemesh vector collections # list collection names
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Search returns `[{id, text, score, metadata}]` ranked by cosine similarity.
|
|
145
|
+
|
|
146
|
+
### `graph` — Cypher queries against per-mesh graph
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
claudemesh graph query "MATCH (n) RETURN n LIMIT 10" # read
|
|
150
|
+
claudemesh graph execute "CREATE (n:Foo {x: 1})" # write
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Returns rows as `[{...}, ...]`. Queries that return no rows render "(no rows)".
|
|
154
|
+
|
|
155
|
+
### `context` — share work-context summaries between peers
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
claudemesh context share "summary text" --files a.ts,b.ts --findings "x,y" --tags spec,review
|
|
159
|
+
claudemesh context get "search query"
|
|
160
|
+
claudemesh context list
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Use to broadcast "what I just did and what I learned" so peers don't duplicate effort.
|
|
164
|
+
|
|
165
|
+
### `stream` — pub/sub event bus
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
claudemesh stream create <name>
|
|
169
|
+
claudemesh stream publish <name> '<json-or-text>'
|
|
170
|
+
claudemesh stream list
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
For event broadcasting (build-events, deploy-notifications, sensor data). Subscribers receive via push.
|
|
174
|
+
|
|
175
|
+
### `sql` — typed SQL against per-mesh tables
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
claudemesh sql query "SELECT * FROM <table>" # SELECT only
|
|
179
|
+
claudemesh sql execute "INSERT INTO ..." # writes
|
|
180
|
+
claudemesh sql schema # list tables + columns
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Returns `{columns, rows, rowCount}` for queries. Each mesh has its own SQL namespace.
|
|
184
|
+
|
|
185
|
+
### `skill` — discover + manage mesh-published Claude skills
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
claudemesh skill list [search-query]
|
|
189
|
+
claudemesh skill get <skill-name>
|
|
190
|
+
claudemesh skill remove <skill-name>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Published skills appear as `/claudemesh:<name>` slash commands across all connected sessions.
|
|
194
|
+
|
|
195
|
+
### `vault` — encrypted per-mesh secrets
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
claudemesh vault list # list keys (values stay encrypted on disk)
|
|
199
|
+
claudemesh vault delete <key>
|
|
200
|
+
# claudemesh vault set/get currently goes through MCP — needs E2E crypto round-trip
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### `watch` — URL change watchers
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
claudemesh watch list # list active watches
|
|
207
|
+
claudemesh watch remove <watch-id>
|
|
208
|
+
# Watch creation currently via MCP `mesh_watch` — config-heavy
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### `webhook` — outbound HTTP triggers
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
claudemesh webhook list # list configured webhooks
|
|
215
|
+
claudemesh webhook delete <name>
|
|
216
|
+
# Webhook creation currently via MCP `create_webhook`
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### `file` — shared mesh files
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
claudemesh file list [search-query] # list files
|
|
223
|
+
claudemesh file status <file-id> # who has accessed
|
|
224
|
+
claudemesh file delete <file-id>
|
|
225
|
+
# Upload + retrieval currently via MCP `share_file` / `get_file` (binary streams)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### `mesh-mcp` — call MCP servers other peers deployed to the mesh
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
claudemesh mesh-mcp list # which servers are deployed
|
|
232
|
+
claudemesh mesh-mcp call <server> <tool> '<json-args>'
|
|
233
|
+
claudemesh mesh-mcp catalog # full catalog with schemas
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Mesh-deployed MCPs let peer X call a tool that peer Y maintains, without local install.
|
|
237
|
+
|
|
238
|
+
### `clock` — mesh logical clock
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
claudemesh clock # current state
|
|
242
|
+
claudemesh clock set <speed> # speed: 0=paused, 1=realtime, 60=60× faster
|
|
243
|
+
claudemesh clock pause
|
|
244
|
+
claudemesh clock resume
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Used for simulations / tests that need a controlled time axis shared across peers.
|
|
248
|
+
|
|
249
|
+
### `mesh` — mesh-level introspection
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
claudemesh info --json # mesh overview: peers, groups, state keys, ...
|
|
253
|
+
claudemesh stats --json # per-peer activity counters
|
|
254
|
+
claudemesh clock --json # mesh logical clock (speed/tick/sim_time)
|
|
255
|
+
claudemesh ping --json # diagnostic — ws status, peer count, push buffer
|
|
256
|
+
claudemesh peers --mesh X # peers on a specific mesh
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### `mesh management` — admin ops
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
claudemesh list # all your meshes
|
|
263
|
+
claudemesh create <name> # create a new mesh
|
|
264
|
+
claudemesh share [email] # generate invite link
|
|
265
|
+
claudemesh disconnect <peer> # soft disconnect (auto-reconnects)
|
|
266
|
+
claudemesh kick <peer> # kick (must rejoin manually)
|
|
267
|
+
claudemesh ban <peer> # ban (revoked, can't rejoin)
|
|
268
|
+
claudemesh unban <peer>
|
|
269
|
+
claudemesh bans # list banned members
|
|
270
|
+
claudemesh delete <slug> # delete a mesh
|
|
271
|
+
claudemesh rename <slug> <name>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### `verify` — safety numbers (Signal-style MITM detection)
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
claudemesh verify <peer> # show 6×5-digit fingerprint
|
|
278
|
+
claudemesh verify <peer> --json
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Compare digits with the peer out-of-band (call, in person — not chat). If they match, the channel is not being intercepted.
|
|
282
|
+
|
|
283
|
+
### `auth` — sign-in
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
claudemesh login # browser or paste-token
|
|
287
|
+
claudemesh whoami # current identity
|
|
288
|
+
claudemesh logout
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
## Common workflows
|
|
292
|
+
|
|
293
|
+
### "Send a message to peer X with a confirmation"
|
|
294
|
+
```bash
|
|
295
|
+
result=$(claudemesh send "X" "ping" --json)
|
|
296
|
+
echo "$result" | jq -r '.messageId'
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### "List peers who are currently working"
|
|
300
|
+
```bash
|
|
301
|
+
claudemesh peers --json name,status | jq '[.[] | select(.status == "working")]'
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### "Send to all reviewers"
|
|
305
|
+
```bash
|
|
306
|
+
claudemesh send "@reviewers" "PR ready: <url>"
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### "Set my summary so peers know what I'm doing"
|
|
310
|
+
```bash
|
|
311
|
+
claudemesh summary "drafting the auth migration spec"
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### "Schedule a daily ping at 9am"
|
|
315
|
+
```bash
|
|
316
|
+
claudemesh remind "morning standup time" --cron "0 9 * * *"
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### "Check who I'm verified with"
|
|
320
|
+
```bash
|
|
321
|
+
claudemesh verify <peer-name>
|
|
322
|
+
# Compare the 6×5-digit number with peer over voice or in person.
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
## Gotchas
|
|
326
|
+
|
|
327
|
+
- **`<peer-name>` resolution is case-insensitive but exact-match only.** Don't fuzzy-match. If a peer is named "Mou-2", use that exact string. Use `claudemesh peers --json name` to confirm.
|
|
328
|
+
- **`@group` requires the leading `@`.** Without it, claudemesh treats the string as a peer name lookup.
|
|
329
|
+
- **`*` means broadcast.** Use carefully — it goes to every peer on the mesh.
|
|
330
|
+
- **`--priority now` bypasses busy gates** (peers in DND still receive). Use only for genuine interruptions.
|
|
331
|
+
- **`claudemesh launch` writes a per-session config to a tmpdir.** Don't edit `~/.claudemesh/config.json` while a session is running — changes won't take effect until the next launch.
|
|
332
|
+
- **The `claudemesh mcp` server registers ZERO tools.** Never search ToolSearch for `mcp__claudemesh__*` — there are none. All operations go through Bash + CLI.
|
|
333
|
+
- **Soft-deprecated MCP tools (1.1.x).** If you previously called `mcp__claudemesh__send_message`, use `claudemesh send` via Bash instead. The deprecated tools still work in 1.x but print a stderr warning. They're removed in 2.0.
|
|
334
|
+
- **Field aliases in `--json`.** `name` resolves to `displayName`. Other aliases may be added in future versions; check `--json` output to confirm field names.
|
|
335
|
+
- **`claudemesh send` to a name that's not online** errors with the list of online peers. Use `claudemesh peers --json` first if uncertain.
|
|
336
|
+
- **The `--mesh <slug>` flag is required when the user has multiple meshes joined.** Without it, the CLI either picks the first mesh deterministically or shows an interactive picker (depending on context).
|
|
337
|
+
|
|
338
|
+
## Behavioral conventions
|
|
339
|
+
|
|
340
|
+
- **Confirm before destructive ops** (`kick`, `ban`, `delete`, `forget`). Show the user what you're about to do.
|
|
341
|
+
- **Preview peer-name matches before sending** when the name is ambiguous. `claudemesh peers --json name,pubkey | jq` is the right tool for disambiguation.
|
|
342
|
+
- **Don't broadcast (`*`) for trivial messages.** It pings every peer mid-task. Prefer DM or `@group`.
|
|
343
|
+
- **Don't poll `inbox`.** Messages are pushed via `<channel source="claudemesh">` automatically. Only call `inbox --json` if you suspect a buffered message is stuck.
|
|
344
|
+
- **Echo the messageId in JSON contexts** so the caller can `msg-status` it later.
|
|
345
|
+
|
|
346
|
+
## Related
|
|
347
|
+
|
|
348
|
+
- Spec: `.artifacts/specs/2026-05-02-architecture-north-star.md` (architecture rationale)
|
|
349
|
+
- Source: `~/Desktop/claudemesh/apps/cli/`
|
|
350
|
+
- Broker: `wss://ic.claudemesh.com/ws`
|
|
351
|
+
- Dashboard: `https://claudemesh.com/dashboard`
|