The Problem Every Developer Knows Too Well

You just joined a new team. The repository has 200,000 lines of code, dozens of services, and documentation that is two years out of date. Where do you even start?

This is the reality for most developers. We spend more time reading code than writing it, yet our tools are still built around text editors and file trees. Understanding how a codebase fits together is one of the slowest, most painful parts of software engineering.

Enter Understand-Anything — an open-source AI tool that just hit 40,000 GitHub stars and is the #1 trending repository today. It turns any codebase into an interactive knowledge graph, making the invisible architecture visible. In this tutorial, you will learn how to set it up, analyze your own project, and actually use the output.

What Is Understand-Anything?

Understand-Anything is a plugin for AI coding assistants (Claude Code, Cursor, VS Code Copilot, Codex, OpenClaw, and 13+ other platforms) that runs a multi-agent pipeline to:

  • Parse every file in your project using Tree-sitter for deterministic structural analysis
  • Extract functions, classes, imports, exports, and call-site relationships
  • Build a knowledge graph saved as a JSON file
  • Display an interactive dashboard where you can pan, zoom, search, and explore
  • Summarize each node in plain English using LLM-based semantic analysis

The key idea: a graph that teaches you how every piece fits together, not just one that looks impressive.

Step 1 — Install for Your Platform

Understand-Anything supports almost every AI coding tool. Pick the method that matches your setup.

Option A: Claude Code (Native Plugin)

If you use Claude Code, install it through the plugin marketplace:

/plugin marketplace add Lum1104/Understand-Anything
/plugin install understand-anything

Option B: Universal Install Script (macOS / Linux)

For Cursor, Codex, OpenCode, or any other supported platform, run the one-liner installer. Replace codex with your platform name:

curl -fsSL https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.sh | bash -s codex

Supported platform identifiers include: gemini, codex, opencode, openclaw, vscode, cursor, trae, cline, kimi, and more.

Option C: Windows (PowerShell)

iwr -useb https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.ps1 | iex

Option D: Cursor (Auto-Discovery)

Just clone the repository into your project. Cursor auto-discovers the plugin via .cursor-plugin/plugin.json:

git clone https://github.com/Lum1104/Understand-Anything.git
# Open your project in Cursor — plugin appears automatically

Step 2 — Run the Analysis

Navigate to your project directory and run the core command:

/understand

This kicks off a 5-agent pipeline:

AgentResponsibility
project-scannerDiscovers files, detects languages and frameworks
file-analyzerExtracts functions, classes, imports; builds graph nodes and edges
architecture-analyzerIdentifies architectural layers (API, Service, Data, UI, Utility)
tour-builderGenerates guided learning tours ordered by dependency
graph-reviewerValidates graph completeness and referential integrity

The output is saved to .understand-anything/knowledge-graph.json. File analyzers run in parallel (up to 5 concurrent workers, 20-30 files per batch), so even large projects finish quickly.

Useful Flags

# Multi-language output (node summaries and dashboard UI)
/understand --language zh

# Auto-update the graph on every commit
/understand --auto-update

# Scope analysis to a subdirectory (monorepos)
/understand src/frontend

# Full LLM review (slower but more thorough)
/understand --review

Step 3 — Explore the Interactive Dashboard

After the graph is built, launch the dashboard:

/understand-dashboard

The dashboard presents your codebase as a color-coded, force-directed graph. Here is what you can do:

  • Pan and zoom across the entire codebase visually
  • Click any node to see its source code, relationships, and a plain-English explanation
  • Search by name or meaning — ask "which parts handle auth?" and get relevant results
  • View the domain graph to see how code maps to business processes (domains, flows, steps)
  • Run impact analysis to see which parts of the system your current changes affect

The dashboard also adapts its detail level based on your role — junior developer, product manager, or senior architect.

Step 4 — Use the Action Commands

Understand-Anything ships with several focused commands beyond the graph itself:

# Ask natural-language questions about the codebase
/understand-chat How does the payment flow work?

# Analyze the impact of your current uncommitted changes
/understand-diff

# Deep-dive into a specific file or function
/understand-explain src/auth/login.ts

# Generate an onboarding guide for new team members
/understand-onboard

# Extract business domain knowledge
/understand-domain

# Analyze a wiki / knowledge base (Karpathy-pattern)
/understand-knowledge ~/path/to/wiki

Step 5 — Commit the Graph for Your Team

The knowledge graph is just JSON, which means you can commit it once and your teammates can explore the codebase without running the pipeline themselves. This is incredibly useful for onboarding and PR reviews.

# What to commit
git add .understand-anything/*.json

# What to exclude (local scratch files)
# .understand-anything/intermediate/
# .understand-anything/diff-overlay.json

# For large graphs (10 MB+), use Git LFS
git lfs install
git lfs track ".understand-anything/*.json"
git add .gitattributes .understand-anything/

Why This Approach Works

Understand-Anything uses a hybrid strategy that plays to each technique's strengths:

  • Tree-sitter (deterministic) parses source into concrete syntax trees and extracts structural facts — imports, exports, function definitions, call sites. Same input always produces the same output.
  • LLM (semantic) reads the parsed structure alongside the original source to produce what parsers cannot: plain-English summaries, architectural layer assignments, business-domain mapping, and guided tours.

This split means the graph is reproducible on the structural side while still capturing intent on the semantic side. It is not just a static call graph — it is a living map of what your code does and why.

Getting Started in 5 Minutes

  1. Pick your AI coding platform (Claude Code, Cursor, VS Code, etc.)
  2. Install Understand-Anything using the method above
  3. Navigate to any project and run /understand
  4. Open the dashboard with /understand-dashboard
  5. Click around, search, and ask questions

The tool is open-source under the MIT license and works with any language. Whether you are onboarding to a massive monorepo or reviewing a PR in an unfamiliar service, a knowledge graph is the fastest way to go from lost to productive.

Check it out on GitHub: Lum1104/Understand-Anything