MCPcopy Index your code
hub / github.com/allenanswerzq/llmcc

github.com/allenanswerzq/llmcc @v0.2.65

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.65 ↗ · + Follow
1,544 symbols 4,786 edges 100 files 669 documented · 43%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

llmcc

llmcc brings multi-depth architecture graphs for code understanding and generation.

Our goal is to build a multi-depth, tree-like context / architecture view of a codebase, so a coding agent can walk up (zoom out) for structure and intent, then walk down (zoom in) to the exact crates/modules/files/symbols it needs—getting a highly comprehensive understanding of any codebase (any programming language).

Supported Languages

Language Status Notes
Rust ✅ Supported Full support for crates, modules, and symbols
TypeScript ✅ Supported Includes TSX, supports ES modules
C++ 🔜 Planned Coming soon
Python 🔜 Planned Coming soon

Why multi-depth graphs?

People (and coding agents) need to understand systems from different dimensions. Sometimes you need the high-level architecture to see boundaries, ownership, and how subsystems connect; other times you need the low-level implementation details to make a safe, precise change. llmcc provides multiple depths so you can choose the right “distance” from the code for the task.

Depth Perspective Best for
0 Project multi-workspace / repo-to-repo relationships
1 Library/Crate ownership boundaries, public API flow
2 Module subsystem structure, refactor planning
3 File + symbol implementation details, edit planning

Walkthrough: Codex (midterm size multi-crate rust project)

This repo includes many examples under sample. Download and open them in browser for the best viewing experience.

Depth 1: crate graph

<img src="https://github.com/allenanswerzq/llmcc/raw/v0.2.65/sample/rust/codex-pagerank/depth_1_crate.svg" alt="Codex crate graph (depth 1)" style="max-width: 100%; height: 100%;" />

Depth 2: module graph

<img src="https://github.com/allenanswerzq/llmcc/raw/v0.2.65/sample/rust/codex-pagerank/depth_2_module.svg" alt="Codex module graph (depth 2)" style="max-width: 70%; height: auto;" />

Depth 3: file + symbol graph

<img src="https://github.com/allenanswerzq/llmcc/raw/v0.2.65/sample/rust/codex-pagerank/depth_3_file.svg" alt="Codex file and symbol graph (depth 3)" style="max-width: 100%; height: auto;" />

Here's a small portion of the graph at depth 3, showing the core abstraction layer for prompt handling in Codex. Developers and AI agents can quickly grasp the architecture by examining this view.

<img src="https://github.com/allenanswerzq/llmcc/raw/v0.2.65/doc/codex.jpg" alt="codex core logic" style="max-width: 100%; height: auto;" />

Performance

llmcc is designed to be very fast, and we will try to make it faster.

The repo contains benchmark for many famous project output here: sample/benchmark_results_16.md.

Excerpt (PageRank timing, depth=3, top-200):

Project Files LoC Total
databend 3130 627K 2.53s
ruff 1661 418K 1.73s
codex 617 224K 0.46s

Installation

npm / npx (Recommended)

The easiest way to use llmcc is via npm. No build required:

# Run directly without installing
npx llmcc-cli --help

# Or install globally
npm install -g llmcc-cli
llmcc --help

Cargo (Rust)

cargo install llmcc

From Source

git clone https://github.com/allenanswerzq/llmcc.git
cd llmcc
cargo build --release
./target/release/llmcc --help

CLI: generate graphs

Generate a crate-level graph for Codex (DOT to stdout):

llmcc \
    -d sample/repos/codex/codex-rs \
    --graph \
    --depth 1

Generate a PageRank-filtered file+symbol graph (write to a file):

llmcc \
    -d sample/repos/codex/codex-rs \
    --graph \
    --depth 3 \
    --pagerank-top-k 200 \
    -o /tmp/codex_depth3_pagerank.dot

Render DOT to SVG (requires Graphviz):

dot -Tsvg /tmp/codex_depth3_pagerank.dot -o /tmp/codex_depth3_pagerank.svg

For generating sample graphs:

just gen rust

Extension points exported contracts — how you extend this code

Snapshot (Interface)
A snapshot that can be captured from compilation context and rendered to text. [3 implementers]
crates/llmcc-test/src/snapshot/mod.rs
LanguageTraitImpl (Interface)
Extension trait for providing custom parse implementations. [2 implementers]
crates/llmcc-core/src/lang_def.rs
ToolDefinition (Interface)
(no doc)
agent/tools/src/index.ts
FunctionDefinition (Interface)
(no doc)
agent/bridge/src/types.ts
NativeMessage (Interface)
(no doc)
agent/chrome/src/native-messaging.ts
ToolDefinition (Interface)
(no doc)
agent/llcraft/src/tools.ts
LanguageHandler (Interface)
Object-safe language handler trait. This wraps static `LanguageTrait` methods into dynamic dispatch. [2 implementers]
crates/llmcc-core/src/lang_registry.rs
ToolCall (Interface)
(no doc)
agent/tools/src/index.ts

Core symbols most depended-on inside this repo

push
called by 252
crates/llmcc-core/src/scope.rs
clone
called by 132
crates/llmcc-core/src/ir.rs
visit_children
called by 99
crates/llmcc-core/src/graph_builder.rs
get
called by 95
crates/bumpalo-herd/src/lib.rs
child_by_field
called by 91
crates/llmcc-core/src/ir.rs
is_empty
called by 80
crates/llmcc-tree/src/lib.rs
add_relation
called by 70
crates/llmcc-core/src/graph.rs
as_scope
called by 67
crates/llmcc-core/src/ir.rs

Shape

Method 916
Function 401
Class 154
Interface 58
Enum 15

Languages

Rust80%
TypeScript14%
Python6%

Modules by API surface

crates/llmcc-core/src/block.rs98 symbols
crates/llmcc-test/src/runner.rs77 symbols
crates/llmcc-core/src/context.rs72 symbols
crates/llmcc-core/src/ir.rs61 symbols
crates/llmcc-core/src/symbol.rs57 symbols
crates/llmcc-core/src/printer.rs53 symbols
crates/llmcc-core/src/block_rel.rs50 symbols
crates/llmcc-ts/src/collect.rs44 symbols
crates/llmcc-core/src/scope.rs44 symbols
crates/llmcc-core/src/lang_def.rs43 symbols
crates/llmcc-rust/src/bind.rs41 symbols
crates/llmcc-rust/src/collect.rs39 symbols

For agents

$ claude mcp add llmcc \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page