whats-cli

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: GPL-3.0 Imports: 36 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

 __       __  __                   __                 ______   __  __ 
│  ╲  _  │  ╲│  ╲                 │  ╲               ╱      ╲ │  ╲│  ╲
│ $$ ╱ ╲ │ $$│ $$____    ______  _│ $$_     _______ │  $$$$$$╲│ $$ ╲$$
│ $$╱  $╲│ $$│ $$    ╲  │      ╲│   $$ ╲   ╱       ╲│ $$   ╲$$│ $$│  ╲
│ $$  $$$╲ $$│ $$$$$$$╲  ╲$$$$$$╲╲$$$$$$  │  $$$$$$$│ $$      │ $$│ $$
│ $$ $$╲$$╲$$│ $$  │ $$ ╱      $$ │ $$ __  ╲$$    ╲ │ $$   __ │ $$│ $$
│ $$$$  ╲$$$$│ $$  │ $$│  $$$$$$$ │ $$│  ╲ _╲$$$$$$╲│ $$__╱  ╲│ $$│ $$
│ $$$    ╲$$$│ $$  │ $$ ╲$$    $$  ╲$$  $$│       $$ ╲$$    $$│ $$│ $$
 ╲$$      ╲$$ ╲$$   ╲$$  ╲$$$$$$$   ╲$$$$  ╲$$$$$$$   ╲$$$$$$  ╲$$ ╲$$

A command-line WhatsApp client written in Go and highly riceable with Lua scripts


Screenshots Mural

A visual mural of all screenshots in the screenshots folder.

default
default UI
different_default
default UI with custom colors
different_old
old school UI with custom colors
discord_like
Discord like UI
old
old school UI with default colors
tower
weird tower UI

Features

  • Sending messages (Text, Audio, Images, Video, etc)
  • Opening Media (uses the default application)
  • Forwarding, Deleting, Replying messages
  • Custom keybinding for native functionality
  • Custom keybinding with custom functionality
  • Custom rendering of messages for personalised UI
  • Custom hooks run on message received

Installation Guide

Prerequisites

Released binaries have no external service dependency. Building from source requires Go 1.25 or newer; Go will select the required toolchain automatically.


Download the Latest Binary

Go to the Releases page and download the binary for your OS:

  • Linux: whats-cli-linux-***
  • macOS: whats-cli-darwin-***
  • Windows: whats-cli-windows-***.exe

whats-cli embeds whatsmeow and connects directly to WhatsApp. No HTTP backend, Docker container, webhook, Node.js process, or browser is required.

On the first run:

  1. Start whats-cli.
  2. Open WhatsApp on your phone.
  3. Go to Settings > Linked devices > Link a device.
  4. Scan the QR code shown in the terminal.

The linked-device session and synchronized chat history are restored automatically on later runs. Data is stored in the operating system's user configuration directory:

  • Linux: $XDG_CONFIG_HOME/whats-cli, or ~/.config/whats-cli
  • macOS: ~/Library/Application Support/whats-cli
  • Windows: %AppData%\\whats-cli

session.db contains the linked-device credentials. history.db contains the chats and messages received through WhatsApp history sync and live events. Keep both private. Delete session.db only when you intentionally want to link the application again.

If the device was linked before local chat-history persistence was available, run whats-cli --relink once. This explicitly clears the old linked session and local history, shows a new QR code, and imports the recent conversation list from WhatsApp's initial history sync.


Running whats-cli

  1. Rename the binary (optional):

    mv whats-cli-linux-amd64 whats-cli
    
  2. Make the binary executable (Linux/macOS):

    chmod +x whats-cli
    
  3. Run whats-cli:

    ./whats-cli
    

Configuration

Configuration is loaded from ./lua/init.lua and ./lua/colors.lua when a lua directory exists in the current working directory. This makes the repository's lua directory work with go run .. Otherwise, whats-cli uses the lua directory beside the executable and creates default scripts there when needed. Information on configuration is available in the docs.

The repository's default Lua configuration follows BitchX's non-HUMBLE defaults from include/color.h: blue incoming and magenta outgoing public-message brackets, private-message labels, the standard 16-color ANSI palette, white-on-blue STATUS_FORMAT/STATUS_FORMAT2 lines, the [$C] input prompt, and the exact /WINDOW LIST column layout adapted to WhatsApp chats.

Tips

Insert media:

To anex media to your message type either media:"/path/to/media" or media:clipboard (to paste clipboard)

Default message interaction binds:

  • m-> Opens selected message's media
  • r-> Quotes the selected message
  • f-> Fowards the selected message
  • d-> Deletes the selected message

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址