Bridge instant messaging platforms (Telegram, WhatsApp, Viber) to Claude Code CLI sessions. Code from your phone by chatting with a bot that relays messages to Claude Code.
- Node.js >= 18
- Claude Code CLI installed and available in PATH (or specify a custom path)
- Bot tokens for the platforms you want to use (see Platform Setup below)
git clone <repo-url>
cd create-anywhere
npm installCopy .env.example to .env and fill in the tokens (.env is gitignored):
# Required for Telegram
TELEGRAM_BOT_TOKEN=your-telegram-bot-token
# Required for Viber
VIBER_BOT_TOKEN=your-viber-auth-token
VIBER_BOT_NAME=YourBotName
VIBER_BOT_AVATAR=https://example.com/avatar.png
VIBER_WEBHOOK_URL=https://your-server.com/viber
# Optional
CLAUDE_CODE_PATH=claude # path to Claude Code CLI binary
LOG_LEVEL=info # fatal, error, warn, info, debug, traceCopy config/default.example.json to config/default.json (gitignored — the bot writes runtime changes back to it), then edit it to enable platforms, set session limits, define projects, and configure user allowlists:
{
"telegram": { "enabled": true },
"whatsapp": { "enabled": false },
"viber": { "enabled": false, "webhookPort": 8080 },
"session": {
"maxConcurrent": 5,
"idleTimeoutMs": 300000,
"maxSessionDurationMs": 3600000
},
"logging": { "level": "info" },
"projects": {
"my-api": "/absolute/path/to/my-api",
"website": "/absolute/path/to/website"
},
"allowlist": {
"telegram": ["123456789"],
"whatsapp": [],
"viber": []
},
"defaultAutoApprove": false
}- projects: Map of project identifiers to absolute directory paths on disk.
- allowlist: Per-platform user ID allowlists. If empty, all users are allowed.
⚠️ Security: the bot runs Claude Code on your machine. Always set an allowlist, and never combine an empty allowlist withdefaultAutoApprove: true— that would let anyone who finds your bot execute commands on your computer.
- defaultAutoApprove: Whether new sessions start with
--dangerously-skip-permissions.
- Open Telegram and message @BotFather.
- Send
/newbotand follow the prompts to create a bot. - Copy the bot token and set it as
TELEGRAM_BOT_TOKENin your.env. - Set
"telegram": { "enabled": true }inconfig/default.json.
- WhatsApp uses @whiskeysockets/baileys for connection.
- Set
"whatsapp": { "enabled": true }in config. - On first start, scan the QR code printed in the terminal with WhatsApp on your phone.
- Auth state is saved in
auth_info_baileys/for subsequent connections.
- Go to the Viber Admin Panel and create a bot account.
- Copy the auth token.
- Set the environment variables:
VIBER_BOT_TOKEN,VIBER_BOT_NAME,VIBER_WEBHOOK_URL. - Set
"viber": { "enabled": true, "webhookPort": 8080 }in config. - Ensure the webhook URL is publicly accessible (use ngrok for local development).
# Development (with hot reload via tsx)
npm run dev
# Production
npm run build
npm start
# Run tests
npm test
# Type check
npm run typecheckOnce the bot is running, interact with it from any enabled IM platform:
| Command | Description |
|---|---|
/help |
Show available commands |
/projects |
List configured projects |
/new <id> [path] |
Create a new project and start a session |
/open <id> |
Open a session for an existing project |
/stop [id] |
Stop the current or a specific session |
/switch <id> |
Switch the active session to another project |
/sessions |
List your active sessions |
/autoapprove on|off |
Toggle auto-approve for tool calls |
/status |
Show current session info |
/reset |
Stop all your sessions |
Any non-command text message in a chat with an active session is forwarded to Claude Code.
You: /open my-api
Bot: Session opened for "my-api". Send your instructions.
You: Add a health check endpoint that returns { status: "ok" }
Bot: I've added a GET /health endpoint to src/index.ts that returns...
You: /status
Bot: Project: my-api
Path: /home/user/projects/my-api
Auto-approve: OFF
...
See docs/architecture.md for the full system design.
- "No adapters enabled": Make sure at least one platform is enabled in config and the required env vars are set.
- Telegram bot not responding: Verify the
TELEGRAM_BOT_TOKENis correct. Check logs for errors. - WhatsApp QR code not appearing: Delete
auth_info_baileys/and restart. - Viber webhook errors: Ensure
VIBER_WEBHOOK_URLis publicly accessible. Use ngrok for local dev. - "Maximum concurrent sessions reached": Increase
session.maxConcurrentin config or stop idle sessions with/stop. - Claude Code errors: Verify the CLI is installed and
CLAUDE_CODE_PATHpoints to it. Runclaude --versionto check.
Private