Decorative dependency graph of nodes and links filling the hero. Calls, data and boundaries are three clusters.
cg · local graph
See what a change affects
code-graph builds a local, deterministic graph of routes, calls, data access and platform boundaries. Ask what reaches a table, connection, config key or method, and follow each hop by file:line.
$ cg impact StockService::reserve
- Calls
- Data
- Boundaries
Why cg
A graph you can trust before you edit
- 01
Deterministic
The same tree produces the same graph. Re-index, and the hops do not drift.
- 02
Local
The database stays on your machine. Queries never need a hosted index.
- 03
Evidence
Every hop is a file:line, so a path is something you can open.
- 04
Agents
MCP exposes the graph, so an agent can read impact before it writes.
- 05
Boundaries
Routes, calls, tables, config keys and platform edges share one index, across as many repos as you link.
In use
Watch the graph answer
Stacks
Languages the index reads
Go and other languages can be imported through SCIP.
PHP
Laravel (routes, route attributes, middleware, queues, broadcasting, outbound HTTP)
Python
Django, FastAPI, Flask
TypeScript and JavaScript
Nuxt, Vue, NestJS, Next.js, Astro, Express, Fastify, Koa, Hono, Elysia, React Router, Remix. The extractor runs on Node or Bun.
Dart
Flutter
Kotlin
Android, Kotlin Multiplatform
Java
Spring Boot
Swift
iOS / SwiftPM
Rust
Supported natively
C and C++
Supported natively
Install
Python 3.11+
The package is cg-code-graph. The commands are cg and cg-mcp.
pipx install cg-code-graph
# or: uv tool install cg-code-graph
cg doctor macOS and Linux can also use install.sh. Windows uses install.ps1. Details, updates and extractor setup are in Install .
Explore docs
The pages live in docs/
Start
Graph
Languages
Boundaries
Reference
People