Skip to main content

whatsapp-cli

[Disclaimer] This is not a usable solution. I will not be able to provide any support.

Limitations

  • You cannot initiate chat with users from whom you have not received a notification in the recent past. This is a pushbullet limitation as it uses reply to notification to send messages. I need to explore on using whatsapp web instead of pushbullet.

Requirements

  • This CLI uses Pushbullet APIs to receive and send messages.

  • Pushbullet App must be installed on your phone.

  • Pushbullet API token can be generated from here

  • You must be getting whatsapp notifications on your device for this to work.

  • To be able to send messages you need to receive at least one message after starting the application for seeding the conf (default location ~/.whatsapp-cli/conf).

Tested with python2.7

Installation

pip install whatsapp-cli

Usage

Interactive (Curses) Mode -

Usage: whatsapp-cli [OPTIONS]

Options:
  --token TEXT  Pushbullet API token  [required]
  --dir TEXT    data directory (default is ~/.whatsapp-cli)
  --help        Show this message and exit.


Command Line Mode -

Usage: whatsapp-cli [OPTIONS] COMMAND [ARGS]...

Options:
  --token TEXT  Pushbullet API token  [required]
  --help        Show this message and exit.

Commands:
  add    Add a contact
  read   Read messages from a person/group
  send   Send message to a person/group
  users  List all contacts

Commands Reference

Usage: whatsapp-cli add [OPTIONS]

  Add a contact

Options:
  -u TEXT  Name of the person/group as it appears in your contacts  [required]
  -m TEXT  12 digit mobile number  [required]
  --help   Show this message and exit.


Usage: whatsapp-cli read [OPTIONS]

  Read messages from a person/group

Options:
  -u TEXT  Name of the person/group. Partial names are allowed
  --help   Show this message and exit.


Usage: whatsapp-cli send [OPTIONS]

  Send message to a person/group

Options:
  -u TEXT  Name of the person/group or 12 digit mobile number. Partial names
		   are allowed  [required]
  -m TEXT  Message to be sent  [required]
  --help   Show this message and exit.


Usage: whatsapp-cli users [OPTIONS]

  List all contacts

Options:
  --help  Show this message and exit.

Release files for whatsapp-cli 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for whatsapp-cli 0.1.3
File Interpreter ABI Platform
whatsapp_cli-0.1.3-py2-none-any.whl Python 2 none any Details

Release files / whatsapp_cli-0.1.3-py2-none-any.whl

Download URL whatsapp_cli-0.1.3-py2-none-any.whl
Size 12.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
091da368031d45eb068b5559293b4cfbe43b39290123222b594bbe60353b4bd1
BLAKE2b-256 checksum
How to use checksums
214e838f9659139083b5a8aa83b52fed802bcd6ff0933c9a90f5de5fdce5ba95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.12

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page