@yrfns/pi-agent-reach
Native pi extension wrapping Agent Reach CLI for 14 internet channels — search, read, status for Twitter, Reddit, Bilibili, 小红书, YouTube, GitHub, RSS, V2EX, LinkedIn
Package details
Install @yrfns/pi-agent-reach from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@yrfns/pi-agent-reach- Package
@yrfns/pi-agent-reach- Version
0.3.0- Published
- Jun 19, 2026
- Downloads
- not available
- Author
- yrfns
- License
- MIT
- Types
- extension, skill
- Size
- 42.2 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
],
"skills": [
"./skill"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-agent-reach
Native pi extension wrapping Agent Reach CLI as native pi tools.
What It Does
Gives your pi agent access to Agent Reach's 14 internet channels via 3 native tools:
| Tool | Description |
|---|---|
reach_search |
Search 8 channels: web (Exa AI), Twitter, Reddit, Bilibili, 小红书, LinkedIn, GitHub, V2EX |
reach_read |
Read any URL — auto-detects platform (YouTube/Bilibili subtitles, social posts, RSS, web via Jina Reader) |
reach_status |
Doctor check — shows all channels, active backends, health status |
Plus 2 slash commands: /reach-status and /reach-setup.
Installation
# Install from npm (listed on https://pi.dev/packages)
pi install npm:pi-agent-reach
Or clone manually:
git clone https://github.com/YrFnS/pi-agent-reach.git ~/.pi/agent/extensions/pi-agent-reach
Setup
Run /reach-setup inside pi — it automatically installs everything:
pip install agent-reach— Agent Reach CLIagent-reach install --channels=all— all upstream CLIs (twitter-cli, bili-cli, opencli, etc.)npm install -g mcporter+ Exa MCP config — semantic web searchffmpeg— podcast transcription support- yt-dlp JS runtime config
No manual steps needed.
Browser Cookies (Twitter, Reddit, 小红书, LinkedIn)
These platforms require browser authentication. On macOS/Linux, Agent Reach auto-extracts cookies from your default browser — no setup needed.
On Windows, browser cookie databases are encrypted and locked by the OS. To use these channels:
Log into x.com / reddit.com / xiaohongshu.com / linkedin.com in your browser
Set environment variables with your cookie values:
# For Twitter/X setx TWITTER_AUTH_TOKEN "your_auth_token" setx TWITTER_CT0 "your_ct0"Get cookie values from: Browser → F12 → Application → Cookies → x.com
Usage
Once installed, the agent automatically has access to reach_search, reach_read, and reach_status tools.
Search Examples
"Search Twitter for discussions about AI agents"
"Search 小红书 for restaurant recommendations"
"Search Bilibili for Python tutorials"
"Reddit search for Rust vs Go"
Read Examples
"Read this link: https://example.com/article"
"What's this YouTube video about: https://youtube.com/watch?v=xxx"
"Read this B站 video: https://bilibili.com/video/BVxxx"
"Read this tweet: https://twitter.com/user/status/xxx"
Status
"Check if Agent Reach is working"
"Run /reach-status"
Tested Channels
| Channel | Status | Notes |
|---|---|---|
| Web (Jina Reader) | ✅ | Works out of the box |
| YouTube | ✅ | Subtitles via yt-dlp |
| GitHub | ✅ | Search via gh CLI |
| ✅ | Search via OpenCLI | |
| Bilibili | ✅ | Search via bili-cli |
| RSS | ✅ | Via feedparser |
| V2EX | ⚠️ | API timeout on some networks |
| Twitter/X | ⚠️ | Needs browser cookies (Windows) |
| 小红书 | ⚠️ | Needs browser cookies (Windows) |
| ⚠️ | Needs browser cookies + MCP fix | |
| Exa Search | ⚠️ | mcporter hangs on Windows |
6 channels work out of the box. 7 need browser cookies (Windows) or have upstream CLI issues.
Skill
The extension includes the original Agent Reach SKILL.md and all reference docs (references/search.md, references/social.md, references/web.md, references/video.md, references/dev.md, references/career.md) so the agent knows exactly how to route queries across platforms and backends.
Architecture
- Extension (
index.ts): Registers 3 tools + 2 commands viapi.registerTool()andpi.registerCommand() - Tools call Agent Reach's upstream CLIs via
pi.exec()— twitter-cli, bili-cli, opencli, rdt-cli, yt-dlp, mcporter, gh CLI, curl+Jina - Auto-fallback: If a platform-specific backend fails, falls back to Exa web search or Jina Reader
- Output truncation: 200 lines / 50KB default, expandable in TUI
- Session integration: Shows Agent Reach version in footer status bar on startup
Requirements
- pi coding agent
- Agent Reach CLI (Python)
- Individual upstream tools (installed by
agent-reach install):mcporter,exa,twitter-cli,bili-cli,opencli,rdt-cli,yt-dlp,gh
License
MIT