频道插件

pi-channels是一个用于pi编码代理的频道插件,通过MCP频道服务器将事件推送到pi会话中,兼容Claude Code频道协议。

  • by aktech
  • TypeScript
  • 本地部署
  • 4 星标
  • 更新于
在 GitHub 查看 aktech/pi-channels

使用说明

pi通道

频道插件 pi编码剂 --通过MCP通道服务器将事件推送到pi会话中。与兼容 克劳德代码频道 协议。

设置

1.安装

pi install npm:pi-channels

2.创建Telegram机器人

从获取机器人令牌 @植物学家 并设置它:

export TELEGRAM_BOT_TOKEN="your-bot-token"

3.配置

创建 .pi-channels.json 在项目根目录中:

{
  "telegram": {
    "command": "pi-channels-telegram"
  }
}

4.跑步

pi --channels telegram

5.配对

在Telegram上向您的机器人发送任何消息。机器人会用配对码进行回复。在pi中,运行:

/telegram-pair <code>

只有配对的用户才能发送消息。配对代码将在5分钟后过期。反对者坚持 ~/.pi/channels/telegram/allowlist.json.

命令

命令 描述
/channels 列出活动频道及其状态
/channel-start <name> 从配置启动频道
/channel-stop <name> 停止正在运行的频道
/telegram-pair <code> 按代码配对Telegram用户

编写自定义频道

看 CHANNELS.md 了解如何编写自己的频道服务器。