--- type: overview title: Quickstart description: What the wh WhatsApp terminal client with per-chat AI autoreply does, how to build and run it, and where to find each topic in this wiki. tags: [overview, quickstart, rust, whatsapp, tui, ai] verified: - by: openwiki/0.7.2 at: 2026-10-19T18:58:46.219Z sources: - id: openwiki-source-651d1fb6c9e49916a916ab51 resource: repo://Cargo.toml - id: openwiki-source-2a737474d86fc75cc9d9694f resource: repo://src/config.rs - id: openwiki-source-b55a21a31ede1b56cd31a6a6 resource: repo://src/main.rs generated: { by: "claude-code", at: "2026-10-19T18:58:46.219Z" } --- # Quickstart `wh` (`Cargo.toml:1-5`) is a Rust terminal client for WhatsApp. It links as a companion device by QR code, shows chats and contacts in a [ratatui](architecture/terminal-ui.md) interface, stores messages locally in SQLite and can answer incoming private messages automatically with an OpenAI-compatible model, chat by chat. ## Build and run ```sh cargo build --release cargo run --release cargo test ``` The crate uses edition 2024. `whatsapp-rust` is built with `default-features = false` because its default `simd` feature needs nightly (`Cargo.toml:8-10`). On first start the app shows a QR code: scan it from WhatsApp → *Linked devices*. The session is kept in `session.db`, so later starts connect directly. Main keys: `Tab` switches list/input, `F2` chats/contacts, `Enter` opens a chat or sends, `Ctrl+A` toggles autoreply for the open chat, `Ctrl+C` quits ([key bindings](architecture/app-state.md)). ## Configuration in short Settings live in `config.toml` inside the data directory `/wh` (on Windows `%APPDATA%\wh`), next to `session.db` and `history.db` (`src/config.rs:23-43`, `src/config.rs:106-110`). Without the file the app still runs as a plain WhatsApp client; the autoreply needs `openai_api_key` and `system_prompt`. Keys and defaults: [Configuration and data](operations/configuration-and-data.md). ## Startup in one line `main` loads the config, opens the history, starts the WhatsApp client and an input thread, then runs the draw/receive loop until quit (`src/main.rs:28-51`, see [Runtime and event loop](architecture/runtime-and-event-loop.md)). ## Where to look | Task | Page | Source | |---|---|---| | Startup, channels, threads, main loop | [Runtime and event loop](architecture/runtime-and-event-loop.md) | `src/main.rs` | | Events, state, keys, background tasks | [Application state](architecture/app-state.md) | `src/app.rs` | | Screens, rendering, message formatting | [Terminal UI](architecture/terminal-ui.md) | `src/ui.rs` | | WhatsApp session, events, JIDs, media | [WhatsApp client](integrations/whatsapp-client.md) | `src/whatsapp.rs` | | AI HTTP requests, vision, errors | [AI client](integrations/ai-client.md) | `src/ai.rs` | | When and how the AI replies | [AI auto-reply workflow](workflows/ai-autoreply.md) | `src/autoreply.rs`, `src/app.rs` | | Local SQLite messages, chats, contacts | [History store](concepts/history-store.md) | `src/history.rs` | | Config keys, data dir, security notes | [Configuration and data](operations/configuration-and-data.md) | `src/config.rs` | | Test suites and how to run them | [Unit tests](testing/unit-tests.md) | `src/*.rs` |