Skip to main content
Open-source architecture analysis

See the structure
your repo hides

MorphArch scans Git history, builds dependency graphs, computes health scores, and helps you inspect structure, drift, and hotspots — all from a terminal UI designed for large codebases.

$ cargo install morpharch
RustTypeScriptJavaScriptPythonGo
morpharch watch .
MorphArch terminal UI showing architecture health dashboard
Works with
NxTurborepopnpm workspacesCargo workspacesLerna

Everything you need to understand your architecture

MorphArch is designed for repeated local analysis — not a one-time graph dump, but an operational tool for ongoing architecture review.

Git-native history scanning

Walk first-parent history with gix (pure Rust). Store per-commit snapshots locally and reuse cache on repeated scans.

Language-aware parsing

Extract dependency edges from Rust, TypeScript, JavaScript, Python, and Go with comment-safe fast paths and tree-sitter AST fallback.

Scale-aware health scoring

Six-component 0–100 health score that adapts baselines for repository size. No false positives on large monorepos.

Blast radius analysis

Inspect downstream impact for high-risk modules. See which changes are likely to ripple through the dependency graph.

Cluster-first navigation

Start with a grouped map view. Drill into cluster details and then individual modules — never start with raw graph chaos.

AI architecture assistant

Ask natural language questions about health, coupling, hotspots, and blast radius. Works with OpenAI, Ollama, or any compatible API.

A 0–100 score built from six debt components

Each component is weighted, scale-aware, and configurable. The score adapts its baselines to your repository size.

Cycle30%

Circular dependency detection via SCC analysis

Layering25%

Back-edges violating layered architecture

Hub15%

God modules with high fan-in and fan-out

Coupling12%

Edge weight density and import concentration

Cognitive10%

Graph complexity and degree excess

Instability8%

Brittle modules via Martin instability metric

90–100Clean
70–89Healthy
40–69Warning
0–39Critical

Structure before raw detail

Large repositories are easier to review when you start at the cluster level. MorphArch keeps the raw graph available, but only surfaces it when you need it.

01

Map

Start with grouped clusters so large repositories are readable before looking at individual nodes.

02

Cluster details

Open a subsystem to inspect members, dependencies, and link pressure between clusters.

03

Inspect

Focus one module with a one-hop subgraph. See who depends on it, what it pulls in, and its blast radius.

Ask your architecture questions in plain language

Press a in the TUI to open the AI panel. It uses the full architecture context — health scores, dependency edges, blast radius, churn hotspots, cycle groups — to answer your questions.

"Which modules are the most fragile?"
"How can I break the circular dependencies?"
"/diff 5 — what changed in the last 5 commits?"
Compatible withOpenAIOllamaLM StudioAzure OpenAI
AI Assistant
You:What is the riskiest module?
AI:parser/resolver has the highest blast score (0.72) with 14 downstream dependents. It sits in a cycle with graph_builder and has instability I=0.89. Consider extracting the shared types into a leaf module to break the cycle and reduce ripple risk.

Install in seconds, analyze in minutes

Choose your preferred method. No build dependencies required.

$ cargo install morpharch
1
Installcargo install morpharch
2
Scan & open TUImorpharch watch .
3
Review architectureMap → Cluster → Inspect

Built for people who care about architecture

Architects

Review boundaries, coupling, and structural pressure without manually reading a full dependency graph.

Tech Leads

Track drift over time, review what changed between commits, and identify parts of the repo that are becoming harder to change.

Developers

Answer practical questions — who depends on a module, what it pulls in, and what changes are likely to ripple outward.

Built in the open

MorphArch is Apache-2.0 / MIT licensed. Contributions around language support, clustering, scan correctness, TUI polish, and documentation are welcome.

Apache-2.0 / MITLicense
5 languagesSupported
Pure RustNo git CLI

Start with one scan

Install MorphArch, point it at a repository, and see architecture health in under a minute.