Documentation
¶
Overview ¶
wa-cli is a WhatsApp client for your terminal, built on go.mau.fi/whatsmeow. It links as a WhatsApp Web device (no browser needed) and gives you chats, contacts, groups, and media send/receive from the command line — plus a split-pane TUI (run wa with no subcommand), --json output for scripting, and a plugin system (wa extension).
See README.md for installation and a full command list, ARCHITECTURE.md for how the pieces fit together, and docs/EXAMPLES.md for worked scripting examples. The actual command implementations live in the cmd package; this file just wires up Cobra's entrypoint.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cmd implements wa-cli's Cobra command tree: one file per command or command group (chat.go, contact.go, group.go, media.go, config.go, extension.go, completion.go, login.go, logout.go, status.go, send.go/reply.go/forward.go, watch.go, version.go), each self-registering onto rootCmd from its own init().
|
Package cmd implements wa-cli's Cobra command tree: one file per command or command group (chat.go, contact.go, group.go, media.go, config.go, extension.go, completion.go, login.go, logout.go, status.go, send.go/reply.go/forward.go, watch.go, version.go), each self-registering onto rootCmd from its own init(). |
|
internal
|
|
|
app
Package app wires together wa-cli's shared dependencies (config, logger).
|
Package app wires together wa-cli's shared dependencies (config, logger). |
|
chatstore
Package chatstore persists a local index of WhatsApp chats (JID, name, last message preview/time, unread count) so `wa chat` commands have something to read across separate CLI invocations, without needing an always-on connection.
|
Package chatstore persists a local index of WhatsApp chats (JID, name, last message preview/time, unread count) so `wa chat` commands have something to read across separate CLI invocations, without needing an always-on connection. |
|
cli
Package cli is a small, dependency-free command router that mimics the parts of Cobra's UX wa-cli needs (Use/Short/Long, --help, subcommands).
|
Package cli is a small, dependency-free command router that mimics the parts of Cobra's UX wa-cli needs (Use/Short/Long, --help, subcommands). |
|
config
Package config loads and saves wa-cli's user configuration.
|
Package config loads and saves wa-cli's user configuration. |
|
errors
Package errors provides wa-cli's shared error types and sentinels.
|
Package errors provides wa-cli's shared error types and sentinels. |
|
extension
Package extension implements wa-cli's plugin system.
|
Package extension implements wa-cli's plugin system. |
|
logger
Package logger configures wa-cli's structured logger.
|
Package logger configures wa-cli's structured logger. |
|
msgstore
Package msgstore persists a rolling window of recent messages per chat, so `wa chat open` can show numbered history and `wa chat reply`/ `wa chat forward` can reference a specific message by that number or by its raw WhatsApp message ID.
|
Package msgstore persists a rolling window of recent messages per chat, so `wa chat open` can show numbered history and `wa chat reply`/ `wa chat forward` can reference a specific message by that number or by its raw WhatsApp message ID. |
|
notify
Package notify sends OS desktop notifications for incoming WhatsApp messages.
|
Package notify sends OS desktop notifications for incoming WhatsApp messages. |
|
qr
Package qr renders WhatsApp pairing codes as ASCII QR codes for the terminal.
|
Package qr renders WhatsApp pairing codes as ASCII QR codes for the terminal. |
|
ratelimit
Package ratelimit enforces send-rate limits for wa-cli, persisted to disk so the limits hold across separate CLI invocations (each `wa` run is a short-lived process, so an in-memory-only limiter would reset every time).
|
Package ratelimit enforces send-rate limits for wa-cli, persisted to disk so the limits hold across separate CLI invocations (each `wa` run is a short-lived process, so an in-memory-only limiter would reset every time). |
|
safety
Package safety provides lightweight guardrails around outbound sending so wa-cli behaves like a normal personal WhatsApp client rather than a bulk-messaging tool.
|
Package safety provides lightweight guardrails around outbound sending so wa-cli behaves like a normal personal WhatsApp client rather than a bulk-messaging tool. |
|
store
Package store manages wa-cli's local WhatsApp session/device data, backed by whatsmeow's SQLite device store.
|
Package store manages wa-cli's local WhatsApp session/device data, backed by whatsmeow's SQLite device store. |
|
tui
Package tui implements wa-cli's full-screen terminal interface, launched by running `wa` with no subcommand.
|
Package tui implements wa-cli's full-screen terminal interface, launched by running `wa` with no subcommand. |
|
version
Package version exposes build-time metadata for wa-cli.
|
Package version exposes build-time metadata for wa-cli. |
|
whatsapp
Package whatsapp wraps go.mau.fi/whatsmeow with a smaller, wa-cli-shaped API (Client.ListChats, SendImage, GroupInfo, and so on) rather than leaking whatsmeow's types everywhere.
|
Package whatsapp wraps go.mau.fi/whatsmeow with a smaller, wa-cli-shaped API (Client.ListChats, SendImage, GroupInfo, and so on) rather than leaking whatsmeow's types everywhere. |
Click to show internal directories.
Click to hide internal directories.