@mrclrchtr/supi-web
Public web pages, web search sources, and focused Context7 docs
Package details
Install @mrclrchtr/supi-web from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@mrclrchtr/supi-web- Package
@mrclrchtr/supi-web- Version
7.2.1- Published
- Sep 22, 2026
- Downloads
- 1,966/mo · 528/wk
- Author
- mrclrchtr
- License
- MIT
- Types
- extension
- Size
- 196.1 KB
- Dependencies
- 5 dependencies · 4 peers
Pi manifest JSON
{
"image": "https://raw.githubusercontent.com/mrclrchtr/supi/main/packages/supi-web/assets/social-preview.png",
"extensions": [
"./src/extension.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@mrclrchtr/supi-web — Web Fetch, Search, and Context7 for Pi
Adds web fetch, public web search, and Context7 documentation tools to the Pi coding agent, without making you paste sources into chat.
What your agent gets
After installation, keep asking Pi normal questions. The agent can:
- Read public web pages as clean Markdown — extract the main article instead of returning navigation, scripts, styles, and raw HTML.
- Prefer source Markdown when available — detect Markdown responses and common Markdown siblings before converting HTML.
- Handle plain-text and source files — wrap them in fenced code blocks with a language hint when the URL provides one.
- Look up current library docs — search Context7 for the right project and version, then retrieve documentation focused on the task at hand.
- Search public web sources — return source titles, URLs, and source excerpts without generating an answer.
- Protect the context window — return small results inline, move long pages to temporary files, and preserve full output when model-visible text must be truncated.
Relative page links and images become absolute by default, so the agent can follow them without reconstructing URLs.
Example requests
You do not need to learn the tool-call syntax. Try asking Pi:
- “Read this public design document and summarize the decisions:
https://example.com/spec.” - “Check the current React documentation for effect cleanup.”
- “Find the FastAPI docs for lifespan events and show the recommended pattern.”
- “Fetch this long reference page to a file, then read only the relevant section.”
- “Compare this library's current docs with the code in the repository.”
Agent tools
The package adds four tools that Pi selects as needed:
| Tool | What it lets the agent do |
|---|---|
web_fetch_md |
Fetch a public HTTP(S) page and return readable Markdown, fenced plain text, or a temporary file |
web_search |
Search the public web and return source titles, URLs, and source excerpts |
web_docs_search |
Find matching Context7 library IDs, versions, trust scores, benchmark scores, and snippet counts |
web_docs_fetch |
Retrieve focused documentation for a chosen Context7 library ID |
Pi searches Context7 first when the library ID is unknown, then fetches docs with the selected ID. Narrow questions produce more useful documentation context than broad requests. Documentation returns as Markdown by default; the agent can request structured JSON snippets when needed.
Web Search
web_search uses the installed bx executable. The tool is enabled by default, but it is available only when bx is on PATH. Search freshness accepts pd, pw, pm, py, or an ordered YYYY-MM-DDtoYYYY-MM-DD range.
Set up bx
Install bx and configure it with the Brave Search CLI instructions. Start Pi from the shell where command -v bx finds the executable, then verify it with bx --version. bx handles its own credentials and configuration. Do not put credentials in Pi settings, prompts, or repository files.
To enable or disable the tool, open /supi-settings, choose Web Search, and change Web Search tool. Run /reload after the change. The setting applies only when the extension starts or reloads. If bx was not available, install or configure it, make sure it is on PATH, and run /reload.
Search results are provider-reported source material. A source date can be a publication or modification date and is not a publication-date guarantee.
How page fetching works
web_fetch_md chooses the cleanest representation it can find:
- Use Markdown returned directly by the server.
- Detect Markdown or plain text from the response content.
- Check common
.md,.markdown,index.md, andREADME.mdalternatives. - For HTML, extract the primary readable content and convert it to GitHub-flavored Markdown.
It follows redirects, removes scripts and styles, preserves useful structures such as headings, links, lists, code blocks, and tables, and makes relative links absolute by default.
Large pages
The default auto mode returns content inline up to 15,000 characters and writes larger pages to a temporary Markdown file. You can ask Pi to force inline or file output.
All tools cap model-visible inline output at Pi's 2,000-line / 50KB limit. If output is truncated, the complete result is saved to a temporary file for follow-up reads.
Tool rows stay collapsed in Pi's TUI by default. Press Ctrl+O to expand their inline output.
Install
pi install npm:@mrclrchtr/supi-web
To try it for one run without installing:
pi -e npm:@mrclrchtr/supi-web
Context7 API key
The documentation tools call the Context7 API. Create a free key at https://context7.com/dashboard, export it before starting Pi, and keep it out of repository files:
export CONTEXT7_API_KEY="ctx7sk-..."
pi
web_fetch_md does not use Context7 and needs no API key.
Boundaries
web_fetch_mdis for publichttp://andhttps://sources. It does not authenticate to login-protected, private, or paywalled pages.- It fetches HTTP responses and does not run a browser, page JavaScript, or interactive flows; client-rendered pages may expose little useful content.
- When the
ghCLI is available, Pi is guided to use it instead for GitHub URLs. - Fetched pages and search excerpts are external, untrusted content. Treat them as source material, not as repository instructions.
