Skip to content

Codegraph v0.2.1 - Interactive Network Visualization

Choose a tag to compare

@RuchiPurohit RuchiPurohit released this 21 Oct 19:48
· 14 commits to main since this release
b4a8677

Highlights

Codegraph v0.2.1 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, and CALLS relationships.
  • 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 ProjectSession defined?
  • What calls analyzeProject?
  • What does runCli call?
  • 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.1

The package provides two executables:

  • codegraph for indexing, querying, and visualization.
  • codegraph-mcp for 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.