# π¦ CLAWDIS β WhatsApp & Telegram Gateway for AI Agents
EXFOLIATE! EXFOLIATE!
**CLAWDIS** is a WhatsApp- and Telegram-to-AI gateway. Send a message, get an AI response. It's like having a genius lobster in your pocket 24/7.
```
βββββββββββββββ ββββββββββββ βββββββββββββββ
β WhatsApp β ββββΆ β CLAWDIS β ββββΆ β AI Agent β
β Telegram β ββββΆ β π¦β±οΈπ β ββββ β (Pi) β
β (You) β ββββ β β β β
βββββββββββββββ ββββββββββββ βββββββββββββββ
```
## Why "CLAWDIS"?
**CLAWDIS** = CLAW + TARDIS
Because every space lobster needs a time-and-space machine. The Doctor has a TARDIS. [Clawd](https://clawd.me) has a CLAWDIS. Both are blue. Both are chaotic. Both are loved.
## Features
- π± **WhatsApp Integration** β Personal WhatsApp Web (Baileys)
- βοΈ **Telegram (Bot API)** β DMs and groups via grammY
- π€ **AI Agent Gateway** β Pi only (Pi CLI in RPC mode)
- π¬ **Session Management** β Per-sender conversation context
- π **Heartbeats** β Periodic check-ins for proactive AI
- π§ **Clawd Browser** β Dedicated Chrome/Chromium profile with tabs + screenshot control (no interference with your daily browser)
- π₯ **Group Chat Support** β Mention-based triggering
- π **Media Support** β Images, audio, documents, voice notes
- π€ **Voice Transcription** β Whisper integration
- π§ **Tool Streaming** β Real-time display (π»πβοΈπ)
- π₯οΈ **macOS Companion (Clawdis.app)** β Menu bar controls, on-device Voice Wake, model/config editor
Only the Pi CLI is supported now; legacy Claude/Codex/Gemini paths have been removed.
## Quick Start
Mac signing tip: set `SIGN_IDENTITY="Apple Development: Your Name (TEAMID)"` in your shell profile so `scripts/restart-mac.sh` signs with your cert (defaults to ad-hoc). Debug bundle ID remains `com.steipete.clawdis.debug`.
Runtime requirement: **Node β₯22.0.0** (not bundled). The macOS app and CLI both use the host runtime; install via Homebrew or official installers before running `clawdis`.
```bash
# Install
npm install -g clawdis
# Link your WhatsApp
clawdis login
# Send a message
clawdis send --to +1234567890 --message "Hello from the CLAWDIS!"
# Talk directly to the agent (no WhatsApp send)
clawdis agent --to +1234567890 --message "Ship checklist" --thinking high
# Start the gateway (WebSocket control plane)
clawdis gateway --port 18789 --verbose
# If the port is busy, force-kill listeners then start
clawdis gateway --force
```
## Companion Apps
### macOS Companion (Clawdis.app)
- **On-device Voice Wake:** listens for wake words (e.g. βClaudeβ) using Appleβs on-device speech recognizer (macOS 26+). macOS still shows the standard Speech/Mic permissions prompt, but audio stays on device.
- **Push-to-talk (Right Option hold):** hold right Option to speak; the voice overlay shows live partials and sends when you release.
- **Config tab:** pick the model from your local Pi model catalog (`pi-mono/packages/ai/src/models.generated.ts`), or enter a custom model ID; edit session store path and context tokens.
- **Voice settings:** language + additional languages, mic picker, live level meter, trigger-word table, and a built-in test harness.
- **Menu bar toggle:** enable/disable Voice Wake from the menu bar; respects Dock-icon preference.
### Voice Wake reply routing
Voice Wake sends messages into the `main` session and replies on the **last used surface**:
- WhatsApp: last direct message you sent/received.
- Telegram: last DM chat id (bot mode).
- WebChat: last WebChat thread you used.
If delivery fails (e.g. WhatsApp disconnected / Telegram token missing), Clawdis logs the error and you can still inspect the run via WebChat/session logs.
Build/run the mac app with `./scripts/restart-mac.sh` (packages, installs, and launches), or `swift build --package-path apps/macos && open dist/Clawdis.app`.
### iOS Node (Iris) (internal)
Iris is an internal/prototype iOS app that connects as a **remote node**:
- **Voice trigger:** forwards transcripts into the Gateway `agent` method.
- **Canvas screen:** a WKWebView + `