# RepoLens > RepoLens writes architecture documentation from a repository: modules, API surface, routes, dependency graph, code health, and pull request diffs. Deterministic by default. No API key required. RepoLens is the npm package `@chappibunny/repolens` (Node.js 18+). It is a CLI, a stdio MCP server, and a composite GitHub Action. Use it when a person or an assistant needs an architecture map of a codebase, a code-health badge, or a pull request comment that describes what changed. It does not replace the project's own product docs, and it does not require an OpenAI key to run. ## Install - [npm](https://www.npmjs.com/package/@chappibunny/repolens): `npx @chappibunny/repolens demo` - [GitHub](https://github.com/CHAPIBUNNY/repolens): source, issues, and the composite action - [Gallery](https://chapibunny.github.io/repolens/): architecture pages for public repositories - [MCP install notes](https://github.com/CHAPIBUNNY/repolens/blob/main/llms-install.md): copy-paste steps for coding agents ## CLI - [demo](https://github.com/CHAPIBUNNY/repolens/blob/main/docs/INSTALLATION.md): `npx @chappibunny/repolens demo` writes local docs with no API keys - [publish](https://github.com/CHAPIBUNNY/repolens/blob/main/docs/INSTALLATION.md): `npx @chappibunny/repolens publish` scans and publishes - [badge](https://github.com/CHAPIBUNNY/repolens/blob/main/README.md): `npx @chappibunny/repolens badge` prints shields.io code-health JSON, SVG, or markdown - [comment](https://github.com/CHAPIBUNNY/repolens/blob/main/README.md): `npx @chappibunny/repolens comment --base --head ` prints an architecture diff - [doctor](https://github.com/CHAPIBUNNY/repolens/blob/main/docs/INSTALLATION.md): `npx @chappibunny/repolens doctor` validates setup - [mcp](https://github.com/CHAPIBUNNY/repolens/blob/main/docs/MCP.md): `npx -y @chappibunny/repolens mcp` starts the stdio server ## MCP - [MCP.md](https://github.com/CHAPIBUNNY/repolens/blob/main/docs/MCP.md): client configs for Cursor, Claude Desktop, VS Code, and Cline - Command: `npx -y @chappibunny/repolens mcp` - Tools: `get_system_overview`, `list_modules`, `get_api_surface`, `get_dependency_graph`, `get_architecture_diff`, `generate_docs` - Optional env `REPOLENS_WORKSPACE` points at a repository. Paths cannot leave that directory. `generate_docs` is the only tool that writes files. ## GitHub Action - [Architecture comment](https://github.com/CHAPIBUNNY/repolens/blob/main/README.md): `command: comment` on `pull_request` posts one sticky comment (marker ``, edited in place) - The comment lists modules, files, and dependencies that changed, the code-health delta, and new hotspots - Footer text is "Generated by RepoLens" and links to the repository and the gallery - Permission: `GITHUB_TOKEN` with `pull-requests: write` (checkout also needs `contents: read`). No personal access token - Fork pull requests skip the comment and write the job summary instead - [Badge](https://github.com/CHAPIBUNNY/repolens/blob/main/README.md): `command: badge` writes `repolens-badge.json` and `repolens-badge.svg`. Host the JSON on GitHub Pages and point shields.io at it - `comment` and `badge` run from the action checkout, so they do not wait for an npm publish ## Gallery - [RepoLens gallery](https://chapibunny.github.io/repolens/): one indexable page per curated repository, titled " architecture explained", plus a score page and a README badge - [llms.txt on the site](https://chapibunny.github.io/repolens/llms.txt): this file with links to each explained page - [llms-full.txt](https://chapibunny.github.io/repolens/llms-full.txt): longer description for assistants ## Optional - [llms-full.txt](https://github.com/CHAPIBUNNY/repolens/blob/main/llms-full.txt): install, CLI, MCP, action, and badge in one file - [README](https://github.com/CHAPIBUNNY/repolens/blob/main/README.md): human landing page - [Changelog](https://github.com/CHAPIBUNNY/repolens/blob/main/CHANGELOG.md): release notes ## Gallery pages - [Alamofire architecture explained](https://chapibunny.github.io/repolens/alamofire/explained/): HTTP networking in Swift. - [Alamofire code health](https://chapibunny.github.io/repolens/alamofire/score/): shields.io badge for this scan - [Axum architecture explained](https://chapibunny.github.io/repolens/axum/explained/): Ergonomic HTTP routing and request handling for Rust. - [Axum code health](https://chapibunny.github.io/repolens/axum/score/): shields.io badge for this scan - [Bats architecture explained](https://chapibunny.github.io/repolens/bats/explained/): Bash Automated Testing System. - [Bats code health](https://chapibunny.github.io/repolens/bats/score/): shields.io badge for this scan - [Cobra architecture explained](https://chapibunny.github.io/repolens/cobra/explained/): A commander for modern Go CLI interactions. - [Cobra code health 82](https://chapibunny.github.io/repolens/cobra/score/): shields.io badge for this scan - [Django architecture explained](https://chapibunny.github.io/repolens/django/explained/): The web framework for perfectionists with deadlines. - [Django code health 80](https://chapibunny.github.io/repolens/django/score/): shields.io badge for this scan - [Express architecture explained](https://chapibunny.github.io/repolens/express/explained/): Fast, unopinionated, minimalist web framework for Node.js. - [Express code health 78](https://chapibunny.github.io/repolens/express/score/): shields.io badge for this scan - [FastAPI architecture explained](https://chapibunny.github.io/repolens/fastapi/explained/): Modern, fast web framework for building APIs with Python. - [FastAPI code health 89](https://chapibunny.github.io/repolens/fastapi/score/): shields.io badge for this scan - [Fastify architecture explained](https://chapibunny.github.io/repolens/fastify/explained/): Fast and low-overhead web framework for Node.js. - [Fastify code health 75](https://chapibunny.github.io/repolens/fastify/score/): shields.io badge for this scan - [Fiber architecture explained](https://chapibunny.github.io/repolens/fiber/explained/): Express-inspired web framework written in Go. - [Fiber code health 79](https://chapibunny.github.io/repolens/fiber/score/): shields.io badge for this scan - [Flask architecture explained](https://chapibunny.github.io/repolens/flask/explained/): The Python micro framework for building web applications. - [Flask code health 82](https://chapibunny.github.io/repolens/flask/score/): shields.io badge for this scan - [fmt architecture explained](https://chapibunny.github.io/repolens/fmt/explained/): A modern formatting library for C++. - [fmt code health](https://chapibunny.github.io/repolens/fmt/score/): shields.io badge for this scan - [Gin architecture explained](https://chapibunny.github.io/repolens/gin/explained/): HTTP web framework written in Go. - [Gin code health 93](https://chapibunny.github.io/repolens/gin/score/): shields.io badge for this scan - [Gson architecture explained](https://chapibunny.github.io/repolens/gson/explained/): A Java serialization and deserialization library for JSON. - [Gson code health](https://chapibunny.github.io/repolens/gson/score/): shields.io badge for this scan - [Hono architecture explained](https://chapibunny.github.io/repolens/hono/explained/): Web framework built on Web Standards. - [Hono code health 84](https://chapibunny.github.io/repolens/hono/score/): shields.io badge for this scan - [http4s architecture explained](https://chapibunny.github.io/repolens/http4s/explained/): Typeful, functional HTTP for Scala. - [http4s code health](https://chapibunny.github.io/repolens/http4s/score/): shields.io badge for this scan - [Json.NET architecture explained](https://chapibunny.github.io/repolens/newtonsoft/explained/): High-performance JSON framework for .NET. - [Json.NET code health](https://chapibunny.github.io/repolens/newtonsoft/score/): shields.io badge for this scan - [Ktor architecture explained](https://chapibunny.github.io/repolens/ktor/explained/): Framework for connected applications in Kotlin. - [Ktor code health](https://chapibunny.github.io/repolens/ktor/score/): shields.io badge for this scan - [libuv architecture explained](https://chapibunny.github.io/repolens/libuv/explained/): Cross-platform asynchronous I/O. - [libuv code health](https://chapibunny.github.io/repolens/libuv/score/): shields.io badge for this scan - [mdBook architecture explained](https://chapibunny.github.io/repolens/mdbook/explained/): Create a book from Markdown files. Like GitBook, implemented in Rust. - [mdBook code health](https://chapibunny.github.io/repolens/mdbook/score/): shields.io badge for this scan - [NestJS architecture explained](https://chapibunny.github.io/repolens/nest/explained/): A progressive Node.js framework for building server-side applications. - [NestJS code health 93](https://chapibunny.github.io/repolens/nest/score/): shields.io badge for this scan - [Prisma architecture explained](https://chapibunny.github.io/repolens/prisma/explained/): TypeScript ORM. This page covers the framework core and the SQL core only. - [Prisma code health 90](https://chapibunny.github.io/repolens/prisma/score/): shields.io badge for this scan - [Rack architecture explained](https://chapibunny.github.io/repolens/rack/explained/): A modular Ruby web server interface. - [Rack code health](https://chapibunny.github.io/repolens/rack/score/): shields.io badge for this scan - [Slim architecture explained](https://chapibunny.github.io/repolens/slim/explained/): PHP micro framework for HTTP applications. - [Slim code health](https://chapibunny.github.io/repolens/slim/score/): shields.io badge for this scan - [sqlc architecture explained](https://chapibunny.github.io/repolens/sqlc/explained/): Generate type-safe code from SQL. - [sqlc code health 94](https://chapibunny.github.io/repolens/sqlc/score/): shields.io badge for this scan - [SvelteKit architecture explained](https://chapibunny.github.io/repolens/kit/explained/): Web development, streamlined. - [SvelteKit code health 86](https://chapibunny.github.io/repolens/kit/score/): shields.io badge for this scan - [tRPC architecture explained](https://chapibunny.github.io/repolens/trpc/explained/): End-to-end typesafe APIs. - [tRPC code health 89](https://chapibunny.github.io/repolens/trpc/score/): shields.io badge for this scan