# RepoLens

Scans a repository and builds architecture documentation: overview, modules, API surface, routes, dependency graph. Useful when the docs have drifted from the code.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: CHAPIBUNNY
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/CHAPIBUNNY/repolens
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/repolens

## What it does

RepoLens reads your source tree and produces a set of documents, from engineer-facing to readable without code context. That covers an architecture overview, a module catalog, the API surface, a route map, a dependency graph and a change impact report. Seventeen document types in total, split across three audiences.

Two modes are available. The deterministic one costs nothing and needs no keys. AI enhancement is optional and hooks into GitHub Models, OpenAI, Anthropic, Google, Azure or Ollama. Output goes to Notion, Confluence, GitHub Wiki, Obsidian or Markdown. Obsidian wants `obsidian.vault` set in `.repolens.yml` and takes no API key; Notion and Confluence read their tokens from `.env`.

Node.js 18+ is required. Install the package with `npm install @chappibunny/repolens`, then `npx @chappibunny/repolens init` writes the config and a GitHub Actions workflow. Coming from v0.3.0 or earlier, run `npx @chappibunny/repolens migrate` — skip it and your existing workflow files stay untouched.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `REPOLENS_WORKSPACE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env REPOLENS_WORKSPACE=<REPOLENS_WORKSPACE> --transport stdio repolens -- npx -y @chappibunny/repolens
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add repolens --env REPOLENS_WORKSPACE=<REPOLENS_WORKSPACE> -- npx -y @chappibunny/repolens
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "repolens": {
            "command": "npx",
            "args": [
                "-y",
                "@chappibunny/repolens"
            ],
            "env": {
                "REPOLENS_WORKSPACE": "<REPOLENS_WORKSPACE>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "repolens": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@chappibunny/repolens"
            ],
            "env": {
                "REPOLENS_WORKSPACE": "<REPOLENS_WORKSPACE>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e REPOLENS_WORKSPACE=<REPOLENS_WORKSPACE> repolens npx -y @chappibunny/repolens
```
Replace <…> with your own values

## When to use it
- generate an architecture overview without writing it by hand
- pull a module catalog and API surface out of the code
- map the dependency graph of a repository
- give non-engineers a readable system overview
- keep docs current on every push

## Example prompts
- Scan this repository and generate the architecture overview
- Show me the module catalog and API surface for this project
- Publish the generated docs to Markdown

## Similar
- [Reactive Resume](https://affpapa.org/en/nevibecode/mcp/reactive-resume.md) — MCP server · ★ 44874
- [Sui Knowledge Base (kapa.ai)](https://affpapa.org/en/nevibecode/mcp/sui-knowledge-base-kapaai.md) — MCP server · ★ 7784
- [Claude Code Ultimate Guide](https://affpapa.org/en/nevibecode/mcp/claude-code-ultimate-guide.md) — MCP server · ★ 6237
- [Zotero MCP](https://affpapa.org/en/nevibecode/mcp/zotero-mcp.md) — MCP server · ★ 5548
- [RevoGrid DataGrid MCP Pro](https://affpapa.org/en/nevibecode/mcp/revogrid-datagrid-mcp-pro.md) — MCP server · ★ 3450
- [Claude Code Explorer MCP](https://affpapa.org/en/nevibecode/mcp/codeaashu-claude-code-explorer-mcp.md) — MCP server · ★ 3409

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
