@dreki-gg/pi-doc-search
Library doc-search tools for pi, powered by Context7 — direct HTTP, persistent cache, no MCP dependency
Package details
Install @dreki-gg/pi-doc-search from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@dreki-gg/pi-doc-search- Package
@dreki-gg/pi-doc-search- Version
0.3.2- Published
- Jul 12, 2026
- Downloads
- 479/mo · 41/wk
- Author
- jalbarrang
- License
- MIT
- Types
- extension
- Size
- 58.1 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/doc-search"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@dreki-gg/pi-doc-search
Library doc-search tools for pi, powered by Context7. Bypasses MCP entirely — direct HTTP to the Context7 API with a persistent searchable cache.
Formerly published as @dreki-gg/pi-context7.
Install
pi install npm:@dreki-gg/pi-doc-search
Tools
| Tool | Description |
|---|---|
doc_search_resolve_library_id |
Resolve a library/package name to a Context7 library ID |
doc_search_get_library_docs |
Fetch curated docs by ID or name (auto-resolves) |
doc_search_get_cached_doc_raw |
Read full raw cached docs by docRef or semantic lookup |
Configuration
Set env var (preferred):
export CONTEXT7_API_KEY=ctx7sk-...
Or create ~/.pi/agent/extensions/doc-search/config.json:
{
"apiKey": "ctx7sk-...",
"cache": {
"resolveTtlHours": 168,
"docsTtlHours": 24
}
}
API key is optional — Context7 works without one but with lower rate limits.
Cache
Stored under ~/.pi/agent/extensions/doc-search/cache/ with:
- Atomic JSON writes
- Structured indexes (by library name, version, ID, docRef)
- TTL-based expiry with stale fallback
- Automatic pruning of expired/orphaned entries