@comput/pi-telegram

中文文档
0.6.11发布于 2026/11/09MITES Module构建来源已验证近 30 天下载 3308

Your Pi session, wherever you are. Send requests, share screenshots and get replies and files through Telegram—without losing your project context.

原始使用文档
文档目录9 节
  1. What you can do
  2. Get connected
  3. 1. Install
  4. 2. Add your bot
  5. 3. Say hello
  6. Pick up where you left off
  7. A few useful controls
  8. Private by design, with clear boundaries
  9. Learn more

Pi Telegram

Your Pi session, wherever you are.

Step away from your terminal without leaving your coding session behind. Pi Telegram connects a running Pi coding agent to your private Telegram bot, so you can send requests, ask follow-up questions and receive replies and files from your phone.

Same session. Same project context. Another way to work with Pi.

What you can do

  • Keep the conversation going. Ask about your project or give the agent its next task without returning to your desk.
  • Send context from your phone. Share a screenshot or document with instructions for the agent.
  • Get useful answers back. Receive formatted replies, code, files and images—not just a notification telling you to check the terminal.
  • Make choices in chat. The agent can offer buttons for questions and next steps.
  • See progress when it matters. Explicit progress messages, temporary answer previews and a Working indicator help the agent keep you informed. Version 0.6.4 adds native context-compaction notices on hosts exposing the corresponding hooks; early pauses may remain silent.
  • Return to the same session. Resume your persistent Pi session locally and its assigned bot reconnects.

For example:

Explain how authentication works in this project. Don't change anything yet.

Here's a screenshot of the bug. Help me work out what's wrong.

Send me the report we just generated.

Pi Telegram is a frontend for a Pi session, not a hosted agent or a replacement for Pi's terminal interface. Your Pi process must stay running. Agent replies and progress use explicit Telegram tools; terminal conversations and tool output are not automatically mirrored into chat.

Get connected

You'll need Pi 0.84.4 or later with a configured model/provider, Node 22.19.0 or later (or your Pi version's higher requirement), and a Telegram account. The candidate is tested against Pi 1.3.0; the standard * Pi peer range is not a universal compatibility claim. Start in a project you trust: the agent retains its normal ability to read files and run commands.

1. Install

In your terminal:

pi install npm:@comput/pi-telegram
cd /path/to/your/project
pi

Already running Pi? Use /reload in local Pi after installation.

2. Add your bot

  1. In Telegram, open verified @BotFather, send /newbot, and follow its instructions.
  2. In local Pi, run /telegram-start → Add a bot… → Add BotFather bot.
  3. Enter the bot's exact username and token in the local setup UI. Token entry is masked. Never paste the token into an agent conversation, Telegram chat or issue.
  4. Open your bot's private Telegram chat, press Start, and send the exact one-time pairing code shown in Pi. The code expires after three minutes.
  5. Check the connection in local Pi with /telegram-status. In the 0.6.2 candidate, startup is silent: send /ping in Telegram for Pong · project · vLoadedVersion without invoking the model (published 0.6.1 still sends a Connected notice).

If setup asks to remove a webhook or transfer a bot from another session, confirm only if you intend to take over that connection.

3. Say hello

Send this to your bot in Telegram:

Reply here with “Connection works.” Do not read files, change anything or run commands.

You’re ready when the agent replies. If it doesn't, check local Pi for model/provider errors and run /telegram-status. See the setup and recovery guide for help.

Pick up where you left off

A bot belongs to one persistent Pi session, not every session in a project folder. After closing Pi, return to the project and resume the original session:

pi -r

Or use pi -c to continue the most recent session in that project. Its assigned bot reconnects when the session resumes.

A new or forked session does not inherit the bot. Use /telegram-start to deliberately select or transfer one. More on sessions and transfers.

A few useful controls

WhereCommandPurpose
Telegram/ping (0.6.2 candidate)Check connection, project and loaded version without the model
Local Pi/telegram-statusCheck the connection and assignment
Local Pi/telegram-releaseDisconnect this session, keeping bot credentials
Local Pi/telegram-remove-botRemove a bot's local project credentials
Terminalpi update npm:@comput/pi-telegramUpdate the package; then /reload in local Pi

Removing local credentials does not delete the bot or revoke its token at Telegram. See the full command guide and update/removal instructions.

Private by design, with clear boundaries

  • Only the paired owner's private messages are accepted.
  • Pairing requires a short-lived code shown in your local Pi setup.
  • Agent content is sent explicitly, rather than automatically forwarding terminal output or private reasoning.
  • File delivery is restricted to allowed project files, with credential and repository-internal paths blocked. These checks do not scan arbitrary file contents for secrets or malware.

Telegram bot chats are not end-to-end encrypted. Pi extensions have full system access, stored tokens are plaintext, and requested ping/status replies include project/version or host details. Protect your local settings and backups, and use a bot only with projects and information you're comfortable accessing through Telegram.

Stop is request-bound; it is not a guarantee that every worker or subprocess has terminated. Check ongoing work locally when necessary.

Learn more

This checkout prepares 0.6.2, not yet published; the public release baseline remains 0.6.1. The candidate adds silent startup, native /ping, a narrowly scoped new-Telegram-runtime /reload acknowledgement, and inert voice-note intake without transcription. Process restart and instance-following assignments are not supported. Local validation and security audits pass; see development status for evidence and remaining live-test limitations.

版本与发布记录

@comput/pi-telegram 共发布 24 个版本,首次发布于 2026/09/10;过去 12 个月发布了 24 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.6.11latest2026/11/091 天前
0.6.102026/11/073 天前
0.6.92026/10/3110 天前
0.6.82026/10/2912 天前
0.6.72026/10/2912 天前
0.6.62026/10/2714 天前

关于 @comput/pi-telegram 的常见问题

@comput/pi-telegram 是什么?

Your Pi session, wherever you are. Send requests, share screenshots and get replies and files through Telegram—without losing your project context.

如何安装 @comput/pi-telegram?

在项目目录运行 npm install @comput/pi-telegram,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typebox(*)、@earendil-works/pi-coding-agent(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@comput/pi-telegram 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/comput__pi-telegram 是否存在。

@comput/pi-telegram 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@comput/pi-telegram 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.9.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@comput/pi-telegram 可以商用吗?

@comput/pi-telegram 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@comput/pi-telegram 的下载量有多少?

根据 npm 官方下载统计,@comput/pi-telegram 在 2026/10/11 – 2026/11/09 这 30 天内被下载 3,308 次,日均约 110 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@comput/pi-telegram 还在维护吗?

最新版本 0.6.11 发布于 2026/11/09(1 天前);至今共发布 24 个版本,其中过去 12 个月发布了 24 个;首次发布于 2026/09/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。