@wirecat/whatsapp-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 (134) hide show
  1. package/LICENSE +204 -0
  2. package/README.md +401 -2
  3. package/dist/adapter/adapter.d.ts +13 -0
  4. package/dist/adapter/adapter.d.ts.map +1 -0
  5. package/dist/adapter/adapter.js +554 -0
  6. package/dist/adapter/adapter.js.map +1 -0
  7. package/dist/adapter/channels.d.ts +43 -0
  8. package/dist/adapter/channels.d.ts.map +1 -0
  9. package/dist/adapter/channels.js +100 -0
  10. package/dist/adapter/channels.js.map +1 -0
  11. package/dist/adapter/checks.d.ts +6 -0
  12. package/dist/adapter/checks.d.ts.map +1 -0
  13. package/dist/adapter/checks.js +2 -0
  14. package/dist/adapter/checks.js.map +1 -0
  15. package/dist/adapter/errors.d.ts +13 -0
  16. package/dist/adapter/errors.d.ts.map +1 -0
  17. package/dist/adapter/errors.js +38 -0
  18. package/dist/adapter/errors.js.map +1 -0
  19. package/dist/adapter/format-markdown.d.ts +8 -0
  20. package/dist/adapter/format-markdown.d.ts.map +1 -0
  21. package/dist/adapter/format-markdown.js +80 -0
  22. package/dist/adapter/format-markdown.js.map +1 -0
  23. package/dist/adapter/groups.d.ts +25 -0
  24. package/dist/adapter/groups.d.ts.map +1 -0
  25. package/dist/adapter/groups.js +252 -0
  26. package/dist/adapter/groups.js.map +1 -0
  27. package/dist/adapter/map.d.ts +23 -0
  28. package/dist/adapter/map.d.ts.map +1 -0
  29. package/dist/adapter/map.js +121 -0
  30. package/dist/adapter/map.js.map +1 -0
  31. package/dist/adapter/pins.d.ts +11 -0
  32. package/dist/adapter/pins.d.ts.map +1 -0
  33. package/dist/adapter/pins.js +10 -0
  34. package/dist/adapter/pins.js.map +1 -0
  35. package/dist/adapter/polls.d.ts +21 -0
  36. package/dist/adapter/polls.d.ts.map +1 -0
  37. package/dist/adapter/polls.js +103 -0
  38. package/dist/adapter/polls.js.map +1 -0
  39. package/dist/adapter/privacy.d.ts +18 -0
  40. package/dist/adapter/privacy.d.ts.map +1 -0
  41. package/dist/adapter/privacy.js +94 -0
  42. package/dist/adapter/privacy.js.map +1 -0
  43. package/dist/adapter/settings.d.ts +21 -0
  44. package/dist/adapter/settings.d.ts.map +1 -0
  45. package/dist/adapter/settings.js +76 -0
  46. package/dist/adapter/settings.js.map +1 -0
  47. package/dist/app.d.ts +6 -0
  48. package/dist/app.d.ts.map +1 -0
  49. package/dist/app.js +16 -0
  50. package/dist/app.js.map +1 -0
  51. package/dist/bin/wa.d.ts +3 -0
  52. package/dist/bin/wa.d.ts.map +1 -0
  53. package/dist/bin/wa.js +14 -0
  54. package/dist/bin/wa.js.map +1 -0
  55. package/dist/commands/session.d.ts +48 -0
  56. package/dist/commands/session.d.ts.map +1 -0
  57. package/dist/commands/session.js +201 -0
  58. package/dist/commands/session.js.map +1 -0
  59. package/dist/commands/setup.d.ts +3 -0
  60. package/dist/commands/setup.d.ts.map +1 -0
  61. package/dist/commands/setup.js +140 -0
  62. package/dist/commands/setup.js.map +1 -0
  63. package/dist/commands/update.d.ts +2 -0
  64. package/dist/commands/update.d.ts.map +1 -0
  65. package/dist/commands/update.js +17 -0
  66. package/dist/commands/update.js.map +1 -0
  67. package/dist/diagnose.d.ts +77 -0
  68. package/dist/diagnose.d.ts.map +1 -0
  69. package/dist/diagnose.js +84 -0
  70. package/dist/diagnose.js.map +1 -0
  71. package/dist/engine/channels.d.ts +100 -0
  72. package/dist/engine/channels.d.ts.map +1 -0
  73. package/dist/engine/channels.js +29 -0
  74. package/dist/engine/channels.js.map +1 -0
  75. package/dist/engine/contract.d.ts +1049 -0
  76. package/dist/engine/contract.d.ts.map +1 -0
  77. package/dist/engine/contract.js +353 -0
  78. package/dist/engine/contract.js.map +1 -0
  79. package/dist/engine/events.d.ts +9 -0
  80. package/dist/engine/events.d.ts.map +1 -0
  81. package/dist/engine/events.js +23 -0
  82. package/dist/engine/events.js.map +1 -0
  83. package/dist/engine/go-engine.d.ts +23 -0
  84. package/dist/engine/go-engine.d.ts.map +1 -0
  85. package/dist/engine/go-engine.js +227 -0
  86. package/dist/engine/go-engine.js.map +1 -0
  87. package/dist/engine/groups.d.ts +171 -0
  88. package/dist/engine/groups.d.ts.map +1 -0
  89. package/dist/engine/groups.js +66 -0
  90. package/dist/engine/groups.js.map +1 -0
  91. package/dist/engine/privacy.d.ts +33 -0
  92. package/dist/engine/privacy.d.ts.map +1 -0
  93. package/dist/engine/privacy.js +23 -0
  94. package/dist/engine/privacy.js.map +1 -0
  95. package/dist/engine/settings.d.ts +45 -0
  96. package/dist/engine/settings.d.ts.map +1 -0
  97. package/dist/engine/settings.js +34 -0
  98. package/dist/engine/settings.js.map +1 -0
  99. package/dist/engine-binary.d.ts +5 -0
  100. package/dist/engine-binary.d.ts.map +1 -0
  101. package/dist/engine-binary.js +18 -0
  102. package/dist/engine-binary.js.map +1 -0
  103. package/dist/install/postinstall.d.ts +8 -0
  104. package/dist/install/postinstall.d.ts.map +1 -0
  105. package/dist/install/postinstall.js +63 -0
  106. package/dist/install/postinstall.js.map +1 -0
  107. package/dist/messenger.d.ts +63 -0
  108. package/dist/messenger.d.ts.map +1 -0
  109. package/dist/messenger.js +186 -0
  110. package/dist/messenger.js.map +1 -0
  111. package/dist/paths.d.ts +5 -0
  112. package/dist/paths.d.ts.map +1 -0
  113. package/dist/paths.js +7 -0
  114. package/dist/paths.js.map +1 -0
  115. package/dist/program.d.ts +12 -0
  116. package/dist/program.d.ts.map +1 -0
  117. package/dist/program.js +86 -0
  118. package/dist/program.js.map +1 -0
  119. package/dist/reasons.d.ts +4 -0
  120. package/dist/reasons.d.ts.map +1 -0
  121. package/dist/reasons.js +21 -0
  122. package/dist/reasons.js.map +1 -0
  123. package/dist/update.d.ts +7 -0
  124. package/dist/update.d.ts.map +1 -0
  125. package/dist/update.js +19 -0
  126. package/dist/update.js.map +1 -0
  127. package/dist/version.d.ts +2 -0
  128. package/dist/version.d.ts.map +1 -0
  129. package/dist/version.js +2 -0
  130. package/dist/version.js.map +1 -0
  131. package/install/postinstall.mjs +3 -0
  132. package/install/windows.ps1 +161 -0
  133. package/package.json +89 -4
  134. package/skills/whatsapp-cli/SKILL.md +325 -0
package/LICENSE ADDED
@@ -0,0 +1,204 @@
1
+ Copyright (c) 2026 Viacheslav Ptsarev
2
+
3
+
4
+ Apache License
5
+ Version 2.0, January 2004
6
+ http://www.apache.org/licenses/
7
+
8
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
9
+
10
+ 1. Definitions.
11
+
12
+ "License" shall mean the terms and conditions for use, reproduction,
13
+ and distribution as defined by Sections 1 through 9 of this document.
14
+
15
+ "Licensor" shall mean the copyright owner or entity authorized by
16
+ the copyright owner that is granting the License.
17
+
18
+ "Legal Entity" shall mean the union of the acting entity and all
19
+ other entities that control, are controlled by, or are under common
20
+ control with that entity. For the purposes of this definition,
21
+ "control" means (i) the power, direct or indirect, to cause the
22
+ direction or management of such entity, whether by contract or
23
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
24
+ outstanding shares, or (iii) beneficial ownership of such entity.
25
+
26
+ "You" (or "Your") shall mean an individual or Legal Entity
27
+ exercising permissions granted by this License.
28
+
29
+ "Source" form shall mean the preferred form for making modifications,
30
+ including but not limited to software source code, documentation
31
+ source, and configuration files.
32
+
33
+ "Object" form shall mean any form resulting from mechanical
34
+ transformation or translation of a Source form, including but
35
+ not limited to compiled object code, generated documentation,
36
+ and conversions to other media types.
37
+
38
+ "Work" shall mean the work of authorship, whether in Source or
39
+ Object form, made available under the License, as indicated by a
40
+ copyright notice that is included in or attached to the work
41
+ (an example is provided in the Appendix below).
42
+
43
+ "Derivative Works" shall mean any work, whether in Source or Object
44
+ form, that is based on (or derived from) the Work and for which the
45
+ editorial revisions, annotations, elaborations, or other modifications
46
+ represent, as a whole, an original work of authorship. For the purposes
47
+ of this License, Derivative Works shall not include works that remain
48
+ separable from, or merely link (or bind by name) to the interfaces of,
49
+ the Work and Derivative Works thereof.
50
+
51
+ "Contribution" shall mean any work of authorship, including
52
+ the original version of the Work and any modifications or additions
53
+ to that Work or Derivative Works thereof, that is intentionally
54
+ submitted to Licensor for inclusion in the Work by the copyright owner
55
+ or by an individual or Legal Entity authorized to submit on behalf of
56
+ the copyright owner. For the purposes of this definition, "submitted"
57
+ means any form of electronic, verbal, or written communication sent
58
+ to the Licensor or its representatives, including but not limited to
59
+ communication on electronic mailing lists, source code control systems,
60
+ and issue tracking systems that are managed by, or on behalf of, the
61
+ Licensor for the purpose of discussing and improving the Work, but
62
+ excluding communication that is conspicuously marked or otherwise
63
+ designated in writing by the copyright owner as "Not a Contribution."
64
+
65
+ "Contributor" shall mean Licensor and any individual or Legal Entity
66
+ on behalf of whom a Contribution has been received by Licensor and
67
+ subsequently incorporated within the Work.
68
+
69
+ 2. Grant of Copyright License. Subject to the terms and conditions of
70
+ this License, each Contributor hereby grants to You a perpetual,
71
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
72
+ copyright license to reproduce, prepare Derivative Works of,
73
+ publicly display, publicly perform, sublicense, and distribute the
74
+ Work and such Derivative Works in Source or Object form.
75
+
76
+ 3. Grant of Patent License. Subject to the terms and conditions of
77
+ this License, each Contributor hereby grants to You a perpetual,
78
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
79
+ (except as stated in this section) patent license to make, have made,
80
+ use, offer to sell, sell, import, and otherwise transfer the Work,
81
+ where such license applies only to those patent claims licensable
82
+ by such Contributor that are necessarily infringed by their
83
+ Contribution(s) alone or by combination of their Contribution(s)
84
+ with the Work to which such Contribution(s) was submitted. If You
85
+ institute patent litigation against any entity (including a
86
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
87
+ or a Contribution incorporated within the Work constitutes direct
88
+ or contributory patent infringement, then any patent licenses
89
+ granted to You under this License for that Work shall terminate
90
+ as of the date such litigation is filed.
91
+
92
+ 4. Redistribution. You may reproduce and distribute copies of the
93
+ Work or Derivative Works thereof in any medium, with or without
94
+ modifications, and in Source or Object form, provided that You
95
+ meet the following conditions:
96
+
97
+ (a) You must give any other recipients of the Work or
98
+ Derivative Works a copy of this License; and
99
+
100
+ (b) You must cause any modified files to carry prominent notices
101
+ stating that You changed the files; and
102
+
103
+ (c) You must retain, in the Source form of any Derivative Works
104
+ that You distribute, all copyright, patent, trademark, and
105
+ attribution notices from the Source form of the Work,
106
+ excluding those notices that do not pertain to any part of
107
+ the Derivative Works; and
108
+
109
+ (d) If the Work includes a "NOTICE" text file as part of its
110
+ distribution, then any Derivative Works that You distribute must
111
+ include a readable copy of the attribution notices contained
112
+ within such NOTICE file, excluding those notices that do not
113
+ pertain to any part of the Derivative Works, in at least one
114
+ of the following places: within a NOTICE text file distributed
115
+ as part of the Derivative Works; within the Source form or
116
+ documentation, if provided along with the Derivative Works; or,
117
+ within a display generated by the Derivative Works, if and
118
+ wherever such third-party notices normally appear. The contents
119
+ of the NOTICE file are for informational purposes only and
120
+ do not modify the License. You may add Your own attribution
121
+ notices within Derivative Works that You distribute, alongside
122
+ or as an addendum to the NOTICE text from the Work, provided
123
+ that such additional attribution notices cannot be construed
124
+ as modifying the License.
125
+
126
+ You may add Your own copyright statement to Your modifications and
127
+ may provide additional or different license terms and conditions
128
+ for use, reproduction, or distribution of Your modifications, or
129
+ for any such Derivative Works as a whole, provided Your use,
130
+ reproduction, and distribution of the Work otherwise complies with
131
+ the conditions stated in this License.
132
+
133
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
134
+ any Contribution intentionally submitted for inclusion in the Work
135
+ by You to the Licensor shall be under the terms and conditions of
136
+ this License, without any additional terms or conditions.
137
+ Notwithstanding the above, nothing herein shall supersede or modify
138
+ the terms of any separate license agreement you may have executed
139
+ with Licensor regarding such Contributions.
140
+
141
+ 6. Trademarks. This License does not grant permission to use the trade
142
+ names, trademarks, service marks, or product names of the Licensor,
143
+ except as required for reasonable and customary use in describing the
144
+ origin of the Work and reproducing the content of the NOTICE file.
145
+
146
+ 7. Disclaimer of Warranty. Unless required by applicable law or
147
+ agreed to in writing, Licensor provides the Work (and each
148
+ Contributor provides its Contributions) on an "AS IS" BASIS,
149
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
150
+ implied, including, without limitation, any warranties or conditions
151
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
152
+ PARTICULAR PURPOSE. You are solely responsible for determining the
153
+ appropriateness of using or redistributing the Work and assume any
154
+ risks associated with Your exercise of permissions under this License.
155
+
156
+ 8. Limitation of Liability. In no event and under no legal theory,
157
+ whether in tort (including negligence), contract, or otherwise,
158
+ unless required by applicable law (such as deliberate and grossly
159
+ negligent acts) or agreed to in writing, shall any Contributor be
160
+ liable to You for damages, including any direct, indirect, special,
161
+ incidental, or consequential damages of any character arising as a
162
+ result of this License or out of the use or inability to use the
163
+ Work (including but not limited to damages for loss of goodwill,
164
+ work stoppage, computer failure or malfunction, or any and all
165
+ other commercial damages or losses), even if such Contributor
166
+ has been advised of the possibility of such damages.
167
+
168
+ 9. Accepting Warranty or Additional Liability. While redistributing
169
+ the Work or Derivative Works thereof, You may choose to offer,
170
+ and charge a fee for, acceptance of support, warranty, indemnity,
171
+ or other liability obligations and/or rights consistent with this
172
+ License. However, in accepting such obligations, You may act only
173
+ on Your own behalf and on Your sole responsibility, not on behalf
174
+ of any other Contributor, and only if You agree to indemnify,
175
+ defend, and hold each Contributor harmless for any liability
176
+ incurred by, or claims asserted against, such Contributor by reason
177
+ of your accepting any such warranty or additional liability.
178
+
179
+ END OF TERMS AND CONDITIONS
180
+
181
+ APPENDIX: How to apply the Apache License to your work.
182
+
183
+ To apply the Apache License to your work, attach the following
184
+ boilerplate notice, with the fields enclosed by brackets "[]"
185
+ replaced with your own identifying information. (Don't include
186
+ the brackets!) The text should be enclosed in the appropriate
187
+ comment syntax for the file format. We also recommend that a
188
+ file or class name and description of purpose be included on the
189
+ same "printed page" as the copyright notice for easier
190
+ identification within third-party archives.
191
+
192
+ Copyright [yyyy] [name of copyright owner]
193
+
194
+ Licensed under the Apache License, Version 2.0 (the "License");
195
+ you may not use this file except in compliance with the License.
196
+ You may obtain a copy of the License at
197
+
198
+ http://www.apache.org/licenses/LICENSE-2.0
199
+
200
+ Unless required by applicable law or agreed to in writing, software
201
+ distributed under the License is distributed on an "AS IS" BASIS,
202
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
203
+ See the License for the specific language governing permissions and
204
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,402 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/WireCatLabs/whatsapp-cli/main/docs/images/social-preview.png" alt="WhatsApp CLI for AI agents" width="100%">
3
+ </p>
2
4
 
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.
5
+ # wa — WhatsApp CLI for AI agents
6
+
7
+ <p align="center">
8
+ Your personal WhatsApp in the terminal, searchable on your computer, and ready for Claude Code,
9
+ Codex, Cursor or any agent — within limits you set.
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/README.md">Docs</a> ·
14
+ <a href="https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/recipes.md">Examples</a> ·
15
+ <a href="https://wirecat.dev">WireCat</a>
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="https://www.npmjs.com/package/@wirecat/whatsapp-cli"><img src="https://img.shields.io/npm/v/@wirecat/whatsapp-cli" alt="npm"></a>
20
+ <a href="https://github.com/WireCatLabs/whatsapp-cli/actions/workflows/main.yml"><img src="https://github.com/WireCatLabs/whatsapp-cli/actions/workflows/main.yml/badge.svg" alt="CI"></a>
21
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/node/v/@wirecat/whatsapp-cli" alt="Node"></a>
22
+ <a href="https://bun.sh/"><img src="https://img.shields.io/badge/bun-tested-f9f1e1" alt="Bun"></a>
23
+ <a href="https://www.npmjs.com/package/@wirecat/whatsapp-cli"><img src="https://img.shields.io/npm/dm/@wirecat/whatsapp-cli" alt="npm downloads"></a>
24
+ <a href="https://github.com/WireCatLabs/whatsapp-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License: Apache 2.0"></a>
25
+ </p>
26
+
27
+ An example conversation (invented people, illustrative output):
28
+
29
+ ```text
30
+ You: Use wa CLI. Who is waiting for my answer since yesterday?
31
+ Agent: (runs wa personal review 'date>1d' --unanswered: 3 chats)
32
+ · Alice Example asked about Saturday's table, 18:40 yesterday
33
+ · "Book club" — Bob Sample asked who brings the next book
34
+ You: Tell Alice: yes, 8 pm.
35
+ Agent: Draft to Alice Example: "Yes, 8 pm." Send it?
36
+ You: Yes.
37
+ ```
38
+
39
+ > ⚠️ **`wa` is an unofficial client of your real WhatsApp account.** WhatsApp's terms forbid unofficial clients, and
40
+ > WhatsApp may ban an account that uses one. It also bans accounts that send in bulk or write to people who do not
41
+ > know them. `wa` writes only when a command asks, sends at most 30 messages an hour by default, and holds every
42
+ > write when WhatsApp says to slow down or restricts the account. Do not send in bulk, and do not write to strangers.
43
+ > You use `wa` at your own risk. More: [limits](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/limits.md)
44
+
45
+ **Early.** `wa` is new, and some of what it does has not yet been checked against real WhatsApp. The
46
+ [backlog](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/dev/BACKLOG.md) lists the checks still to run.
47
+
48
+ ## Quick start
49
+
50
+ ```sh
51
+ npm install -g @wirecat/whatsapp-cli
52
+ wa personal setup --agent claude # also codex, cursor, gemini, all or none
53
+ wa personal server install # keep receiving in the background
54
+ wa personal inbox # other people's unread messages; nothing is marked read
55
+ ```
56
+
57
+ Allow about five minutes. `wa personal setup` links `wa` to your account as a device — you scan a QR code in
58
+ WhatsApp → Settings → Linked devices — keeps the history your phone sends right after linking, checks your first
59
+ chats and installs the agent skill.
60
+
61
+ It needs **Node 22.16+ or 24+** on macOS, Linux or Windows. npm also installs the engine, the small program that
62
+ speaks WhatsApp's protocol, as a separate package for your system.
63
+
64
+ More: [installation guide](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/installation.md) · [linking](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/sessions.md)
65
+
66
+ ## What can you do?
67
+
68
+ **Catch up.** *"Use wa CLI. What came in since this morning, and who is waiting for my answer?"*
69
+
70
+ ```sh
71
+ wa personal inbox
72
+ wa personal review 'date>1d' --unanswered
73
+ ```
74
+
75
+ **Find anything.** *"Use wa CLI. When did we agree on the venue with Alice?"* — an answer with the date and the
76
+ message itself.
77
+
78
+ ```sh
79
+ wa personal search all "venue" # messages and notes kept on this computer
80
+ ```
81
+
82
+ **Keep your promises.** *"Use wa CLI. What did I promise, and what am I still waiting on?"*
83
+
84
+ ```sh
85
+ wa personal review --new # what changed since the last review --new
86
+ wa personal tasks list state:open
87
+ ```
88
+
89
+ **Run your groups.** *"Use wa CLI. Which questions in Hiking has nobody answered?"*
90
+
91
+ ```sh
92
+ wa personal review chat:Hiking --unanswered
93
+ wa personal chats events Hiking 'time>=7d' # who joined, left, was added or removed
94
+ ```
95
+
96
+ **Answer, when you say so.**
97
+
98
+ ```sh
99
+ wa personal messages send "Book club" "Call at 3?" --reply-to 3EB0A1B2C3D4E5F6A7B8
100
+ wa personal messages edit "Book club" 3EB0A1B2C3D4E5F6A7B8 "Call at 4?" # your own, within 20 minutes
101
+ wa personal reactions add "Book club" 3EB0A1B2C3D4E5F6A7B8 👍
102
+ wa personal messages delete "Book club" 3EB0A1B2C3D4E5F6A7B8 --for-everyone
103
+ wa personal chats mark-read "Book club" # the other side sees it
104
+ ```
105
+
106
+ More: [recipes, with a schedule for each](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/recipes.md) · [using wa](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/usage.md)
107
+
108
+ ## Built for AI agents
109
+
110
+ Your agent. Your WhatsApp. Your rules.
111
+
112
+ - **Agents with a terminal** (Claude Code, Codex, Gemini CLI) run `wa` commands themselves. The bundled
113
+ [skill](https://github.com/WireCatLabs/whatsapp-cli/blob/main/skills/whatsapp-cli/SKILL.md) tells them how: `wa personal setup --agent …` or `wa skill install` puts it in
114
+ place, and `wa skill show` prints it before linking. An agent links by QR: it pastes the code into the chat as text for you
115
+ to scan, and never asks for your phone number or a code.
116
+ - **Apps without a terminal** (Claude Desktop, Cursor and other MCP clients) connect to `wa personal mcp`. It
117
+ comes with ready prompts: `/catch-up`, `/review`, `/reply`, `/find` and more.
118
+
119
+ ```sh
120
+ wa personal mcp setup claude-code # or: wa personal mcp setup codex
121
+ wa personal mcp config # the entry for Claude Desktop, Cursor and others
122
+ ```
123
+
124
+ The profile can send by default, so `mcp setup` stops first. Check the profile's permissions, then run it again with
125
+ `--allow-writes`.
126
+
127
+ More: [the MCP server](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/mcp.md) · [from the browser](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/remote.md)
128
+
129
+ ## Why wa?
130
+
131
+ - **Your own account, as a linked device.** `wa` links the way WhatsApp Web does. It sees your chats, groups and
132
+ contacts, and speaks as you, not as a business account or a bot.
133
+ - **Local-first search.** Everything received is kept on your computer. Every read and search answers from there and
134
+ never connects.
135
+ - **Made for agents.** One operation per call, the same JSON shape every time with `--json`, a fixed exit code for
136
+ each kind of failure, an MCP server and a skill.
137
+ - **Safe by default.** Reading marks nothing read and sends no "online" or "typing". A profile decides which actions
138
+ an agent may take, which chats it may send to, and how many messages an hour (30 by default). When a send's outcome
139
+ is unknown, `wa` says so and never repeats it by itself.
140
+
141
+ ## Your account
142
+
143
+ `wa` works in your name, as one more linked device of your WhatsApp account.
144
+
145
+ ```sh
146
+ wa personal chats list --limit 5
147
+ wa personal messages list "Book club" --limit 20
148
+ wa personal messages send "Book club" "The minutes" --file minutes.pdf
149
+ wa personal polls create "Book club" "Which day?" Monday Tuesday
150
+ wa personal messages download "Book club" 3EB0A1B2C3D4E5F6A7B8 --output-dir ~/Downloads
151
+ wa personal messages transcribe "Book club" 3EB0A1B2C3D4E5F6A7B8 --local # a voice note as text
152
+ ```
153
+
154
+ The message id `3EB0A1B2C3D4E5F6A7B8` is made up; take a real one from `messages list -v`.
155
+
156
+ - **Read.** Chats and messages from the local store, one message with its neighbours, other people's unread
157
+ messages (`wa personal inbox`), everything since the last review (`wa personal review`), new messages as they
158
+ arrive (`wa personal watch`), older messages of one chat asked of your phone (`wa personal messages sync`), and
159
+ the posts of the channels you follow (`wa personal chats join` with a channel link, then `messages sync`).
160
+ - **Write.** Markdown, replies, one file, photo, video or voice note per message, a photo and a video as one album,
161
+ edits of your own messages within 20 minutes, forwards, reactions, polls and votes, pins (each one tells the
162
+ members), deleting for you or for everyone, and marking a chat read.
163
+ - **Your chat list.** Mute, archive, pin or mark a chat unread, star a message, and delete or clear a chat on your
164
+ own devices; nobody in the chat is told.
165
+ - **Voice on your computer.** WhatsApp has no speech recognition of its own, so `wa` runs a speech model on this
166
+ machine, downloaded only when you ask.
167
+ - **People.** A person's profile, blocking, whether a number has WhatsApp, the phone's address book into the store,
168
+ and your own names and notes for people.
169
+ - **Your account.** Your own name, about line and profile photo (`wa personal account update`).
170
+ - **Privacy.** Who sees your last seen, online, profile photo and about line, whether you send read receipts, who
171
+ may add you to groups and whose calls ring (`wa personal account privacy`).
172
+
173
+ More files in one message than a photo and a video are not built yet:
174
+ [not in wa yet](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/usage.md#not-in-wa-yet).
175
+
176
+ More: [using wa](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/usage.md) · [privacy](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/usage.md#privacy) · [one person](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/people.md)
177
+
178
+ ## Log in and profiles
179
+
180
+ `wa` links to your account as a device, the way WhatsApp Web does. There is no password and no app to register: you
181
+ link once, from the phone, and the device keys go to one file only your user can read.
182
+
183
+ ```sh
184
+ wa personal session start # a QR code: WhatsApp → Settings → Linked devices → Link a device
185
+ wa personal session start phone # or your number, then a pairing code you type on the phone
186
+ wa personal account show # who this profile is linked as
187
+ wa account list # every profile here, and who each is linked as
188
+ wa personal session end # unlink, and delete the device keys here
189
+ ```
190
+
191
+ Several accounts are several profiles, and the profile is **the first word**, not an option:
192
+
193
+ ```sh
194
+ wa personal chats list # profile "personal"
195
+ wa work chats list # profile "work"
196
+ export WA_PROFILE=work # or for the whole shell session
197
+ ```
198
+
199
+ `wa` never picks a profile for you, not even the only one: a command that uses an account and has no profile named
200
+ stops and lists the profiles on this computer. Name one or set `WA_PROFILE`. Each profile is a linked device of its
201
+ own, with its own one connection.
202
+
203
+ More: [linking, devices and profiles](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/sessions.md) · [profiles](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/profiles.md)
204
+
205
+ ## The local store and search
206
+
207
+ Everything `wa` receives is kept in a local store on your computer, shared with tg and max. Search runs over it;
208
+ nothing leaves your computer.
209
+
210
+ ```sh
211
+ wa personal search messages 'contract chat:"Project Alpha"'
212
+ wa personal store status # how much of each chat is kept
213
+ wa personal store export "Project Alpha" --format markdown --output alpha.md
214
+ wa personal messages evidence "Project Alpha" --json # bounded evidence for a chat brief
215
+ wa personal store backup ~/wa-backup.db # a copy, safe while the store is in use
216
+ ```
217
+
218
+ More: [search](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/search.md) · [the local store](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/archive.md) · [query language](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/query-language.md)
219
+
220
+ ## Groups you run
221
+
222
+ ```sh
223
+ wa personal review chat:Hiking --unanswered # questions nobody answered
224
+ wa personal review 'chat:Hiking date>7d' # the week: decisions, promises, open questions
225
+ wa personal chats events Hiking 'time>=7d' # who joined, left, was added or removed, and by whom
226
+ wa personal chats inspect https://chat.whatsapp.com/AAAAAAAAAAAAAAAAAAAAAA # where an invite leads, without joining
227
+ wa personal stats chats show Hiking --offline # the group's activity, from the local store
228
+ wa personal chats create "Hiking 2027" 100000000000002@lid # a new group, with people you know
229
+ wa personal chats members add 120363000000000001@g.us 100000000000002@lid
230
+ wa personal chats update 120363000000000001@g.us --join-approval on
231
+ wa personal chats requests list 120363000000000001@g.us
232
+ ```
233
+
234
+ Renaming a group, its photo, members and admins, the invite link, join requests and who may send or add people are
235
+ commands too. The members see each change, so each passes the profile's permissions and hourly limit. `wa` adds only
236
+ people in your address book or that you have written to: WhatsApp bans accounts that add strangers.
237
+
238
+ More: [groups](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/groups.md)
239
+
240
+ ## Agent setup in detail
241
+
242
+ **The skill.** Claude Code reads `~/.claude/skills/whatsapp-cli/`; Codex and Gemini CLI read
243
+ `~/.agents/skills/whatsapp-cli/`. Start a new agent session if it does not see the skill.
244
+
245
+ ```sh
246
+ wa skill install --for all # both folders, without linking
247
+ wa skill show # the complete instructions, without installing them
248
+ ```
249
+
250
+ **The MCP server.** The profile's `permissions` decide which tools it offers. `readonly` stops the agent from
251
+ changing anything; at `ask` the server shows no form, so set up approval in your agent app.
252
+
253
+ ```sh
254
+ claude mcp add wa -- wa personal mcp # Claude Code, by hand
255
+ wa personal mcp doctor # check the local MCP server
256
+ ```
257
+
258
+ **From the browser.** ChatGPT or Claude in the browser reach `wa personal mcp --http --public-url` behind your tunnel,
259
+ after a login with a one-time access code from your terminal.
260
+
261
+ More: [the MCP server](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/mcp.md) · [from the browser](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/remote.md)
262
+
263
+ ## Output for scripts and agents
264
+
265
+ With `--json` a command prints only data, as one JSON value. `--jsonl` prints one object per line. Every list has
266
+ one shape:
267
+
268
+ ```json
269
+ { "items": [ … ], "page": { "limit": 20, "has_more": true }, "meta": { … } }
270
+ ```
271
+
272
+ An error goes to stderr as one line, with stdout empty, and the command exits with a fixed code: `4` link the
273
+ profile, `5` the profile may not do this, `6` chat or message not found, `8` a limit, `12` another command holds the
274
+ device, `14` unknown whether a message went. `wa commands --json` is the whole command tree.
275
+
276
+ More: [CLI contract](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/cli-contract.md) · [every command and exit code](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/commands.md)
277
+
278
+ ## Settings and permissions
279
+
280
+ ```sh
281
+ wa personal config set permissions.messages readonly # no change to messages from this profile
282
+ wa personal config set permissions.messages.send ask # a question in the terminal before each send
283
+ wa personal config set sends_per_hour 10 # at most 10 sends an hour (30 by default)
284
+ wa personal recipients add "Book club" # the first add turns the recipient list on
285
+ wa personal sends list # every attempt: sent, refused, failed or not known
286
+ wa personal config show # what is set, and where it came from
287
+ ```
288
+
289
+ More: [permissions](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/permissions.md) · [profiles](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/profiles.md) · [configuration](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/configuration.md) ·
290
+ [limits](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/limits.md)
291
+
292
+ ## Limits
293
+
294
+ Each profile has one request pace, shared by every command, `serve` and the MCP server at once, so a script stays far
295
+ from what WhatsApp bans. A profile sends at most 30 messages an hour by default. One command at a time may connect a
296
+ profile; another one is refused with exit code `12` and names the holder, unless `serve` runs and carries it on its
297
+ connection. There is nothing to download in bulk: reads answer from the local store.
298
+
299
+ More: [limits and waits](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/limits.md)
300
+
301
+ ## Security
302
+
303
+ - The device keys are one file readable only by your user. Whoever copies it can read and send as you until you
304
+ remove the device on your phone. No command takes a phone number or a pairing code as an argument.
305
+ - The local store holds the full text of what was received, unencrypted and readable only by your user.
306
+ - Every send, from a command or over MCP, passes the profile's limits and is written to a journal — without its
307
+ text.
308
+ - Nothing `wa` sends to WhatsApp names this tool: it links as a desktop browser.
309
+
310
+ To report a vulnerability: [SECURITY.md](https://github.com/WireCatLabs/whatsapp-cli/blob/main/SECURITY.md). More: [security](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/security.md)
311
+
312
+ ## When something goes wrong
313
+
314
+ ```sh
315
+ wa personal doctor # the engine, the device keys' file modes and who holds the connection
316
+ wa personal doctor --online # also connect once and read the account
317
+ wa personal runs list # recorded runs
318
+ ```
319
+
320
+ More: [troubleshooting by symptom](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/troubleshooting.md) · [diagnostics](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/diagnostics.md)
321
+
322
+ ## How it differs
323
+
324
+ `wa` shares its commands, its store and its agent tools with tg and max, so what you learn in one works in the
325
+ others. WhatsApp is different in three ways:
326
+
327
+ - **History comes from your phone.** WhatsApp's servers keep no history to ask for. Your phone sends your recent
328
+ chats once, when `wa` links, and `wa serve` keeps receiving new ones. Older messages of one chat can be asked of the
329
+ phone, 50 at a time, while WhatsApp is open on it (`wa personal messages sync`). Every read answers from the local
330
+ store and never connects.
331
+ - **One connection per device.** WhatsApp allows one. While `wa serve` runs, other commands for the same profile,
332
+ a send included, run through its connection. On Windows they are refused until `serve` stops, for now.
333
+ - **Unofficial.** The risk of a ban is in the warning at the top of this page. `wa` never sends "online" or
334
+ "typing", and marks nothing read unless you ask.
335
+
336
+ ## Part of WireCat
337
+
338
+ [WireCat](https://wirecat.dev) is an open-source, local-first context layer for AI agents. `wa` sits beside
339
+ [tg](https://github.com/WireCatLabs/tg-cli) for Telegram and [max](https://github.com/WireCatLabs/max-cli) for MAX, in
340
+ the same local store.
341
+
342
+ ## Technical docs
343
+
344
+ Every page is in [`docs/`](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/README.md):
345
+
346
+ | Page | Answers |
347
+ |---|---|
348
+ | [index](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/index.md) | The docs site's start page: what `wa` is, the first minute, where to go next |
349
+ | [installation](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/installation.md) | How do I install it, and what does it need? |
350
+ | [usage](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/usage.md) | How do I link, read, send and change a message — in that order? |
351
+ | [sessions](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/sessions.md) | How does linking work: QR or pairing code, one connection per device, profiles, unlinking? |
352
+ | [archive](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/archive.md) | What does the local store keep, how is it filled, and how do I export and back it up? |
353
+ | [search](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/search.md) | How do I find a message by its words, sender, chat, date, file or label, save a search and count? |
354
+ | [attachments](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/attachments.md) | Sending, saving and forwarding files; their text, and voice notes as text |
355
+ | [query-language](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/query-language.md) | Every search field, operator, preset, limit and the JSON answer |
356
+ | [groups](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/groups.md) | How do I keep up with a group, and run one? |
357
+ | [people](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/people.md) | One person: what the store holds about them, your own names and notes |
358
+ | [mcp](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/mcp.md) | How do I connect Claude Desktop, Cursor or another client without a terminal? |
359
+ | [remote](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/remote.md) | ChatGPT or Claude in the browser, through a login and a tunnel |
360
+ | [recipes](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/recipes.md) | What can an agent do for me every day, and how do I run it on a schedule? |
361
+ | [commands](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/commands.md) | Every command, option and exit code — **generated** from the program |
362
+ | [configuration](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/configuration.md) | How do I configure common behaviour? |
363
+ | [permissions](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/permissions.md) | What a profile may read, what asks first, and what may go ahead |
364
+ | [profiles](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/profiles.md) | Several accounts on one computer, and how a command picks one |
365
+ | [configuration-reference](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/configuration-reference.md) | Every key, default, scope and variable |
366
+ | [cli-contract](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/cli-contract.md) | Invocation, output, errors, headless runs, bounds and previews |
367
+ | [limits](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/limits.md) | Limits, waits and the one connection per device |
368
+ | [diagnostics](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/diagnostics.md) | What did a command do, and what is never recorded? |
369
+ | [troubleshooting](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/troubleshooting.md) | Something does not work: what the screen says, and what to do |
370
+ | [security](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/security.md) | What does `wa` keep on my computer, and what can go wrong? |
371
+ | [roadmap](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/roadmap.md) | What is coming next? |
372
+
373
+ What each version changed: [CHANGELOG.md](https://github.com/WireCatLabs/whatsapp-cli/blob/main/CHANGELOG.md).
374
+
375
+ ## Development
376
+
377
+ ```sh
378
+ pnpm install
379
+ pnpm lint && pnpm typecheck && pnpm test
380
+ pnpm engine:build && pnpm engine:test # the Go engine; needs Go
381
+ pnpm generate # rewrites docs/commands.md from the command tree
382
+ bin/wa personal chats list # config, state and device under .wa/; a worktree's store too
383
+ ```
384
+
385
+ Everything that is not specific to WhatsApp — the commands, the store, the send guard, the MCP server — lives in
386
+ [cli-core](https://github.com/WireCatLabs/cli-core), shared with tg and max.
387
+
388
+ More: [ARCHITECTURE](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/dev/ARCHITECTURE.md) · [TESTING](https://github.com/WireCatLabs/whatsapp-cli/blob/main/docs/dev/TESTING.md)
389
+
390
+ ## Contributing
391
+
392
+ Pull requests, bug reports and ideas are welcome in [issues](https://github.com/WireCatLabs/whatsapp-cli/issues).
393
+
394
+ Custom automation with WhatsApp, other messengers and AI agents: [info@neirox.ai](mailto:info@neirox.ai).
395
+
396
+ ## License
397
+
398
+ The CLI is [Apache-2.0](https://github.com/WireCatLabs/whatsapp-cli/blob/main/LICENSE). The engine is not: the Go program in [`engine/`](https://github.com/WireCatLabs/whatsapp-cli/tree/main/engine) and the
399
+ `@wirecat/whatsapp-engine-*` packages that carry it are [GPL-3.0-only](https://github.com/WireCatLabs/whatsapp-cli/blob/main/engine/LICENSE), because the engine links
400
+ go.mau.fi/libsignal, which is under the GNU General Public License 3.0, through whatsmeow. The two are separate
401
+ programs: `wa` starts the engine as a child process and talks to it only over stdin and stdout. Each engine package
402
+ says where its source is and lists every Go module it links in `THIRD_PARTY_NOTICES`.
@@ -0,0 +1,13 @@
1
+ import { type MarkdownFormatting } from "@wirecat/cli-core";
2
+ import type { LiveUpdates, MessageEditing, MessageMedia, MessagePins, MessageReactions, MessageStars, MessengerCore, PassiveUpdates, PushedHistory, ReadState, ServerReads, StoredMessages } from "@wirecat/cli-core/cli";
3
+ import { type WhatsAppEngine } from "../engine/contract.js";
4
+ import type { Words } from "./checks.js";
5
+ import { type GroupAdapter } from "./groups.js";
6
+ import { type PollAdapter } from "./polls.js";
7
+ import { type PrivacyAdapter } from "./privacy.js";
8
+ import { type SettingsAdapter } from "./settings.js";
9
+ export type WhatsAppAdapter = MessengerCore & LiveUpdates & PassiveUpdates & PushedHistory & Pick<MessageEditing, "edit" | "delete" | "forward"> & Pick<MessageMedia, "download"> & MessageReactions & MessageStars & ReadState & Pick<ServerReads, "history"> & MarkdownFormatting & PollAdapter & GroupAdapter & PrivacyAdapter & MessagePins & SettingsAdapter;
10
+ export declare const whatsAppAdapter: (engine: WhatsAppEngine, stored?: StoredMessages, words?: Words,
11
+ /** Where a skipped pushed event is said — a warning, so `--quiet` drops it. The diagnostic stream if not given. */
12
+ warn?: (message: string) => void) => WhatsAppAdapter;
13
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/adapter.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,kBAAkB,EAKxB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,aAAa,EACb,SAAS,EAGT,WAAW,EACX,cAAc,EACf,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EASL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAGxC,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,aAAa,CAAA;AAa7D,OAAO,EAAE,KAAK,WAAW,EAA2C,MAAM,YAAY,CAAA;AACtF,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,cAAc,CAAA;AAClE,OAAO,EAAuB,KAAK,eAAe,EAAkC,MAAM,eAAe,CAAA;AAEzG,MAAM,MAAM,eAAe,GAAG,aAAa,GACzC,WAAW,GACX,cAAc,GACd,aAAa,GACb,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC,GACnD,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,GAC9B,gBAAgB,GAChB,YAAY,GACZ,SAAS,GACT,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAC5B,kBAAkB,GAClB,WAAW,GACX,YAAY,GACZ,cAAc,GACd,WAAW,GACX,eAAe,CAAA;AAqMjB,eAAO,MAAM,eAAe,WAClB,cAAc,WACd,cAAc,UACf,KAAK;AACZ,mHAAmH;OAC7G,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,KAC9B,eAwcF,CAAA"}