$ cat ~/map/pi-local-knowledge.md
pi-local-knowledge
Version-pinned offline documentation search for the pi coding agent: download docs once, retrieve the matching version.
extensions✓ Oct 21
Facts
- repository
- github.com/MisakaAI/pi-local-knowledge ↗
- GitHub Stars
- ★ 0
- Forks
- 0
- license
- —
- npm / mo
- —
- last push
- Oct 20, 2026
install
pi install "$PWD" inside the repository directory, or pi --extension ./src/index.ts for a one-off load## TL;DR
A pi extension that downloads technical documentation to the local machine and gives the agent version-exact offline search: versions are detected from lockfiles, search returns short summaries, and section bodies are read on demand — no vector database, embeddings, or resident service.
## Key points
- $Documentation is downloaded to the local machine; only search summaries and deliberately read sections reach the model, so routine context stays small.
- $Version detection reads lockfiles and dependency declarations (Python, JavaScript, Rust, Go, and more; monorepo subdirectories supported) and returns only documents exactly matching the detected version, with no silent fallback to another version.
- $Sources include HTTPS archives or single files, local directories, files and archives, and Git repositories; HTML, Markdown, RST, and plain text are parsed, with Sphinx-style navigation and duplicated source code filtered out.
- $English API names search through SQLite FTS5 full-text; Chinese keywords use substring matching.
- $Networking happens only at doc-install time; archive entries are verified item by item, and no code from the project or the docs is executed.
- $Two retrieval tools, local_docs_search and local_docs_read, plus a /docs management command with tab completion.
- $Requires Python 3.11 or newer whose bundled SQLite supports FTS5 (override the interpreter with PI_KNOWLEDGE_PYTHON); Linux or macOS only — on Windows use WSL.
- $Copying only src/index.ts breaks the extension: it needs the repository's backend directory, so install the whole checkout as a local pi package.
## FAQ
Q Does it need an embedding model or vector database?
No — the README rules out vector databases, embeddings, and resident services; English search runs on SQLite FTS5 and Chinese keywords on substring matching.
Q Can it hand the model documentation for the wrong version?
Per the README, no — retrieval is strictly version-pinned: only documents exactly matching the version detected from lockfiles and dependency declarations are returned, never a silent fallback to another version.
Q Does it run on Windows?
Not natively — the README lists Linux or macOS, and points Windows users to WSL.
## References
## Related entries
$ doc-bridge
Cross-runtime docs-to-handoff framework: turns repo docs, ownership maps, and human docs into deterministic AgentHandoff contracts consumable by Cursor, Claude, Copilot, and pi.
$ big-pi
Model-driven compression that summarizes completed phases into tiered blocks while Pi's JSONL transcript stays authoritative and untouched.
$ dsh-pi-agent
DeepSeek Harness (DSH) AgentFactory that swaps DSH's native agent loop for a headless pi --mode rpc child, so DSH's web UI, sessions, hooks, and presets keep working with pi's minimal prompt and four tools.
## Guides
Last updated: Oct 20, 2026