rtfm_searchLABSCO SUMMARY
Built because a smarter model did not fix a retrieval problem.
The author's case — a 2,000-file legal corpus where Claude Code looped on grep and produced confident wrong citations — is the honest framing: this is a retrieval layer, not an intelligence upgrade. The design choice that matters is metadata first, content on request, which keeps a large corpus from becoming a context dump. Code indexers only see code; this indexes the PDFs and specs alongside it.
What it is
RTFM is a retrieval layer for coding agents. One command indexes everything in a project — source, specs, PDFs, legal texts, vault notes — into a single SQLite file, and the agent queries that with full-text, semantic or hybrid search instead of grepping directories in loops.
What you get
- Search and reading —
rtfm_searchover the index,rtfm_contextfor a subject as metadata only,rtfm_expandto open every chunk of a source with full content - Orientation —
rtfm_discoverscans project structure in about a second with no indexing needed,rtfm_bookslists indexed documents,rtfm_statsreports library statistics - Index management —
rtfm_syncfor incremental directory sync,rtfm_ingestfor a single file,rtfm_removeto drop one - Structure and history —
rtfm_graphshows a source's dependency graph of imports and links,rtfm_historyshows file versions and memory snapshots,rtfm_tagsandrtfm_tag_chunkslabel specific chunks - Progressive disclosure by design: the agent sees roughly 300 tokens of metadata first and expands only what is relevant
- Optional extras install on demand into an isolated venv — FastEmbed ONNX for semantic and hybrid search, pdftext for fast PDF extraction, or marker-pdf with CPU-only torch for complex layouts
Requirements
Python 3.10+ on PATH; the Claude Code plugin bundles its own MCP server and needs no pip install. Install it with /plugin marketplace add roomi-fields/claude-plugins then /plugin install rtfm@roomi-fields; it auto-initialises each project, creates .rtfm/library.db, injects search instructions into CLAUDE.md, pre-grants tool permission and re-indexes incrementally. For Cursor, Codex or Claude Desktop chat, pip install rtfm-ai, run rtfm init in the project, and point the client at rtfm-serve. Runs locally with no API keys and no cloud. Package version 0.28.1. MIT.
Setup effort
One command — pip install rtfm-ai
USE CASES
Finding the paragraph, not the file
Search the index across code and documents together, then expand only the source that answers the question.
Getting oriented in a repo you just opened
Run the fast structure scan before any indexing, then index what looks relevant.
Working against a document corpus
Ingest the PDFs and regulations, then answer with citations drawn from the indexed chunks.
Tracing what a file depends on
Read the dependency graph of imports and links for a source instead of following them by hand.
13 tools
Listed in project docs. Your client may show a different list.
rtfm_contextrtfm_expandrtfm_discoverrtfm_booksrtfm_statsrtfm_syncrtfm_ingestrtfm_tagsrtfm_tag_chunksrtfm_removertfm_graphrtfm_historyBEFORE YOU INSTALL
What to know first
Tools you get
13 tools named in the project's documentation.
Requires
pip on PATH
INSTALLATION
Connect your client
Server setup
pip install rtfm-aiMCP Clients
Claude Code — plugin
/plugin marketplace add roomi-fields/claude-plugins
/plugin install rtfm@roomi-fieldsCursor, Claude Desktop, Other MCP clients
Install the package and index your project:
pip install rtfm-ai
cd <YOUR_PATH_TO_PROJECT>
rtfm initThen point your client at rtfm-serve. It finds the index by walking up from the folder it starts in, so launch it inside the project — or set RTFM_DB to <YOUR_PATH_TO_PROJECT>/.rtfm/library.db:
{
"mcpServers": {
"rtfm": {
"command": "rtfm-serve"
}
}
}