ArchiLens reads your Git repository and generates layered C4-style architecture diagrams — automatically, using AST analysis and AI enrichment. No manual diagrams. No stale docs.
From a single CLI command to a full interactive viewer — ArchiLens covers the whole workflow.
Tree-sitter parses Python, JavaScript, TypeScript, Java, and Go at the AST level — no regex guesswork. Classes, functions, imports, and inheritance are extracted with line-level precision.
tree-sitter 0.25Claude reads each module and writes a one-line business capability summary. Diagrams show what the code does, not just what it's named. Swap any OpenAI-compatible provider.
Claude / OpenAI / OllamaGenerate diagrams as Mermaid, D2, or PlantUML. All formats support every level — L0 through L3 — so you can embed diagrams anywhere: GitHub, Confluence, Notion, or your own docs.
Mermaid · D2 · PlantUMLRun archilens serve for a dark-themed SPA. Click any module in the L1 diagram to drill straight into its L2 component view. Search, filter, and re-analyse without leaving the browser.
Point ArchiLens at your semver tags and watch your architecture grow over time. Detects module additions, removals, and LOC trends with a Mermaid timeline diagram and full markdown report.
archilens historyThe diff command compares architecture between any two Git refs without touching the working tree. Catches layer-skipping, fan-out violations, and new cross-cutting dependencies before they merge.
Real Mermaid output from a sample microservices repo — no configuration required.
Modules detected automatically from directory structure and import analysis
AI assigns a one-line business capability label to every module
Dependency edges come from real import statements — not guesses
Click any node in the interactive viewer to drill into the next level
Each level zooms in further — start with the big picture and drill into any module.
Your system and its external actors — users, third-party services, databases. The 30,000-foot view.
All detected modules and the dependency edges between them, grouped by capability layer.
Classes, interfaces, and inheritance within a single module. Rendered as a class diagram.
Sequence diagrams for each detected process flow — request handling, async events, and more.
No sign-up. No API key required for the basic analysis (AI enrichment is opt-in).
Works with Python 3.10+ on macOS, Linux, and Windows.
Point it at any Git repo — local or freshly cloned.
Open the interactive viewer or read the generated markdown diagrams.
ArchiLens is free, open source, and runs entirely on your machine.