MessengersWhatsApp

WhatsApp CLI commands

Find every WhatsApp CLI command, option and exit code in the generated reference.

Choose the reference for your task. Start with First tasks if you're getting acquainted; use this reference for exact commands, arguments and options. First tasks →

Find a command by name

How commands work

wa [profile] [options] <resource> <action> [arguments]
  • Resource first, then the action. The resource is what you work with: chats, messages, contacts. The action is what you do with it: list, show, send.
  • Name the profile as the first word: wa work chats list lists the chats of profile work. No profile is ever assumed: a command that needs an account and gets none from the first word or WA_PROFILE stops and lists your profiles, even when there is only one.
  • Global options work with every command: --json for scripts and agents, --dry-run to check a command without running it, --offline to answer from the local copy only.
  • A command that changes something is marked in the reference: “Changes something in WhatsApp” changes data in the messenger, “Changes something on this computer only” changes only files on this computer.
  • Permission levels can make a write ask for confirmation first. --yes gives that confirmation in advance.
  • Each reference ends with the exit codes. wa commands lists every command by section and marks the ones that change something. Options are in wa commands --json and wa <command> --help.
  • The shared reference includes paths WhatsApp cannot run. Those commands stop with exit code 2 before any account action; check the personal-account guide’s current limitations.

Profiles →Permissions →CLI contract →Current limitations →

Full reference in Markdown →