原始内容
pi-lab
A collection of pi coding agent extensions, packaged for pi install.
Packages
| Package | Description | Version |
|---|---|---|
| @pi-lab/permissions | Permission system — enforce allow / deny / ask rules on tool calls | |
| @pi-lab/webfetch | Fetch URL and get clean Markdown; includes X/Twitter fetch optimizations | |
| @pi-lab/websearch | Search the web with Exa | |
| @pi-lab/xsearch | Search X/Twitter with xAI Grok and citation URLs | |
| @pi-lab/grok-build | Use local Grok Build for image/video and richer X search/thread reading | |
| @pi-lab/env | Load .env into pi sessions |
|
| @pi-lab/input-history | ↑ recalls inputs across all sessions in the same project |
|
| @pi-lab/notify | Desktop notifications |
Install
Each package can be installed individually:
pi install npm:@pi-lab/permissions
Or pin to a git ref:
pi install git:github.com/anthod0/pi-lab@main
X/Twitter tool comparison
All three tools can be useful, depending on the task:
| Tool | Best for | Notes |
|---|---|---|
grok_build |
Reading X posts/threads with rich context; natural-language X search | Usually gives the most complete context, including replies, quotes, media details, views, and bookmarks. Native X search typically returns about 10 posts per search call. |
xsearch |
Broader X search with many citation URLs | Uses the xAI API-key workflow and is better when you need more search results/citations rather than deep thread context. |
webfetch |
Fast, simple fetch of a single X post body | Usually faster and more deterministic, but returns less context than Grok Build. |
Development
pnpm install
# type-check all packages
pnpm typecheck
# test an extension locally without installing
pi -e ./packages/<name>/src/index.ts
# test the compiled output
cd packages/<name>
pnpm build
pi -e ./dist/index.mjs