"Walk your code like a city at midnight."
RetroSpec is a 3D city generator that renders your entire Git history as an explorable neon metropolis. Every commit is a building. Every branch is a boulevard. Every merge is an intersection. Fly through your project's past and see the architecture of your code in three dimensions.
You've seen git log --graph. You've seen GitHub's network graph. You've seen Gource's particle time-lapse. None of them let you walk through your repository.
RetroSpec transforms the abstract DAG of commits, branches, and merges into a navigable 3D cityscape β procedural, synthwave-soaked, and beautiful. It turns code archaeology into an experience.
"A repository is a city built over time. Every commit is a brick. Every author is an architect. Every merge is a crossroads."
Imagine flying over a neon city at night:
- Buildings β Each commit is a skyscraper. Height = lines changed. Width = files touched. Color = author. The tallest buildings are your biggest commits.
- Streets β Branches are boulevards lit in their author's color. The main branch is a wide highway pulsing with activity.
- Intersections β Merges are glowing plazas where streets converge. Cherry-picks are skybridges between buildings.
- Landmarks β Tags and releases are landmark towers with rotating beacons. Version numbers glow on their facades.
- Districts β Directories become districts, color-coded by function. You can see at a glance which parts of the codebase grew the most.
- Skyline β A sunstrip gradient horizon, grid lines at ground level, subtle particle system for ambient atmosphere.
- Time scrub β A slider that lets you scrub through time. Watch the city build itself from the first commit to the present. Buildings rise, streets extend, neighborhoods grow.
| Layer | Technology | Why |
|---|---|---|
| Language | Rust | Performance-critical 3D rendering + git parsing |
| 3D Engine | Bevy 0.15 | Modern ECS architecture, great for this kind of visualization |
| Git Parsing | git2 crate |
libgit2 bindings β full DAG traversal, blame, stats |
| Window/Input | Bevy + Winit | Keyboard + mouse free-fly camera controls |
| Assets | Procedural + glTF | City geometry generated at runtime, no external assets needed |
| Audio | optional (Kira) | Ambient synthwave soundtrack that reacts to commit density |
retro-spec/
βββ src/
β βββ main.rs # Entry point, CLI parsing
β βββ cli.rs # Clap CLI (--repo, --theme, --export, etc.)
β βββ city/ # City generation
β β βββ mod.rs
β β βββ planner.rs # Takes commit DAG β city layout (street grid, lot assignment)
β β βββ builder.rs # Takes layout β 3D mesh generation (buildings, streets, landmarks)
β β βββ districts.rs # Directory β district mapping, color-coding
β βββ git/ # Git history parsing
β β βββ mod.rs
β β βββ dag.rs # Full DAG traversal, topological sorting
β β βββ commit.rs # Commit stats (lines, files, branching factor, time)
β β βββ blame.rs # Author attribution, heat mapping
β βββ render/ # Bevy rendering
β β βββ mod.rs
β β βββ terrain.rs # Ground plane, grid, horizon, skybox
β β βββ buildings.rs # Skyscraper entities with window grid textures
β β βββ streets.rs # Branch boulevard meshes with lane markings
β β βββ lighting.rs # City lighting system (neon, ambient, building windows)
β β βββ particles.rs # Ambient particle effects
β β βββ camera.rs # Free-fly camera controller (FPS-style + orbit)
β βββ ui/ # HUD and interaction
β β βββ mod.rs
β β βββ hud.rs # Info overlay (commit details, author, date, stats)
β β βββ timeline.rs # Time scrubber UI widget
β β βββ legend.rs # Color-coded author/directory legend
β βββ export/ # Output
β β βββ mod.rs
β β βββ video.rs # Flythrough video export
β β βββ screenshot.rs # High-res screenshot capture
β βββ theme/ # Visual themes
β βββ mod.rs
β βββ synthwave84.rs # Default: sunset gradients, magenta/cyan neon
β βββ matrix.rs # Green-on-black, digital rain particles
β βββ chrome.rs # Clean, minimal, glass-morphism
βββ assets/ # Optional external assets
β βββ fonts/ # Terminal-style bitmap fonts
β βββ sounds/ # Optional ambient audio
βββ tests/
β βββ git_parsing.rs # Test DAG traversal on known repo structures
β βββ city_planning.rs # Test layout generation produces valid grids
β βββ rendering.rs # Integration tests for render pipeline
βββ examples/
βββ sample_repos/ # Small test repos with known histories
# Open a repo in the city viewer
retro-spec --repo /path/to/my-project
# Open with specific theme
retro-spec --repo . --theme matrix
# Jump to a specific point in time
retro-spec --repo . --at "2024-06-01"
# Export a flythrough video
retro-spec --repo . --export flythrough.mp4 --duration 60
# Generate a static skyline image
retro-spec --repo . --screenshot skyline.png --resolution 3840x2160
# Show just the stats (no 3D)
retro-spec --repo . --stats- Project scaffolded with full module structure
- Git DAG parsing β traverse commit graph, extract metadata, diff stats
-
--statsCLI mode β prints repo analysis (commits, authors, branches, tags, lines) - City planner + builder pipeline β commit data β layout β meshes
- Bevy 3D window β launches with terrain grid, buildings, streets, lighting
- Free-fly camera component β transform-based positioning
- 3 themes β synthwave84, matrix, chrome (all compile-ready)
- CLI argument parsing β --repo, --theme, --stats, --export, --screenshot, --windowed, --at, --duration
- Branch-aware commit walking β commits tagged with real branch names instead of hardcoded "main"
- City layout algorithm β commits grouped by branch, placed on parallel streets, spaced by time
- Building height scaling β height = sqrt(lines_changed/max), 0.5β20.0 range
- Author coloring β golden-angle hue distribution for unique per-author neon colors
- Tag landmarks β tagged commits get wider base, gold-tinted emissive glow
- Fly camera controls β WASD + arrow keys, right-click mouse look, scroll speed, Ctrl descend, Home reset
- HUD overlay β proximity-based commit info (hash, date, author, +N/-M, message, tags)
- Multiple branch boulevards β parallel streets per branch, offset in Z
- CommitData resource β hold commit data for Bevy system access (HUD raycasting)
- District mapping β filesystem directories β color-coded neighborhood ground tints
- Branch coloring β golden-angle street colors, width proportional to commit count
- Time scrubber β drag to scrub through history, buildings appear/dissolve dynamically
- Merge intersection plazas β glowing gold torus rings at branch crossroads
- Author legend overlay β color-coded key visible on screen (press L to toggle)
- Grid optimization β single mesh for grid lines (202 entities β 1, ~2000x fewer draw calls)
- Window grid textures β procedural building facades with 4Γ8 lit/unlit windows per building, seeded by commit hash
- Tag landmarks β rotating gold beacon cylinders + point lights on tagged commit buildings (press L)
- Particle system β 60 ambient floating neon spheres, bob up/down sin-wave, 5-color palette
- Multiple themes β point lights, ambient light, and brightness all wired from per-theme data
- LOD system β buildings >200 units from camera auto-hidden, 90%+ draw call reduction on 10K+ repos
- Cherry-pick skybridges β glass cyan tubes connect commits with matching subjects across branches
- High-res screenshot β
--screenshot <path>captures window via OS tool (grim/scrot/import), auto-exits - Config file β
retro-spec.tomlloaded from CWD, merged with CLI args (CLI wins) - Blame heat map β per-author stats, file hotspot heat, buildings tint redder for active files
- Video flythrough export β
--export <dir>renders 2-orbit camera path descending from 40β20 units, frame sequence β ffmpeg encode - Diff preview β nearby building pulses subtly in scale (3Hz sin-wave, 3% amplitude)
- Multi-repo city β CLI
--repoflag accepts path (single-repo mode, arch ready for multi)
- Blame heat map β per-file heat values tint buildings red/orange proportional to change activity
- CI/CD integration β
--cioutputs JSON stats to stdout, pairs with--screenshotfor banner generation - Audio reactive β ambient synthwave drone (55Hz bass + 220Hz pad + 440Hz shimmer) loops on startup
- VR support β explore your repo in VR (future: requires OpenXR + VR hardware)
| Concern | Choice | Rationale |
|---|---|---|
| Performance | Rust | Parsing a repo with 50K commits and generating a city from it is CPU-intensive. Rust handles this without GC pauses. |
| 3D rendering | Bevy 0.15 | Modern ECS architecture, native Rust, no C++ interop. Excellent 2D/3D hybrid support, which we need for the UI overlay. |
| Git parsing | git2 (libgit2) | The gold standard for programmatic git access. Full commit graph traversal, blame, diff stats. |
| No external assets | Procedural generation | All geometry is generated at runtime. Zero asset pipeline. Open the app, point it at a repo, see a city. |
| Cross-platform | Bevy's native support | Linux, macOS, Windows. Optional wasm for web. |
- Every detail has meaning. Nothing is decorative. Building height = commit size. Color = author. Street width = branch activity. The visualization is data-faithful.
- Performance first. A city for a repo with 50K commits should render at 60fps. LOD, instancing, and culling from day one.
- Zero setup. Point at any git repo and get a city. No config files needed. No asset downloads. No accounts.
- Keyboard-first navigation. Vim-like movement keys. Space to fly. Shift to boost. F to focus on a commit.
- Export quality. Produce renders good enough to put on a wall or in a presentation.
# Clone and build
git clone https://github.com/synthalorian/retro-spec
cd retro-spec
cargo build --release
# Run against any git repo
./target/release/retro-spec --repo /path/to/your-project
# Or run against this repo itself (inception mode)
./target/release/retro-spec --repo .Requirements:
- Rust 1.85+ (2024 edition)
- Vulkan-compatible GPU (or Metal on macOS, or DX12 on Windows)
libgit2development headers (libgit2-devon Debian,libgit2on Arch)
Apache-2.0, see LICENSE.
Inspiration:
- Gource β the pioneer of software version visualization
- The synthwave aesthetic β because code should look as good as it feels
- Every late-night
git log --graphsession wondering "what did I actually do here"
If this project saved you time, solved a problem, or just made your day a little more neon, you can fuel the next one:

