-
-
Notifications
You must be signed in to change notification settings - Fork 0
Quickstart
This walks through building a graph for a repository and using it. It assumes the
codegraph binary is on your PATH (see Installation).
cd your-project
codegraph extract .This scans the directory, extracts symbols and relationships, clusters and analyzes the
graph, and writes everything to codegraph-out/. It honors .gitignore and
.codegraphignore, skips dependency and build directories, and skips sensitive files such
as .env and private keys. A code-only run makes no network calls. See
Extraction for the full discovery and caching behavior.
Key outputs (full list in Output Formats):
-
codegraph-out/graph.json- the canonical graph -
codegraph-out/GRAPH_REPORT.md- structural insight report -
codegraph-out/graph.html,graph-3d.html,graph.svg- visualizations
Open codegraph-out/GRAPH_REPORT.md for god nodes (most-connected symbols), surprising
connections, import cycles, and suggested questions. See
Analysis and Reports.
# Relevant subgraph for a topic:
codegraph query "authentication flow"
# Depth-first expansion (favors deep call chains):
codegraph query "request lifecycle" --dfs --max-nodes 40
# Shortest path between two symbols:
codegraph path login validate_token
# A node and its neighbours:
codegraph explain parse_config
# Reverse impact: what depends on a symbol?
codegraph affected parse_config --depth 3See Querying for how seeds are resolved and how traversal works.
Open the generated files in a browser:
-
graph.html- 2D explorer with search, community color, and relation filters -
graph-3d.html- 3D force graph -
tree.html- file tree;callflow.html- call-flow diagram
See Visualizations.
codegraph update path/to/changed_file.rs # incremental rebuild
codegraph watch # rebuild automatically on save
codegraph hook install # rebuild on commit/checkout via git hooksSee Incremental Updates.
codegraph serve # MCP server over stdio
codegraph install # wire CodeGraph into a host assistantinstall wires CodeGraph into a host assistant so it queries the graph before grepping or
reading files: a Claude skill file + hooks, an always-on instructions block for other
assistants, and a native MCP server + hook for Codex. See MCP Server and
Assistant Integration.
- Multiple repos or a monorepo: Workspaces and Federation
- Enrich docs/papers with an LLM: Semantic Analysis
- Pull in external sources: Ingestion
- Every flag of every command: Commands
Getting started
Concepts
Using CodeGraph
Integrations
Scaling
Reference