@dreki-gg/pi-doc-search

extensionmaintained

Library doc-search tools for pi, powered by Context7 — direct HTTP, persistent cache, no MCP dependency

by · v0.3.2 · published 4w ago

$ pi install npm:@dreki-gg/pi-doc-search
downloads/mo
526
stars
0
last push
2d ago
open issues
1

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

No downloads in the last 12 weeks.

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

ToolDescription
doc_search_resolve_library_idResolve a library/package name to a Context7 library ID
doc_search_get_library_docsFetch curated docs by ID or name (auto-resolves)
doc_search_get_cached_doc_rawRead 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