A terminal-based WhatsApp client written in Rust, providing a fast and efficient way to use WhatsApp from the command line.
- Full WhatsApp messaging support
- Multi-pane interface for viewing multiple chats simultaneously
- Modern TUI with keyboard shortcuts
- Smart chat filtering (removes duplicate and junk chats)
- Automatic reaction filtering in group chats
- Contact name resolution from WhatsApp database
- Background message syncing
- Message history with proper sender names
- Rust (latest stable version)
- whatsapp-cli - The underlying WhatsApp client
# Install Go if you don't have it
brew install go # macOS
# or
apt install golang # Linux
# Install whatsapp-cli
go install github.com/tulir/whatsmeow/mdtest@latest
# The binary will be in ~/go/bin/mdtest
# You may want to add ~/go/bin to your PATH
export PATH=$PATH:~/go/bin- Clone the repository:
git clone https://github.com/oovets/whatsapp_rust.git
cd whatsapp_rust- Build the project:
cargo build --releaseThe binary will be available at target/release/whatsapp_client_rs
Before using the client, you need to authenticate with WhatsApp:
# Create a store directory for WhatsApp data
mkdir -p ~/.config/whatsapp_client_rs/store
# Authenticate (this will show a QR code)
mdtest --store ~/.config/whatsapp_client_rs/store authScan the QR code with your phone (WhatsApp → Settings → Linked Devices → Link a Device)
After authentication, sync your messages:
# Run sync to download your chats and messages
mdtest --store ~/.config/whatsapp_client_rs/store syncThis will download your chat history. Let it run for a few minutes to get your recent messages.
Press Ctrl+C when you see messages being synced.
# Run the client
cargo run --release
# Or if you've installed it:
./target/release/whatsapp_client_rsThe client looks for whatsapp-cli (mdtest) in these locations:
~/go/bin/mdtest/usr/local/bin/mdtest/usr/bin/mdtestmdtestin PATH
Store location: ~/.config/whatsapp_client_rs/store/
Tab/Shift+Tab- Switch between chat list and message panes↑/↓- Navigate chats or messagesEnter- Open selected chatEsc- Return to chat list
Ctrl+N- Create new pane (split view)Ctrl+W- Close current paneCtrl+→/Ctrl+←- Switch between panes
- Type and press
Enter- Send message Ctrl+C- Copy selected messageCtrl+V- Paste
Ctrl+R- Refresh chat listCtrl+Q- Quit application?- Show help
The chat list is organized into three sections:
- Unread - Chats with unread messages
- Active - Currently open chats
- Other - All other chats
The client automatically filters out:
- Duplicate chats (e.g., same contact with different JID formats)
- Junk chats with raw JIDs as names
- Legacy @lid chats when @s.whatsapp.net version exists
In group chats, reaction messages (messages with only {{...}}) are automatically filtered out to keep the conversation clean.
The client reads contact names from the WhatsApp database, showing real names instead of phone numbers.
- whatsapp.rs - WhatsApp client wrapper, handles communication with whatsapp-cli and direct SQLite database access
- app.rs - Main application state and UI rendering
- commands.rs - Command handling and execution
- widgets.rs - Custom TUI widgets
- split_view.rs - Multi-pane layout management
- Authentication: Uses
whatsapp-clifor QR code authentication - Message Retrieval:
- Group chats: Direct SQLite database access for reliability
- Individual chats: Uses
whatsapp-cli messages list
- Contact Resolution: Reads from
whatsapp.dbcontacts table - Background Sync: Runs
whatsapp-cli syncin background to keep messages updated
Run sync manually:
mdtest --store ~/.config/whatsapp_client_rs/store syncLet it run for a few minutes, then restart the client.
The client reads directly from the SQLite database. Make sure sync has run at least once.
Remove the store and re-authenticate:
rm -rf ~/.config/whatsapp_client_rs/store
mdtest --store ~/.config/whatsapp_client_rs/store authLogs are written to ~/.config/whatsapp_client_rs/debug.log
tail -f ~/.config/whatsapp_client_rs/debug.logcargo buildcargo runcargo build --releaseratatui- Terminal UI frameworkcrossterm- Terminal manipulationtokio- Async runtimeserde/serde_json- JSON serializationrusqlite- SQLite database accesschrono- Date/time handling
- Media download not yet implemented
- Message editing limited by whatsapp-cli capabilities
- No voice message support
- Group admin functions not available
MIT
Contributions are welcome! Please feel free to submit a Pull Request.