Documentation that travels where your code travels
Autodoc indexes your entire git repository with an LLM so developers can query the codebase in plain English and get answers that cite specific files.

What it does Autodoc is an experimental CLI toolkit that crawls a git repository and asks an LLM to write documentation for each file and folder. The resulting docs are stored inside the project itself—so they version-control alongside the code—and can be queried via a natural-language interface that returns specific answers with links back to the relevant source files.
The interesting bit Instead of treating documentation as a separate artifact, Autodoc makes it a native resident of the repo. It also estimates API costs before indexing and, on subsequent runs, only re-indexes files that have changed, which suggests the authors are thinking about operational reality rather than just demo polish.
Key highlights
- Generated docs live in the repository and move with the code through version control.
- Query mode lets developers ask questions about the system and receive answers with direct references to source files.
- Cost estimator previews indexing expenses upfront; incremental re-indexing limits future API spend.
- Per-file model selection automatically picks the cheapest OpenAI model whose context window fits the token count.
- Prompts are partially customizable via configuration, though templates are currently code-centric.
Caveats
- Explicitly experimental and not production-ready; the authors warn that things may break.
- Currently OpenAI-only, with self-hosted models like Llama and Alpaca listed as future work.
- The CLI querying experience is described as “very basic” with room for improvement.
- Files under roughly 4,000 tokens fall back to GPT-3.5, which produces noticeably less accurate documentation; the authors recommend GPT-4 8K minimum.
- Indexing large repositories can cost several hundred dollars in API fees.
Verdict Worth a look if you maintain a complex codebase that newcomers struggle to navigate and you have budget for OpenAI API calls. Skip it if you need battle-hardened tooling or are hoping to run everything offline today.
Frequently asked
- What is context-labs/autodoc?
- Autodoc indexes your entire git repository with an LLM so developers can query the codebase in plain English and get answers that cite specific files.
- Is autodoc open source?
- Yes — context-labs/autodoc is open source, released under the MIT license.
- What language is autodoc written in?
- context-labs/autodoc is primarily written in TypeScript.
- How popular is autodoc?
- context-labs/autodoc has 2.3k stars on GitHub.
- Where can I find autodoc?
- context-labs/autodoc is on GitHub at https://github.com/context-labs/autodoc.