Powered by Claude Code

Your architecture,
as a report

Point archlens-ai at any codebase — or just describe a system — and get an interactive HTML report with an architecture graph, health scores, anti-pattern detection, and refactoring suggestions.

npm install -g archlens-ai View on GitHub
terminal
$ npx archlens-ai analyze ./my-project
 
  archlens-ai — /home/user/my-project
 
  Lendo estrutura ············ 214 arquivos
  Configuração 3 encontrados, 12 padrões detectados
  Chamando Claude Code (2 fases)...
  → 8 tecnologias · 11 módulos
  → Health score: 72/100
 
  Relatório: ~/archlens-reports/my-project.html

Up and running
in two steps

archlens-ai runs locally — everything goes through your own Claude Code CLI. No cloud upload, no account needed beyond Claude.

1
Install & authenticate Claude Code
# Install Claude Code CLI
$ npm install -g @anthropic-ai/claude-code
 
# Authenticate (opens browser once)
$ claude
 
# Confirm it works
$ claude --version

Requires Node.js 18+ · claude.ai/code

2
Install archlens-ai & run
# Install globally
$ npm install -g archlens-ai
 
# Or run without installing
$ npx archlens-ai analyze ./my-project
 
# Greenfield — no code needed
$ archlens-ai suggest "e-commerce platform"

Report saved to ~/archlens-reports/ and opened automatically

Common commands
Analyze current directory
archlens-ai analyze
Security profile
archlens-ai analyze . --profile security
Deep analysis (reads file contents)
archlens-ai analyze . --depth deep
Report in English
archlens-ai analyze . --lang en
Monorepo (packages/, apps/, services/)
archlens-ai analyze . --monorepo
CI quality gate
archlens-ai analyze . --min-score 70 --no-open

See it in action

Real reports generated by archlens-ai on actual codebases. Explore the full UI — interactive graph, tabs, module scores, and more.

Analyze what exists.
Design what doesn't.

Works with any existing codebase or from a plain description — no code required.

Analyze
Existing project
Point at any codebase. archlens-ai scans your files, builds a dependency graph, and asks Claude to analyze your tech stack and module structure.
Sistema Estado Atual Sugerido Diff Ciclos Qualidade
$ archlens-ai analyze ./my-project
Suggest
Greenfield design
Describe a system in plain text. archlens-ai generates a complete architecture with a naive baseline, an optimized proposal, architectural decisions, and a phased roadmap.
Sistema Estado Atual Sugerido Diff Decisões Roadmap
$ archlens-ai suggest "ride-hailing platform"

Everything you need to
understand your architecture

One command. A self-contained HTML file you can share, open offline, and explore interactively.

Interactive Graph
Cytoscape.js diagram with force/tree/ring layouts, real-time search, neighbor highlight, breadcrumb navigation, and click-to-inspect panels.
Tech Stack Map
Frameworks, databases, caches, and brokers in enterprise-style grouped containers. Protocol-colored edges (HTTP, gRPC, AMQP, Redis). Issues and suggestions per node.
Anti-Pattern Detection
God Class, Feature Envy, Shotgun Surgery, Data Clump, Dead Code, Primitive Obsession — with severity rating and exact affected modules.
Module Scores
0–100 per module with cohesion, coupling, and size breakdown. Worst modules bubble to the top of the Quality tab for quick triage.
Circular Dependencies
DFS cycle detection across all modules, highlighted in red with clickable paths and a how-to-fix guide (interface injection, shared module extraction).
Test Coverage
Correlates test files with modules, scores coverage, and ranks untested modules by business risk so you know exactly where to write tests first.
Suggested Architecture
Concrete refactoring proposals with type (split/merge/create/remove), reason, impact level, and affected modules — shown in a diff overlay on the graph.
Greenfield Mode
Describe a system. Get a naive baseline, an optimized architecture, architectural decision records with pros/cons, and a phased implementation roadmap.
Monorepo Support
Detects workspaces under packages/, apps/, services/. Analyzes each independently and generates a consolidated health dashboard with aggregate stats.
📄
Written Report View
One click switches the interactive graph into a scrollable document — full prose analysis, score breakdowns, and roadmap. Same data, shareable format. No extra AI call.

Visual or written —
your choice

Every report ships with both. No extra AI call — the written view is rendered from the same JSON Claude returned.

Visual
Interactive graph
Cytoscape.js diagram with clickable nodes, neighbor highlighting, real-time search, and a side panel showing full details per component or module.
Sistema Estado Atual Sugerido Diff Ciclos Qualidade
Written
Scrollable document
Executive summary, per-node tech analysis, module cards with score bars, change rationale, anti-patterns, ADRs, and roadmap — all in readable prose.
Resumo Sistema Módulos Qualidade Roadmap
Toggle with the Relatório button in the report header

Four steps from
code to insight

No config required. No cloud upload. Everything runs locally through your Claude Code CLI.

1
Scan
fast-glob walks your project, builds an import graph from source files, reads config files (package.json, docker-compose, application.yml), and detects technology patterns across your stack. A progress bar shows file count in real time.
2
Macro prompt → tech stack
Claude Code analyzes your infrastructure: frameworks, databases, caches, message brokers. It identifies real issues (misconfigured connection pools, missing DLQs, unconfigured TTLs) and gives actionable suggestions per node.
3
Micro prompt → module structure
Using the macro result as context, Claude Code maps source files into logical modules, scores cohesion and coupling, detects anti-patterns, and proposes a refactored architecture with concrete, reasoned changes.
4
Render → self-contained HTML
A single HTML file is written to ~/archlens-reports/ with Cytoscape.js embedded — no server, no dependencies, opens in any browser offline. Share it as an attachment, commit to the repo, or link in a PR.

Zero config by default.
Powerful when you need it.

Drop a .archlens.json at your project root. CLI flags always take precedence.

.archlens.json
{
  "ignore": ["dist", "coverage"],
  "depth": "deep",
  "lang": "en",
  "profile": "architecture",
  "minScore": 60
}
CI quality gate
# .github/workflows/archlens.yml
- name: Architecture quality gate
  run: npx archlens-ai analyze . \
         --min-score 70 --no-open

# Exit 1 when score < 70 — blocks the merge
--profile architecture
Default. Module cohesion, coupling, dependency structure, and concrete refactoring proposals.
--profile security
OWASP Top 10 focus — auth gaps, injection risks, exposed secrets, missing rate limits, vulnerable dependencies.
--profile performance
N+1 queries, missing pagination, sync blocking I/O, caching opportunities, missing indexes.
--depth deep
Reads up to 3KB of key file contents and includes them in the Claude prompt for richer, more precise analysis.

Eight views,
zero configuration

Every report is interactive — click to drill in, search nodes in real time, navigate with breadcrumbs.

both modes
Sistema
Tech stack graph in enterprise-style containers. Click a node for issues, suggestions, and related modules.
both modes
Estado Atual
Current module map. Health, responsibilities, scores, dependencies, and anti-patterns per module.
both modes
Sugerido
Proposed architecture with diff status (added / changed / removed) overlaid on the graph.
both modes
Diff
Change cards — type, impact, reason, and affected modules. Scrollable bottom panel.
analyze only
Ciclos
Circular dependency detection. Cycles highlighted in red with fix guidance and clickable modules.
analyze only
Qualidade
Anti-patterns, module score ranking, and test coverage priorities — all in one panel.
suggest only
Decisões
Architectural decision records — why each technology or boundary was chosen, with honest pros, cons, and alternatives.
suggest only
Roadmap
Phased implementation plan with realistic durations, concrete steps, and which modules are delivered per phase.

One command.
Works on any project.

No config required. Requires Claude Code CLI and Node.js 18+.

$ npx archlens-ai analyze ./my-project
Get started → View source