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.
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.
- Search and reading — `rtfm_search` over the index, `rtfm_context` for a subject as metadata only, `rtfm_expand` to open every chunk of a source with full content
- Orientation — `rtfm_discover` scans project structure in about a second with no indexing needed, `rtfm_books` lists indexed documents, `rtfm_stats` reports library statistics
- Index management — `rtfm_sync` for incremental directory sync, `rtfm_ingest` for a single file, `rtfm_remove` to drop one
- Structure and history — `rtfm_graph` shows a source's dependency graph of imports and links, `rtfm_history` shows file versions and memory snapshots, `rtfm_tags` and `rtfm_tag_chunks` label 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
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.
One command — pip install rtfm-ai
