// always-on
Telegram · Discord · WhatsApp
Connect Astra to your chat app and turn it into an always-on buddy. Shell approvals arrive as Approve / Deny buttons, and you can schedule reminders and daily tasks that fire while the gateway runs.
All three gateways run on your machine over long-polling or websockets — no public URL, no port forwarding, no cloud account. Start them with /connect in the TUI, or the CLI commands below.
Telegram
Setup
- Create a bot — open @BotFather, run
/newbot, save the token. - Configure via
/connectin the TUI (recommended), or~/.astra/settings.json:
{
"telegram": {
"botToken": "123456789:ABCdef...",
"allowedUserIds": [987654321],
"workdir": "D:/projects/MyRepo"
}
}export TELEGRAM_BOT_TOKEN=123456789:ABCdef... export TELEGRAM_ALLOWED_USER_IDS=987654321
- Find your user ID — DM the bot and send
/whoami. If the allowlist is empty, check the console forRejected message from user <id>. - Add your ID to
allowedUserIdsand restart.
Run
npm run dev -- telegram --workdir D:/projects/MyRepo # or after build: astra telegram --workdir D:/projects/MyRepo astra telegram --boss --verbose
While the gateway runs, the terminal streams a live log of Telegram activity, including approval prompts and their outcome. On first connect, send any message to receive a welcome guide. Keep the process alive on login with Task Scheduler or pm2.
Discord
Setup
- Create an app in the Discord Developer Portal → New Application → Bot → Reset Token. Enable Message Content Intent. Copy the token.
- Optionally invite the bot to a server via OAuth2 so you can find it.
- Configure via
/connect, settings, or env:
{
"discord": {
"botToken": "...",
"allowedUserIds": ["123456789012345678"],
"workdir": "D:/projects/MyRepo"
}
}export DISCORD_BOT_TOKEN=... export DISCORD_ALLOWED_USER_IDS=123456789012345678
- Find your user ID — DM the bot, send
/whoami, add the snowflake toallowedUserIds, restart.
Run
npm run dev -- discord --workdir D:/projects/MyRepo astra discord --workdir D:/projects/MyRepo astra discord --boss --verbose
Commands match Telegram (/start, /status, /build, /plan, /boss, /model, /schedules, /compact, …). Shell approvals use Approve / Deny buttons in the DM.
Chat from WhatsApp using Baileys (unofficial WhatsApp Web). Scan a QR code once; the session is stored under ~/.astra/whatsapp-auth/. No Meta Cloud API.
Setup
{
"whatsapp": {
"allowedUserIds": ["15551234567"],
"workdir": "D:/projects/MyRepo"
}
}export WHATSAPP_ALLOWED_USER_IDS=15551234567
Use your number in E.164 digits without +.
Run and scan QR
npm run dev -- whatsapp --workdir D:/projects/MyRepo astra whatsapp --workdir D:/projects/MyRepo
Scan the terminal QR with WhatsApp → Linked Devices. On later runs, auth is reused until you log out or delete whatsapp-auth/. Find your ID by sending /whoami and confirming it matches the allowlist.
Approvals
Same slash commands as Telegram/Discord. Approvals: reply approve or deny (and continue for browser steps). Groups are ignored.
Schedules & reminders
With any gateway running, ask Astra to schedule reminders or daily recurring tasks — e.g. a morning news briefing — and it will deliver them on time. Manage them with /schedules. Active schedules persist in ~/.astra/schedules.json.
Security notes
- Only allowlisted user IDs / phone numbers can chat (except
/whoami). - Treat bot tokens and the
whatsapp-auth/folder like passwords — never commit them. - WhatsApp uses an unofficial API — ban risk; prefer a secondary number.