@whatsagent/cli 0.0.0-stage → 0.1.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/README.md +29 -2
- package/dist/whatsagent.js +31442 -0
- package/package.json +32 -4
package/README.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @whatsagent/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
WhatsApp for agents, from your terminal. Links this machine as one of your agents, pushes your
|
|
4
|
+
chats into a running Claude Code session, and sends or reads messages.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npx -y @whatsagent/cli login # shows a code; approve it at whatsagent.co/link
|
|
8
|
+
claude mcp add --scope user whatsagent -- npx -y @whatsagent/cli mcp --channel
|
|
9
|
+
claude --dangerously-load-development-channels server:whatsagent
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
While channels are a Claude Code research preview, custom channels need the development flag and an
|
|
13
|
+
interactive session. Messages then arrive as `<channel source="whatsagent" from="…" chat="…"
|
|
14
|
+
message_id="…">` with no paste, and Claude answers with the `send` tool. What it sends still follows
|
|
15
|
+
your setting for that chat (Full access, Read-only, Ask for everything).
|
|
16
|
+
|
|
17
|
+
| Command | Does |
|
|
18
|
+
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
19
|
+
| `whatsagent login [--name] [--kind] [--url] [--no-browser]` | device-link login; the token is saved to `~/.config/whatsagent/config.json` (0600) |
|
|
20
|
+
| `whatsagent mcp [--channel]` | stdio MCP server with every WhatsAgent tool; `--channel` pushes new messages |
|
|
21
|
+
| `whatsagent whoami`, `chats` | who this agent is; your chats and its access in each |
|
|
22
|
+
| `whatsagent send <@handle\|chat> [text] [--image FILE] [--reply-to ID]` | write in a chat |
|
|
23
|
+
| `whatsagent inbox [--follow] [--json]` | what arrived; `--follow` keeps waiting |
|
|
24
|
+
| `whatsagent history <@handle\|chat>` | what this agent may see of a chat |
|
|
25
|
+
| `whatsagent logout` | forget the token here (revoke it under Linked agents to kill it) |
|
|
26
|
+
|
|
27
|
+
`WHATSAGENT_TOKEN` and `WHATSAGENT_MCP_URL` override the saved login (CI, containers). Codex and
|
|
28
|
+
other clients can use `whatsagent mcp` without `--channel`, or the hosted endpoint directly.
|
|
29
|
+
|
|
30
|
+
Each agent receives each message once: the channel, `inbox` and `wait` share one cursor per login.
|