Skip to content

asimov-modules/asimov-whatsapp-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

ASIMOV WhatsApp Module

License Package on Crates.io Documentation

ASIMOV module for WhatsApp. Data import for WhatsApp account!

✨ Features

  • To be determined!

πŸ› οΈ Prerequisites

  • Rust 1.85+ (2024 edition) if building from source code

⬇️ Installation

Installation with the ASIMOV CLI

asimov module install whatsapp -v

Installation from Source Code

cargo install asimov-whatsapp-module

πŸ‘‰ Examples

asimov-whatsapp-authorizer - authorize WhatsApp account via QR code or pair code (phone number).

Check status:

asimov-whatsapp-authorizer --status

Reset local DB:

asimov-whatsapp-authorizer --reset

Authorize via QR code:Authorize via QR code:

asimov-whatsapp-authorizer

Authorize via pair code (phone number):

asimov-whatsapp-authorizer --phone 15551234567

asimov-whatsapp-cataloger - list all WhatsApp groups and members.

List all groups:

asimov-whatsapp-cataloger wa:groups

List members of a group:

asimov-whatsapp-cataloger wa:group/<GROUP_JID>/members

asimov-whatsapp-fetcher - fetch WhatsApp contacts and groups metadata.

Fetch group metadata:

asimov-whatsapp-fetcher wa:group/<GROUP_JID>

Fetch contact by phone number:

asimov-whatsapp-fetcher wa:contact/<PHONE_DIGITS>

Fetch contact by JID (LID or phone JID):

asimov-whatsapp-fetcher wa:contact-jid/<JID>

asimov-whatsapp-emitter - stream incoming WhatsApp messages to STDOUT as JSONL.

By default emits only inbound (messages sent to you). Use --outbound to also include outbound (messages sent by you). By default emits a minimal JSON shape for text-like messages only. Use --full to emit the full raw payload.

Examples:

Minimal (inbound only):

asimov-whatsapp-emitter | jq .

Minimal + include outbound:

asimov-whatsapp-emitter --outbound | jq .

Full payload (message + message_info):

asimov-whatsapp-emitter --full | jq .

βš™ Configuration

All scripts read the database path from WA_DB.

export WA_DB="$PWD/whatsapp.db"

πŸ“š Reference

Installed Binaries

  • asimov-whatsapp-authorizer
  • asimov-whatsapp-cataloger
  • asimov-whatsapp-emitter
  • asimov-whatsapp-fetcher

asimov-whatsapp-authorizer

asimov-whatsapp-authorizer

Usage: asimov-whatsapp-authorizer [OPTIONS]

Options:
  -d, --debug              Enable debugging output
      --license            Show license information
  -v, --verbose...         Enable verbose output (may be repeated for more verbosity)
  -V, --version            Print version information
      --db <PATH>          Path to the SQLite DB. If omitted, uses WA_DB env var
  -p, --phone <PHONE>      If set, authorizes via Pair Code (instead of QR)
      --timeout <TIMEOUT>  Login wait timeout in seconds [default: 180]
      --reset              Delete the DB file (if it exists) and exit
      --status             Print DB path + whether it exists, then exit
  -h, --help               Print help

asimov-whatsapp-cataloger

asimov-whatsapp-cataloger

Usage: asimov-whatsapp-cataloger [OPTIONS] <RESOURCE>

Arguments:
  <RESOURCE>  Resource URL (e.g. wa:groups, wa:group/<jid>/members)

Options:
  -d, --debug              Enable debugging output
      --license            Show license information
  -v, --verbose...         Enable verbose output (may be repeated for more verbosity)
  -V, --version            Print version information
      --db <PATH>          Path to the SQLite DB. If omitted, uses WA_DB env var
  -n, --limit <COUNT>      Maximum number of items to output
      --timeout <TIMEOUT>  Connection wait timeout in seconds [default: 30]
  -h, --help               Print help

asimov-whatsapp-emitter

asimov-whatsapp-emitter

Usage: asimov-whatsapp-emitter [OPTIONS]

Options:
  -d, --debug              Enable debugging output
      --license            Show license information
  -v, --verbose...         Enable verbose output (may be repeated for more verbosity)
  -V, --version            Print version information
      --db <PATH>          Path to the SQLite DB. If omitted, uses WA_DB env var
      --full               Print full payload (message + message_info) instead of minimal shape
      --outbound           Include outbound (messages from me). Inbound is always included
      --timeout <TIMEOUT>  Connection wait timeout in seconds [default: 30]
  -h, --help               Print help

asimov-whatsapp-emitter

asimov-whatsapp-fetcher

Usage: asimov-whatsapp-fetcher [OPTIONS] <RESOURCE>

Arguments:
  <RESOURCE>  Resource URL (e.g. wa:group/<jid>, wa:contact/<digits>, wa:contact-jid/<jid>)

Options:
  -d, --debug              Enable debugging output
      --license            Show license information
  -v, --verbose...         Enable verbose output (may be repeated for more verbosity)
  -V, --version            Print version information
      --db <PATH>          Path to the SQLite DB. If omitted, uses WA_DB env var
      --timeout <TIMEOUT>  Connection wait timeout in seconds [default: 30]
  -h, --help               Print help

πŸ‘¨β€πŸ’» Development

git clone https://github.com/asimov-modules/asimov-whatsapp-module.git

Share on X Share on Reddit Share on Hacker News Share on Facebook Share on LinkedIn

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors