Since launch, the most common objection to RepoFold has not been about the quality of the generated wikis. It has been a single sentence, in slightly different words each time:
"Looks great, but our code is not allowed to leave the building."
Banks, medical software, defense contractors, agencies under strict client NDAs: for a meaningful slice of engineering teams, sending source code to any cloud service is not a negotiation. It is a hard no, decided far above the engineering team. No SOC 2 report changes that.
We could have written a whitepaper about our encryption. Instead we removed the objection entirely: RepoFold is now open source. The same cited-wiki pipeline, running entirely on your own machine, powered by your own models through Ollama. No account, no telemetry, not a single network call beyond your own hardware.
The hard part was not open-sourcing it
Publishing the code was the easy half. The hard half: the hosted product runs on frontier models with a 48k-token context budget. Local models on consumer GPUs are a different animal. Run the same pipeline on an 8B model and you get thin pages and citations that reference lines that do not exist.
The cloud pipeline is optimized to minimize token cost: few, large, batched calls, because every token is money. Locally that optimization is exactly backwards. Tokens cost nothing; only wall-clock time matters. So the open-source edition inverts the design.
Instead of asking one model call to digest forty files at once, deep mode makes many small, focused calls: it analyzes every important file individually with its full source in context, then extracts verifiable facts per symbol from the exact lines that define it. Small models are unreliable at big synthesis; they are surprisingly good at small, grounded tasks.
Citations the model cannot get wrong
The core trick is who writes the citations. In most AI documentation tools, the model does, and models invent line numbers. Our validator catches those, but stripping a bad citation still leaves an unsourced paragraph.
In deep mode the model never writes a citation at all. It references facts by an opaque six-character ID, and the assembler substitutes the real file:line-line range from parser data (tree-sitter knows exactly where every symbol lives). Reference an ID that does not exist, and it is stripped. An invalid citation is structurally impossible.
Measured on a real repository with qwen3:14b on a single consumer GPU: zero pages without citations, a median of twelve line-level citations per page, and zero invalid citations across the entire wiki. Not "few". Zero.
Everything is cached by content hash: file analyses, mined facts, even individual page sections. The first run takes a while; after that, editing one function regenerates only the sections that cite it, and code that merely moves gets its citations re-anchored without a single model call.
What stays in the cloud, honestly
The hosted product at repofold.dev is where this pipeline is developed and fully tested, running on frontier models. It writes noticeably better prose, syncs automatically with GitHub, and adds full-text search, Ask-the-repo with cited answers, and an MCP server your coding agents can query. If your policy allows a cloud service, it is the better product, and it is what funds the open-source work.
The local edition exists for one reason: so that "our code cannot leave the building" is no longer a reason to live without documentation. It is AGPL-licensed, it runs on hardware you already own, and you can read every line of what it does to your code, because now, so can everyone.
ollama pull qwen3:14b
repofold generate path/to/your/repo --model qwen3:14b --serveThe repository is at github.com/Neilbenji/repofold. Issues and pull requests are welcome.