wakit
Integrations

CLI

Manage WhatsApp from your terminal with the wakit CLI.

The wakit CLI lets you send messages, view conversations, search contacts, and manage WhatsApp templates directly from your terminal.

Install

npm install -g wakit-cli

Or use without installing:

npx wakit-cli init

Setup

wakit init

The setup wizard will ask for:

  1. Base URL — your wakit instance URL (default: https://api.wakit.ai)
  2. API Key — create one in the wakit dashboard at Settings > API Keys
  3. Default account — which WhatsApp number to send from

Config is saved to ~/.wakit/config.json.

Commands

Health

Check Meta API token status for all connected WhatsApp accounts:

wakit health
  wakit health

  ✓ Mirlo (5215588392274)
    Quality: GREEN  |  Messaging limit: TIER_10K

  ✗ Mirlo (15550405258)
    Error: Session has expired ← CHECK TOKEN

Status

Check your connection and configured accounts:

wakit status
  wakit status

  Base URL:  https://api.wakit.ai
  Account:   Mirlo (5215588392274)
  API Key:   sk_c74f...8677
  Connected: 2 numbers
    • Mirlo (15550405258)
    • Mirlo (5215588392274) (default)

Conversations

List recent conversations with a preview of the last message:

wakit conversations
wakit conversations --limit 5
  Mirlo (5215588392274)

  German Zuccoli (2 new)
    ← Qué tal?  Saturday

  Maria Garcia
    → Hola Maria!  10:31

Chat

View the full conversation with a contact by phone number or name:

wakit chat 5215551234567
wakit chat Mauro
wakit chat 5215551234567 --limit 100

If the name matches multiple contacts, the CLI will show the options.

  Maria Garcia (5215551234567)
  Service window: open

  10:30 ← Hola, necesito ayuda
  10:31 → Hola Maria! En qué te puedo ayudar? (read)

Send messages

Send a text message (by phone or name):

wakit send 5215551234567 "Hello from the CLI!"
wakit send Mauro "Hola Mauro!"

Send a template message:

wakit send 5215551234567 --template welcome_message
wakit send 5215551234567 --template order_update --vars "Juan,#12345,mañana"
wakit send 5215551234567 --template welcome --lang en --vars "John"

The CLI automatically detects named template parameters and maps --vars accordingly. If the service window is closed, it will suggest sending a template instead.

Contacts

List all contacts or search by name or phone number:

wakit contacts                    # list all
wakit contacts "Maria"            # search by name
wakit contacts 521555             # search by number

Templates

List available WhatsApp message templates:

wakit templates
  NAME                          STATUS      CATEGORY        LANG
  ──────────────────────────────────────────────────────────────────────
  hello_world                   APPROVED    UTILITY         es
  order_confirmation            APPROVED    UTILITY         es
  welcome_message               APPROVED    MARKETING       es

Switch account

If your organization has multiple WhatsApp numbers:

wakit switch 2                    # by index
wakit switch 5215550405258        # by phone number

Or override for a single command:

wakit send 5215551234567 "Hello" --from 5215550405258

JSON output

All commands support --json for machine-readable output, useful for scripting or piping to other tools:

wakit conversations --json | jq '.conversations[0].contact.name'
wakit chat 5215551234567 --json > context.json

Source code

The CLI is open-source and ships with the wakit project: github.com/matiasbattocchia/wakit-api/tree/main/cli

npm: wakit-cli

On this page