Skip to content

Repository files navigation

Control Pi from any chat app. Anywhere, anytime.

pi-connect bridges Pi running on your machine to the messaging platforms you already use.
Code review, research, automation, data analysis — anything Pi can do,
now accessible from your phone, tablet, or any device with a chat app.

Pi-only agent bridge – This fork focuses on Pi and keeps the platform bridge simple.

🧩 Platform feature snapshot

High-level view of what each built-in platform can do in pi-connect.

Legend

Symbol Meaning
Works in stable pi-connect with typical configuration
⚠️ Partial, needs extra config (e.g. speech / ASR), or limited by the vendor app or API
Not supported or not applicable in practice

QQ (NapCat / OneBot) — unofficial self-hosted bridge; behaviour depends on your NapCat / network setup.

Capability Feishu DingTalk Telegram Slack Discord LINE WeCom Weibo Weixin
(personal)
QQ† QQ Bot
Text & slash commands
Markdown / cards ⚠️ ⚠️
Streaming / chunked replies
Images & files ⚠️
Voice / STT / TTS ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️
Private (DM)
Group / channel ⚠️

WeCom: Webhook mode needs a public URL; long-connection / WS style setups often do not.
Voice row: many platforms need [speech] / TTS providers enabled in config.toml; values are a best-effort summary.
Per-platform setup: Platform setup guides below.

Features

📱 Platform Flexibility

11 Chat Platforms — Feishu, DingTalk, Slack, Telegram, Discord, WeChat Work, Weibo, LINE, QQ, QQ Bot (Official), plus Weixin (personal ilink) for personal WeChat. Most platforms need zero public IP.

🔄 Multi-Bot Relay

Multi-Bot Relay — Bind multiple Pi-backed bots in a group chat and let them communicate with each other in one conversation.

🎮 Complete Chat Control

Full Control from Chat — Switch models (/model), tune reasoning (/reasoning), change permission modes (/mode), manage sessions, all via slash commands.

Directory Switching in Chat — Change where the next session starts with /dir <path> (and /cd <path> as a compatibility alias), plus quick history jump via /dir <number> / /dir -.

🧠 Persistent Memory

Agent Memory — Read and write agent instruction files (/memory) without touching the terminal.

⏰ Intelligent Scheduling

Scheduled Tasks — Set up cron jobs in natural language. "Every day at 6am, summarize GitHub trending" just works.

🎤 Multimodal Support

Voice & Images — Send voice messages or screenshots; pi-connect handles STT/TTS and multimodal forwarding.

📦 Multi-Project Architecture

Multi-Project — One process, multiple projects, each with its own agent + platform combo.

🌍 Multilingual Interface

5 Languages — Native support for English, Chinese (Simplified & Traditional), Japanese, and Spanish. Built-in i18n ensures everyone feels at home.

飞书 Telegram 微信

Left:Lark  |  Telegram  |  Right:Wechat

🚀 Quick Start

🤖 Install & Configure with Pi (Recommended)

The easiest way — Ask Pi to follow this installation guide and help configure pi-connect:

Follow https://raw.githubusercontent.com/tasercake/pi-connect/refs/heads/main/INSTALL.md to install and configure pi-connect.

📦 Manual Install

Via npm:

npm install -g pi-connect

Via Homebrew (macOS / Linux):

brew install pi-connect

Download binary from GitHub Releases:

# Linux amd64 - Stable
curl -L -o pi-connect https://github.com/tasercake/pi-connect/releases/latest/download/pi-connect-linux-amd64
chmod +x pi-connect
sudo mv pi-connect /usr/local/bin/

Build from source (requires Go 1.22+):

git clone https://github.com/tasercake/pi-connect.git
cd pi-connect
make build

⚙️ Configure

💡 Tip: Use the Web UI to configure — After installing, run pi-connect web to configure the web admin and open the dashboard in your browser. You can visually create projects, add platforms, manage providers, and chat with your agent — no need to manually edit TOML files. Note: pi-connect web only configures and opens the browser — you still need to run pi-connect separately to start the service.

If you prefer manual configuration:

mkdir -p ~/.pi-connect
cp config.example.toml ~/.pi-connect/config.toml
vim ~/.pi-connect/config.toml

Set admin_from = "alice,bob" in a project to allow those user IDs to run privileged commands such as /dir and /shell. When a user runs /dir reset, pi-connect restores the configured work_dir and clears the persisted override stored under data_dir/projects/<project>.state.json.

▶️ Run

./pi-connect

🔄 Upgrade

# npm
npm install -g pi-connect

# Homebrew
brew upgrade pi-connect

# Binary self-update
pi-connect update           # Stable
pi-connect update --pre     # Include pre-releases

📊 Support Matrix

Component Type Status
Agent Pi ✅ Supported
Platform Feishu (Lark) ✅ WebSocket — no public IP needed
Platform DingTalk ✅ Stream — no public IP needed
Platform Telegram ✅ Long Polling — no public IP needed
Platform Slack ✅ Socket Mode — no public IP needed
Platform Discord ✅ Gateway — no public IP needed
Platform Weibo ✅ WebSocket — no public IP needed
Platform LINE ✅ Webhook — public URL required
Platform WeChat Work ✅ WebSocket / Webhook
Platform Weixin (personal, ilink) ✅— HTTP long polling — no public IP needed
Platform QQ (NapCat/OneBot) ✅ WebSocket
Platform QQ Bot (Official) ✅ WebSocket — no public IP needed

📖 Platform Setup Guides

Platform Guide Connection Public IP?
Feishu (Lark) docs/feishu.md WebSocket No
DingTalk docs/dingtalk.md Stream No
Telegram docs/telegram.md Long Polling No
Slack docs/slack.md Socket Mode No
Discord docs/discord.md Gateway No
Weibo docs/weibo.md WebSocket No
WeChat Work docs/wecom.md WebSocket / Webhook No (WS) / Yes (Webhook)
Weixin (personal) docs/weixin.md HTTP long polling (ilink) No
QQ / QQ Bot docs/qq.md WebSocket No

🎯 Key Features

💬 Session Management

/new [name]       Start a new session
/list             List all sessions
/switch <id>      Switch session
/current          Show current session
/dir [path|reset] Show, switch, or reset work directory

Project configs rotate to a fresh session automatically after long inactivity. This prevents "context drift" where stale chat history (failed commands, debugging noise) is repeatedly re-ingested via --continue and starts to dominate the model's attention. The previous session is preserved and remains accessible via /list and /switch.

[[projects]]
reset_on_idle_mins = 30   # default when unset; set to 0 to disable

The default is 30 minutes when unset. Set reset_on_idle_mins = 0 to opt out and always continue the previous session.

🛡️ OS-User Isolation (run_as_user)

On Linux/macOS, a project can spawn Pi under a different Unix user for OS-level file-system isolation from the supervisor user that runs pi-connect.

[[projects]]
name = "pi-sandboxed"
run_as_user = "partseeker-coder"
run_as_env = ["PGSSLROOTCERT"]

The target user needs passwordless sudo from the supervisor, no sudo of its own, read+write on work_dir, and its own Pi credentials. See docs/usage.md for the full setup.

Before starting pi-connect, audit the setup with:

pi-connect doctor user-isolation

This runs three go/no-go preflight gates and an isolation probe that reports what the target user can and cannot read. pi-connect refuses to start if any gate fails or if the probe detects a cross-user leak.


🔐 Permission Modes

/mode             Show available modes
/mode yolo        # Auto-approve all tools
/mode default     # Ask for each tool

🔄 Provider Management

/provider list              List providers
/provider switch <name>     Switch API provider at runtime

🤖 Model Selection

/model                      List available models (format: alias - model)
/model switch <alias>       Switch to model by alias

📂 Work Directory

/dir                         Show current work directory and history
/dir <path>                  Switch to a path (relative or absolute)
/dir <number>                Switch from history
/dir -                       Switch to previous directory
/cd <path>                   Compatibility alias for /dir <path>

⏰ Scheduled Tasks

/cron add 0 6 * * * Summarize GitHub trending

📎 Agent Attachment Send-Back

When an agent generates a local screenshot, chart, PDF, bundle, or other file, it can send that attachment back to the current chat.

First release supports:

  • Feishu
  • Telegram

If your agent does not natively inject the system prompt, run this once in chat after upgrading:

/bind setup

or:

/cron setup

This refreshes the pi-connect instructions in the project memory file so the agent knows how to send attachments back.

You can control this feature globally in config.toml:

attachment_send = "on"  # default: "on"; set to "off" to block image/file send-back

This switch is independent from the agent's /mode. It only controls pi-connect send --image/--file.

Examples:

pi-connect send --image /absolute/path/to/chart.png
pi-connect send --file /absolute/path/to/report.pdf
pi-connect send --file /absolute/path/to/report.pdf --image /absolute/path/to/chart.png

Notes:

  • Absolute paths are the safest option.
  • --image and --file can both be repeated.
  • attachment_send = "off" disables only attachment send-back; ordinary text replies still work.
  • This command is for generated attachments, not ordinary text replies.

📖 Full documentation: docs/usage.md

📚 Documentation

👥 Community

☕ Support the Project

If pi-connect has been helpful to you, consider buying us a coffee! Your support helps us:

  • 🛠️ Maintain and improve the project
  • 📚 Write better documentation and tutorials
  • 🐛 Fix bugs and add new features faster
  • ☕ Keep the developers caffeinated

How to Donate

Buy Me a Coffee: https://buymeacoffee.com/cg33

WeChat Pay / Alipay:

WeChat Pay Alipay
WeChat Pay Alipay

Thank You, Donors! 🎉

We're grateful to everyone who has supported this project. Leave your GitHub username in the donation message if you'd like to be recognized here!

Avatar GitHub Username Date
@thx0701 2026-04-29

🤝 Commercial Cooperation

We accept the following commercial collaborations:

  • Enterprise Customization: Custom deployment for internal AI tooling (Feishu, DingTalk, WeChat Work, Slack, etc.)
  • Technical Consulting: Pi bridge integration and architecture design
  • Outsourcing Projects: AI-related system development

Contact: Email: chg80333@gmail.com | WeChat: mongorz | Telegram | Discord

🙏 Contributors

⭐ Star History

Star History Chart

📄 License

MIT License

Built with ❤️ by the pi-connect community

About

Bridge Pi coding agent to messaging platforms (Slack, Telegram, Discord, ...). No public IP required for most platforms

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages