Overview
CodeMapper is a tool designed to analyze large Go codebases and visualize function dependencies in an interactive graph. It helps you understand how functions and methods are connected across your project, making onboarding and refactoring easier.
UI Inspiration: Inspired by n8n.io for intuitive graph exploration.
Problem Statement β
Manually tracing dependencies across 40+ repositories is slow and error-prone. CodeMapper automates discovery and visualization of relationships.
Features β¨
- Automatic Go code analysis
- Dependency mapping between functions and methods
- Interactive visualization (drag nodes to rearrange)
- Simple CLI workflow
- Front tracking and backtracking of dependencies
- Export visualization as PNG
How It Works βοΈ
- Scans your Go project for definitions and call sites.
- Generates a dependency map (JSON).
- Serves an interactive visualization.
Quick Start π¦
go run main.go -path "./proj" -gopath "/user/go/pkg/mod" \
-analyze-deps "example.org/dep1,example.org/dep2" \
-out "full-codemap.json" -serve ":8080"
# Open http://localhost:8080
Command Line Arguments
- -path: project directory
- -gopath: Go module cache directory
- -analyze-deps: comma-separated dependencies
- -out: output JSON filename
- -serve: start server address
License π
MIT