Repository navigation
Codegraph v0.2.0 — Interactive Network Visualization
Highlights
Codegraph v0.2.0 introduces an interactive, local-first network visualization for exploring the files, symbols, and relationships in a TypeScript repository.
What’s new
- Interactive force-directed graph of indexed files and symbols.
- Visual representation of
DEFINES,IMPORTS, andCALLSrelationships. - Search for files and symbols.
- Zoom, pan, graph fitting, relationship filters, and neighborhood focus.
- Hover labels for graph nodes.
- Color legends for files, functions, classes, interfaces, and methods.
- Ask Codegraph interface for deterministic repository questions.
- Change-impact questions that identify callers and potentially affected symbols.
- Clickable results that open the relevant source file and location.
- Local visualization server bound to
127.0.0.1. - Self-contained HTML export for IDE previews.
- Programmatic visualization APIs.
- Automatic npm publishing when a matching GitHub release is published.
Usage
Index a repository:
npx codegraph index .
Open the interactive network:
npx codegraph visualize .
Export the visualization for an IDE HTML preview:
npx codegraph visualize . --output .codegraph/visualization.html
Start the viewer without automatically opening a browser:
npx codegraph visualize . --no-open
Use a custom port:
npx codegraph visualize . --port 5173
Ask Codegraph examples
- Where is
ProjectSessiondefined? - What calls
analyzeProject? - What does
runClicall? - What imports
server.ts? - When I change
analyzeImpact, which symbols may be affected?
Questions are answered locally using the indexed graph. Repository data is not sent to an external language model.
Installation
Install the package as a development dependency:
npm install --save-dev repo-codegraph@0.2.0
The package provides two executables:
codegraphfor indexing, querying, and visualization.codegraph-mcpfor integration with MCP-compatible coding agents.
Validation
- TypeScript checks passed.
- Production build passed.
- 57 tests passed.
- One local-port test was skipped because the validation sandbox does not permit binding a local port.
- The release diff passed whitespace validation.