# 🦞 CLAWDIS β€” WhatsApp Gateway for AI Agents

CLAWDIS

EXFOLIATE! EXFOLIATE!

CI status npm version MIT License

**CLAWDIS** (formerly Warelay) is a WhatsApp-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 β”‚ β”‚ (You) β”‚ ◀─── β”‚ πŸ¦žβ±οΈπŸ’™ β”‚ ◀─── β”‚ (Pi/Tau) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` ## 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) - πŸ€– **AI Agent Gateway** β€” Pi/Tau only (Pi CLI in RPC mode) - πŸ’¬ **Session Management** β€” Per-sender conversation context - πŸ”” **Heartbeats** β€” Periodic check-ins for proactive AI - πŸ‘₯ **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/Tau CLI is supported now; legacy Claude/Codex/Gemini paths have been removed. ## Quick Start ```bash # Install npm install -g warelay # (still warelay on npm for now) # 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 relay clawdis relay --verbose ``` ## macOS Companion App (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. - **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. 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`. ## Configuration Create `~/.clawdis/clawdis.json`: ```json5 { inbound: { allowFrom: ["+1234567890"], reply: { mode: "command", command: ["tau", "--mode", "json", "{{BodyStripped}}"], session: { scope: "per-sender", idleMinutes: 1440 }, heartbeatMinutes: 10 } } } ``` ## Documentation - [Configuration Guide](./docs/configuration.md) - [Agent Integration](./docs/agents.md) - [Group Chats](./docs/group-messages.md) - [Security](./docs/security.md) - [Troubleshooting](./docs/troubleshooting.md) - [The Lore](./docs/lore.md) 🦞 ## Clawd CLAWDIS was built for **Clawd**, a space lobster AI assistant. See the full setup in [`docs/clawd.md`](./docs/clawd.md). - 🦞 **Clawd's Home:** [clawd.me](https://clawd.me) - πŸ“œ **Clawd's Soul:** [soul.md](https://soul.md) - πŸ‘¨β€πŸ’» **Peter's Blog:** [steipete.me](https://steipete.me) - 🐦 **Twitter:** [@steipete](https://twitter.com/steipete) ## Provider ### WhatsApp Web ```bash clawdis login # Scan QR code clawdis relay # Start listening ``` ## Commands | Command | Description | |---------|-------------| | `clawdis login` | Link WhatsApp Web via QR | | `clawdis send` | Send a message | | `clawdis agent` | Talk directly to the agent (no WhatsApp send) | | `clawdis relay` | Start auto-reply loop | | `clawdis status` | Show recent messages | | `clawdis heartbeat` | Trigger a heartbeat | ### Sessions, surfaces, and WebChat - Direct chats now share a canonical session key `main` by default (configurable via `inbound.reply.session.mainKey`). Groups stay isolated as `group:`. - WebChat always attaches to the `main` session and hydrates the full Tau history from `~/.clawdis/sessions/.jsonl`, so desktop view mirrors WhatsApp/Telegram turns. - Inbound contexts carry a `Surface` hint (e.g., `whatsapp`, `webchat`, `telegram`) for logging; replies still go back to the originating surface deterministically. ## Credits - **Peter Steinberger** ([@steipete](https://twitter.com/steipete)) β€” Creator - **Mario Zechner** ([@badlogicgames](https://twitter.com/badlogicgames)) β€” Tau/Pi, security testing - **Clawd** 🦞 β€” The space lobster who demanded a better name ## License MIT β€” Free as a lobster in the ocean. --- *"We're all just playing with our own prompts."* πŸ¦žπŸ’™