# RTFM — the open retrieval layer for AI coding agents

> RTFM indexes a whole project — code, docs, PDFs, ebooks, legal texts, research, spreadsheets, databases — into one local SQLite base, and serves AI agents surgical context over MCP: metadata first, content on demand. 24 built-in parsers, extensible in ~50 lines of Python or ~30 lines of YAML. Free, local, open source (MIT).

This is the entry point for language models (Claude, ChatGPT, Perplexity, Gemini) reading about this project. RTFM is published on PyPI as `rtfm-ai` and as a Claude Code plugin. The repository lives at https://github.com/roomi-fields/rtfm.

Search is full-text (SQLite FTS5) out of the box; semantic and hybrid search come with the optional local embeddings (FastEmbed/ONNX, no GPU, no API). Results carry file paths, sections and scores (~300 tokens for five hits); the agent then expands only what it needs. Wikilinks, Markdown links, Python imports, LaTeX includes and legal cross-references become graph edges used for ranking.

The index stays current on its own: Claude Code hooks queue every edited file, a background worker re-indexes only what changed, and every `.gitignore` of a source is honoured. RTFM is a knowledge layer, not a task manager: it works alongside workflow tools such as GSD or Taskmaster.

The MCP server exposes 14 MCP tools — search, context, expand, graph, history, books, coverage and discover by default, plus sync, ingest, remove and tagging with `RTFM_MCP_PROFILE=admin`. It is pure Python with no MCP SDK dependency and runs on Linux, macOS, Windows and WSL with Python 3.10 or newer.

## Install

```bash
pip install rtfm-ai          # or: pipx install rtfm-ai
cd your-project && rtfm init # index the project, wire the MCP server and hooks
```

In Claude Code: `/plugin marketplace add roomi-fields/claude-plugins` then `/plugin install rtfm@roomi-fields`.

## Documentation

- [Home]({site_url}): what RTFM does and how to start
- [Why RTFM]({site_url}positioning/): positioning against code-only and vector-only tools
- [Architecture]({site_url}architecture/): parser registry, sync, edges, embeddings
- [Parsers]({site_url}parsers/): every built-in format and how to add your own
- [JSON mappings]({site_url}json-mappings/): map any JSON schema to typed chunks in YAML
- [Obsidian vault]({site_url}obsidian-vault-guide/): index a vault with wikilinks and navigation files
- [NotebookLM]({site_url}notebooklm-integration/): pair RTFM with NotebookLM
- [vs vector RAG]({site_url}comparisons/vs-vector-rag/): structural retrieval against embeddings-only RAG
- [Changelog]({site_url}CHANGELOG/): every release

## Articles

- [Where Your Agent's Tokens Go When It Searches — and How to Spend Fewer]({site_url}blog/agent-search-token-usage/)
- ["Claude Code for Your Thesis: One Index for Papers, LaTeX and Notes"]({site_url}blog/claude-code-for-thesis/)
- ["Claude Code Memory Is Per-Repo. Here's How to Search It Across All Your Projects"]({site_url}blog/claude-code-memory-across-projects/)
- ["A Zero-Infrastructure Alternative to claude-context: One SQLite File"]({site_url}blog/claude-context-alternative/)
- ["Your CLAUDE.md Is Too Long: Let the Agent Search Your Docs Instead"]({site_url}blog/claude-md-too-long/)
- ["Context7 for Your Own Docs: Indexing Private Documentation Locally"]({site_url}blog/context7-for-private-docs/)
- [Grep Is Fine for Code. It Struggles with Everything Else in Your Repo]({site_url}blog/grep-is-fine-for-code/)
- ["You Don't Need a Vector Database: Local RAG for Coding Agents with SQLite FTS5"]({site_url}blog/local-rag-without-vector-database/)
- [Make Your Obsidian Vault Searchable by Claude Code — No API Key, No Plugin]({site_url}blog/obsidian-vault-claude-code/)
- [Search Your Ebook Library from Claude Code (EPUB, MOBI, FB2, DJVU)]({site_url}blog/search-ebook-library-claude-code/)
- [How to Make Claude Code Search Your PDFs (Locally, Without a Vector DB)]({site_url}blog/search-pdfs-with-claude-code/)

## Optional

- [Benchmarks]({site_url}benchmarks/benchmark_results/): A/B measurements with and without RTFM
- [Source on GitHub](https://github.com/roomi-fields/rtfm)
- [Package on PyPI](https://pypi.org/project/rtfm-ai/)
