Docs How it works
A model writes the map. The repo checks it.
RepoLens reads a repository the way a new teammate would: manifest and README first, then the entry points, the API surface and the data layer. Each analysis runs in four stages, and you can watch them as they happen.
- 01Stage
Fetch
Two GitHub API calls get the repo's metadata and its full file tree. Lockfiles, build output, binaries, vendored code and generated files are dropped. Tests are skipped unless the repo has almost nothing else.
Every remaining file gets a score: manifests, the README, entry points, API routes, data-layer files and core source score highest. RepoLens first takes the best file from each area of the codebase, then fills the rest by score, up to about 28 files and 150 KB. Caps per folder keep one big directory (or examples/) from crowding out the rest.
- 02Stage
Parse imports
A static parser reads imports and exports in TypeScript, JavaScript, Vue, Svelte, Astro, Python, Go, Rust, Java, Kotlin, Scala and Ruby. Imports are resolved against the full tree, so a link to a file RepoLens didn't download still counts. Stylesheets and images are ignored.
- 03Stage
Synthesize
The model receives the directory outline, the import graph, exported symbols, the top external packages and the selected files with line numbers. It must answer with JSON that matches a fixed schema: 5–12 modules, the links between them, up to about 8 findings, and a 5–7 step tour. Claude is the default model; OpenAI, Gemini or any OpenAI-compatible API (such as NVIDIA's) can be used instead.
- 04Stage
Ground
The answer is not taken at face value. Paths that don't exist in the repo are dropped. A link between two modules is marked import-verified when the parser found an import between their files, and import links the model missed are added. A finding must cite a real file; its line number is checked against the downloaded file, and the code shown next to it is read from that file, not copied from the model.
[05]Reading the results
Solid links are import-verified and carry a check mark in the inspector. Dashed links are runtime relationships the model inferred from the code, such as an HTTP call or a database write. Exports to Markdown and Mermaid keep the difference: solid arrows are verified, dotted arrows inferred.
Each finding says whether its line reference was verified. Treat findings as leads, not verdicts: they are model output, checked only for where they point, not for whether they are right. Findings are the only thing drawn in red.
[06]Limits
- Public repositories only.
- About 28 files are read, so a very large repo gets a partial view. The directory outline and module file counts still cover the whole tree.
- An analysis takes 30–120 seconds. Results are cached for an hour, so opening the same repo again is instant.
- Each visitor can start 5 new analyses an hour. Cached results and the demos don't count.
- Without a GitHub token the server gets 60 GitHub API requests an hour, about 30 analyses.
[07]What leaves your browser
Your browser sends the repo URL to the RepoLens server. The server downloads the files from GitHub and sends the selected files to the model provider the site is set up with (Anthropic, OpenAI or Google). The result is kept in server memory for up to an hour; it is not written to a database. The instant demos are static files and make no model calls.
[08]Run your own
RepoLens is a standard Next.js app. Get the source, add an ANTHROPIC_API_KEY (and ideally a GITHUB_TOKEN) to .env.local, then run npm install and npm run dev. It deploys to Vercel or Netlify as is.