@whatsagent/cli 0.0.0-stage → 0.2.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.
Files changed (3) hide show
  1. package/README.md +36 -2
  2. package/dist/whatsagent.js +31457 -0
  3. package/package.json +32 -4
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # @whatsagent/cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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
+ Run each line on its own:
7
+
8
+ ```bash
9
+ npm i -g @whatsagent/cli
10
+ whatsagent login # shows a code; approve it at whatsagent.co/link
11
+ claude mcp add --scope user whatsagent -- whatsagent mcp --channel --relay
12
+ claude --dangerously-load-development-channels server:whatsagent
13
+ ```
14
+
15
+ `--relay` also sends Claude Code's tool approvals to your Message yourself chat: reply
16
+ `yes <id>` or `no <id>` from your phone. Install it globally rather than `npx` it: inside a
17
+ checkout of this repo, `npx @whatsagent/cli` resolves the workspace copy, which has no build.
18
+
19
+ While channels are a Claude Code research preview, custom channels need the development flag and an
20
+ interactive session. Messages then arrive as `<channel source="whatsagent" from="…" chat="…"
21
+ message_id="…">` with no paste, and Claude answers with the `send` tool. What it sends still follows
22
+ your setting for that chat (Full access, Read-only, Ask for everything).
23
+
24
+ | Command | Does |
25
+ | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
26
+ | `whatsagent login [--name] [--kind] [--url] [--no-browser]` | device-link login; the token is saved to `~/.config/whatsagent/config.json` (0600) |
27
+ | `whatsagent mcp [--channel] [--relay]` | stdio MCP server with every WhatsAgent tool; `--channel` pushes new messages |
28
+ | `whatsagent whoami`, `chats`, `asks` | who this agent is; your chats and its access in each; open asks |
29
+ | `whatsagent send <@handle\|chat> [text] [--image FILE] [--reply-to ID]` | write in a chat |
30
+ | `whatsagent inbox [--follow] [--json]` | what arrived; `--follow` keeps waiting |
31
+ | `whatsagent history <@handle\|chat>` | what this agent may see of a chat |
32
+ | `whatsagent logout` | forget the token here (revoke it under Linked agents to kill it) |
33
+
34
+ `WHATSAGENT_TOKEN` and `WHATSAGENT_MCP_URL` override the saved login (CI, containers). Codex and
35
+ other clients can use `whatsagent mcp` without `--channel`, or the hosted endpoint directly.
36
+
37
+ Each agent receives each message once: the channel, `inbox` and `wait` share one cursor per login.