
RTFM
io.github.roomi-fields由 GitHub 帳號 roomi-fields 發布v0.55.3更新於 Oct 30, 2026
Local retrieval for AI agents: index code, docs, PDFs, data in SQLite; 24 parsers, served via MCP.
概覽
RTFM 是本地檢索層,把專案的程式碼、文件、PDF 與資料索引到 SQLite,讓 AI 助理能搜尋並展開正確的上下文。
- 可以做什麼
- 以全文、語意或混合方式檢索索引,回傳排序後的指標而非整份檔案
- 取得某主題的僅中繼資料上下文,只展開真正需要的片段
- 掃描專案結構,列出已索引文件,查看統計、標籤與索引覆蓋情況
- 增量同步目錄或匯入單一檔案,也可從索引中移除檔案
- 查看相依圖(匯入、wikilink)與單一檔案的版本歷史
- 支援 Markdown、Python AST、LaTeX、PDF、XML、CSV、XLSX、EPUB 等 24 種格式
- 適用情境
- 適合助理在大型多領域專案中反覆 grep、而答案往往藏在規格、PDF、法規文本或研究論文裡的情境。README 也指出,在約一千個檔案以下的小型儲存庫中 grep 已足夠,RTFM 反而增加額外負擔。
- 執行需求
- 以本機 stdio 程序執行。可用 Claude Code 外掛(需 PATH 中有 Python 3.10+,不需 pip 安裝),或手動安裝 rtfm-ai 套件,在專案中執行 rtfm init,並讓用戶端指向 rtfm-serve。語意檢索與 PDF 解析等選用元件會安裝到隔離環境。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 RTFM,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
RTFM
Retrieve The Forgotten Memory
The open retrieval layer your AI agent was missing
Index everything in your project — code, docs, PDFs, legal texts, research, data — and your agent finds the right context instantly. No hallucinations. No cloud. No API costs.
Fewer calls per search: one query returns ranked hits across code, docs and PDFs — a few hundred tokens of pointers — instead of a chain of grep, glob and whole-file reads.
Free · Local · Open Source · MIT
[RTFM vs vanilla Claude Code — same task, same model, who pays the bill?]
[PyPI version] [License: MIT] [Python] [MCP] [Claude Code] [GitHub stars]
The problem
Your AI agent is flying blind.
It greps through thousands of files, misses the doc that answers the question, invents modules that don't exist, forgets what you decided last session. The bigger the project, the worse it gets. You've added a smarter model. It didn't help. Because the bottleneck isn't intelligence — it's retrieval.
Code indexers (Augment, Sourcegraph, Cursor) only see code. But your project isn't just code. It's specs, PRs, architecture decisions, research papers, PDFs, regulations, vault notes — the context your agent needs to stop guessing.
Why I built this
I was writing a French tax article (~50 pages of regulatory text, cross-references between code articles, case law, administrative doctrine). Claude Code kept grep-ing the same directories in loops, running out of context, and producing confidently wrong citations. I'd added more memory, better prompts, a smarter model. None of it worked, because the agent wasn't reasoning badly — it just couldn't find the right paragraph in a 2,000-file legal corpus. So I stopped trying to make the model smarter and built the layer it was missing. That's RTFM.
The solution
RTFM indexes everything. One command, one SQLite file, one retrieval layer your agent queries before grepping.
30 seconds. Claude Code now searches your indexed knowledge base — code and docs and PDFs and whatever else you drop in — with full-text, semantic, or hybrid search. The agent sees 300 tokens of metadata first, then expands only what's relevant. Progressive disclosure instead of context dumps.
Free. Runs locally. No API keys. No cloud. Your data stays yours.
What it looks like
Three results, ~300 tokens. The agent decides what to read next with rtfm_expand(source, target_section) — not a context dump, a conversation.
Quick start
Recommended — Claude Code plugin
In Claude Code (CLI or Desktop Code tab) :
RTFM is distributed via the roomi-fields/claude-plugins marketplace, which also ships notebooklm-mcp for citation-backed Q&A. To grab both at once:
That's it. The plugin auto-initializes each project on first use:
- Creates
.rtfm/library.db(one SQLite file) - Injects search instructions into
CLAUDE.md - Pre-grants permission for the MCP tools (no prompt every search)
- Indexes the project on the first prompt, re-indexes incrementally on every prompt
No pip install required. Pure Python, runs on Linux / macOS / Windows / WSL with Python 3.10+ already on PATH. The plugin bundles its own MCP server (no mcp SDK dep) and resolves python3 / python / py automatically.
Then say to Claude: "Find the authentication flow" — it uses rtfm_search instead of grepping.
Optional extras (semantic search, PDF parsing)
The core plugin is dependency-free. Heavier optional extras (embedding model, PDF parsers) install on demand into an isolated venv inside the plugin's data directory — no pollution of your system Python, no PEP 668 conflicts:
The pdf-full install uses PyTorch's CPU-only index (no CUDA, no GPU needed) to stay around 1.5 GB instead of 5 GB.
Restart Claude Code after install for the extras to be picked up.
Manual install (Cursor, Codex, Claude Desktop chat, other MCP clients)
For clients without Claude Code's plugin system :
Then point your MCP client at rtfm-serve (the entry exposed by the pip package). Optional extras via pip install rtfm-ai[embeddings,pdf].
How it compares
RTFM is the only open-source option that indexes multi-domain content with structural parsing, a code-level knowledge graph, and unlimited per-file history. That's the niche.
Different from MemPalace specifically: MemPalace is an entity-level memory for conversations (who/project/decision triples in SQLite, plus verbatim chunks in ChromaDB). RTFM is a retrieval layer for artefacts — parsed by format, linked at the file level, versioned over time. The two are stackable, not competing.
For a deeper breakdown of the design choices behind any RAG (chunking, retrieval, augmentation, integration, freshness, storage), see RAG Fundamentals — the 6 axes →
Memory that survives sessions
Between sessions, most agents forget. RTFM indexes Claude Code's own memory files across every project on your machine, with full version history.
- Cross-project index — one DB at
~/.rtfm/memory.dbsees every~/.claude/projects/*/memory/directory on your machine. Askrtfm_search("OAuth auth decisions")and get hits from all 18 of your projects. - Unlimited version history — every change to a memory file is snapshotted (no prune).
rtfm_history <slug>returns the full evolution. - Auto-snapshot on
SessionEnd— one command installs a global Claude Code hook. Every session you close captures a new snapshot. - Curated, not verbatim — RTFM indexes the notes the agent already curated itself during the session (small, structured, signal-dense). Different philosophy from MemPalace, which indexes the full conversation transcripts in ChromaDB (large, noisy, needs aggressive semantic filtering).
Obsidian vault mode
RTFM is the retrieval layer for the Karpathy LLM Wiki pattern. Karpathy himself wrote: "at small scale the index file is enough, but as the wiki grows you want proper search." This is proper search.
- Detects
.obsidian/, proposes a folder → corpus mapping - Resolves
[[wikilinks]]following Obsidian rules → stored as graph edges - Generates
_rtfm/with Obsidian-native navigation (index, graph with Mermaid, hubs, orphans, Dataview frontmatter) - Tested on a 1,700-note research vault
The LLM still writes your wiki. RTFM handles the retrieval that index.md can't scale to.
NotebookLM integration
RTFM pairs naturally with notebooklm-mcp. NotebookLM caps you at 50 queries/day per notebook; RTFM removes that ceiling by indexing answers locally — ask once, retrieve forever, offline, in milliseconds.
notebooklm-mcp's /batch-to-vault endpoint writes citation-backed Q&A as {slug}.md (markdown with frontmatter) plus {slug}.json (structured nblm-answer-v1 sidecar). Both are guaranteed to coexist. Two integration paths, both ship today:
- Path A — Markdown (zero config): drop the vault into RTFM and
rtfm sync. The default markdown parser slices each answer into question / answer / per-citation chunks automatically. No mapping, no schema, no code. - Path B — JSON sidecar (typed metadata): drop a
nblm-answer.yamlmapping into.rtfm/mappings/. Each.jsonanswer file produces typed chunks withnotebook_id,source_name,citation_markerqueryable via SQL, pluscitesedge candidates between answers and sources.
Use Path A unless you specifically need to filter or graph by structured citation fields.
What I measured
I ran two kinds of benchmarks. The honest picture is nuanced — retrieval helps most on tasks that are actually solvable and where the agent is spending time looking for things.
Document-heavy task: French tax article generation (B10)
Writing a ~50-page regulated article from a corpus of legal code, case law, and administrative doctrine. Same agent (Claude Code + Sonnet 4), same prompt, eight configurations tested.
Δ : −51 % cost, −61 % tokens, −16 % duration — with better factual accuracy. This is the use case RTFM was built for: navigating a large multi-domain corpus where grep misses the right paragraph.
Code task: FeatureBench (LiberCoders dataset)
11 tasks, 3 repos of varying size, 4 conditions (A = standard prompt with file paths; B = discovery, no paths; C = RTFM FTS; D = RTFM hybrid), 3 runs each.
On a single smaller-scope run (test_stub_generator on metaflow), RTFM cut agent time by −37 % vs the no-paths baseline. On the larger repos, the tasks themselves were too hard for Sonnet 4 to resolve inside a 20-minute timeout regardless of retrieval.
The honest caveats
- Single model (Sonnet 4), single agent (Claude Code). Not statistically bullet-proof.
- On small repos (< 1k files),
grepis enough and RTFM adds overhead. - FeatureBench measures code modification, not information retrieval. It's the wrong benchmark for a retrieval tool — I'm running against it because it's what exists. Better-suited benchmarks (RepoQA, SWE-QA, LocAgent) are on the roadmap.
What this says
RTFM measurably wins when the bottleneck is "find the right paragraph in a 2,000-file corpus". It doesn't magically make unsolvable tasks solvable. The model still has to do the work — RTFM just makes sure it has the right context to do it with.
Who it's for
RTFM works anywhere your project isn't just code:
- LegalTech — Code + tax law + regulatory specs. Ships with Legifrance XML and BOFiP parsers.
- Research — Code + LaTeX papers + datasets. Ships with LaTeX and PDF parsers.
- FinTech — Code + financial regulations + XBRL reports. Write an XBRL parser in 50 lines.
- HealthTech — Code + medical records (HL7/FHIR) + clinical guidelines.
- Solo devs with big projects — Stop watching your agent grep the same 8,000 files every session.
- Obsidian / PKM users — Make your vault actually searchable by your AI.
- Any regulated industry — If your project mixes code with domain documents, RTFM is for you.
Full feature list
Search & retrieval
- FTS5 full-text search — instant, zero-config, works out of the box
- Semantic search — optional embeddings (FastEmbed/ONNX, no GPU needed)
- Hybrid mode — combine both, rank by relevance score
- Metadata-first — results return file paths + scores (~300 tokens), not content dumps
- Progressive disclosure — agent expands only the chunks it actually needs
- Knowledge graph — wikilinks + Python imports resolved as graph edges, hub detection, centrality ranking
Multi-format indexing
- 24 parsers built-in — Markdown, Python (AST), LaTeX, YAML, JSON, TOML, Shell, PDF, XML, HTML, SQLite, Jupyter, CSV/TSV, XLSX, EPUB, MOBI/AZW, FB2, DJVU, DOCX, ODT, RTF, MIDI, audio tags (MP3/FLAC/OGG/M4A/WAV/AIFF…), plain text
- Extensible — add any format in ~50 lines of Python
- Auto-sync hooks — index stays fresh every prompt, zero manual work
- Incremental — only re-indexes what changed
Integration
- Native Claude Code plugin —
/plugin install rtfm@roomi-fields/rtfm, auto-init per project - Pure-Python MCP server — 0 external deps, no
mcpSDK /pydantic/ native binaries - Cross-platform — Linux, macOS, Windows, WSL (only requires Python ≥ 3.10 on PATH)
- 14 MCP tools — search, context, expand, graph, history, sync, tags, ...
- Manual install fallback —
pip install rtfm-aifor Cursor, Codex, Claude Desktop chat, any other MCP client - CLI + Python API — scriptable for pipelines
- Non-invasive — doesn't touch your code, doesn't replace your editor
The parser architecture
Need to index a format nobody supports? Write a parser in ~50 lines.
Drop it in your project, restart Claude Code, your medical AI agent now understands FHIR records.
Two levels of JSON integration
For JSON-based formats specifically, RTFM offers a second extensibility path that doesn't need any Python:
See JSON schema mappings for the full reference, and RTFM × NotebookLM for a concrete recipe.
Built-in parsers
MCP tools
CLI reference
Python API
Where RTFM fits
RTFM isn't a task manager. It's not an agent framework. It's the knowledge layer your agent needs underneath whatever you're already using.
Without RTFM, your orchestrator drives an agent that hallucinates. With RTFM, the agent knows what it's building on.
Contributing
Adding a parser is the easiest way to contribute — and the most impactful. See CONTRIBUTING.md.
Found a bug? Have an idea? Open an issue.
Thanks
@AVeryTastyRaspberry made RTFM
run on native Windows. RTFM is developed on Linux, and every command was
broken there — the CLI died at import time before it could parse an argument.
The report (#8) named the
line; the testing that followed, on a real Windows 11 machine and checked
against tasklist rather than against RTFM's own claims, found five more
defects behind it and confirmed each fix. #9
then traced the console windows that kept popping up. That is a platform this
project could not otherwise support.
License
MIT — use it, fork it, extend it, ship it.
Author
Romain Peyrichou — @roomi-fields
Code indexers see your code. RTFM sees everything.
⭐ Star on GitHub if RTFM saves your agent from hallucinating.
Curious how it works under the hood? See the Architecture — SQLite + FTS5, the parser registry, and the priority-queue worker (ingest → embed → OCR).
來源:README.md,提交 66ad857
工具
0版本歷史
5- v0.55.3最新Oct 30, 2026
- v0.55.2Oct 29, 2026
- v0.55.1Oct 22, 2026
- v0.55.0Oct 18, 2026
- v0.8.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
