pi-channels
Channels plugin for the pi coding agent — push events into pi sessions via MCP channel servers. Compatible with the Claude Code channels protocol.
Setup
1. Install
pi install npm:pi-channels
2. Create a Telegram bot
Get a bot token from @BotFather and set it:
export TELEGRAM_BOT_TOKEN="your-bot-token"
3. Configure
Create .pi-channels.json in your project root:
{
"telegram": {
"command": "pi-channels-telegram"
}
}
4. Run
pi --channels telegram
5. Pair
Send any message to your bot on Telegram. The bot replies with a pairing code. In pi, run:
/telegram-pair <code>
Only paired users can send messages. Pairing codes expire after 5 minutes. The allowlist is persisted at ~/.pi/channels/telegram/allowlist.json.
Commands
Writing custom channels
See CHANNELS.md for how to write your own channel server.