Skip to content

Home

ArchMAP

Map Your Architecture. Control Your Future.

CI PyPI Python MIT

Get started CLI reference


ArchMAP is a static architecture analysis toolkit for source repositories. It parses code, builds dependency graphs, detects circular dependencies, computes complexity and risk signals, and exposes the results through a rich CLI, an interactive web UI, and an MCP server for AI assistants.

pip install KG-ARCHMAP
archmap analyze . --format both
archmap serve .

Why ArchMAP

  • Dependency graphs, 9 languages


    Python, JavaScript, TypeScript, Rust, Go, PHP, Java, C#, and C/C++. Tree-sitter is used as a resilient primary parser with an automatic per-file regex fallback.

    Architecture

  • Cycle & risk detection


    Strongly-connected-component cycle detection, god-module / layer-violation / dependency-explosion smells, and a composite risk score per file.

    Risk command

  • CI quality gates


    Fail the build on cycles, architectural risks, coupling budgets, or a low import-resolution rate. SARIF export integrates with GitHub Code Scanning.

    Analyze command

  • AI-native


    An MCP server exposes the analysis engine to Claude Code, Cursor, and Windsurf, a persistent archmap memory digest keeps agents oriented across sessions without re-exploring the codebase, plus an optional LLM architectural advisor.

    MCP server

Getting started

archmap CLI

  1. Installation — PyPI, Docker, and the optional tree-sitter extra
  2. Quick Start — analyze and serve your first project
  3. Live Demo

CLI reference

Command Purpose
analyze Full report, quality gates, Mermaid/JSON/Cytoscape/SARIF
explain Human-readable architecture summary
risk Blast radius and risk score for a file
improve Structural suggestions + refactor script
serve Interactive web UI with graph, insights, trace, advisor
diff Compare git refs or JSON snapshots
trace BFS reachability from any entrypoint
init Generate .archmap.toml from a real dependency graph
advise LLM-powered architectural advisor
temporal Temporal coupling via git history
mcp MCP server for AI assistant integration (8 tools)
memory Persistent architecture digest for AI coding agents
watch Continuous analysis on file change
netscan Network host discovery + port scanning, nmap-style
expose Correlate open network ports/services with the dependency graph

What's new

  • 1.2.0archmap memory: a persistent markdown digest of the project's architecture for AI coding agents to read at session start instead of re-exploring the codebase, with ready-made Claude Code hook integration and a new get_project_memory MCP tool.
  • 1.1.1archmap expose gains per-finding confidence scoring (an exact host:port literal found in code beats a bare service-name guess) and [network.rules] drift detection — declared-vs-observed architecture extended to the network boundary.
  • 1.1.0archmap netscan and archmap expose: nmap-style network discovery, port scanning, per-port risk classification (stdlib-only, works on Termux without root), and correlation with the codebase's dependency graph. Web UI mobile/Termux fixes, and fail-fast on a nonexistent project path.
  • 1.0.3 — tree-sitter becomes a resilient primary parser with automatic per-file fallback to the regex path; structured C# extraction.

See the full Changelog and Roadmap.

Governance and release

Attribution

Original distributor: Kaua Gabriel / Kauã Gabriel (Kaua-KGzin). See Original Distribution Notice and the MIT License.