Build and fly through an interactive 3D map of any codebase.
orrery turns a repository into a self-contained, offline HTML file: a 3D,
navigable map of its structure and dependencies, with the README alongside.
Fly with WASD, orbit/zoom with the mouse, click a node to focus it (the rest
dims), and read off the signals that matter for understanding unfamiliar code —
centrality (core abstractions grow larger), import cycles, and
entry points / public API.
It's a deterministic CLI. An optional agent skill (planned) sits on top only for
the non-deterministic glue: detecting the language/root and, when a repo has
dynamic wiring (registries, plugin loaders, DI), generating analysis on the fly
that it feeds back in via --augment.
Requires Bun ≥ 1.3.
bun install
bun run orrery build /path/to/repo # → /path/to/repo/orrery.html
bun run orrery build . --out map.html --openA single-binary build (bun build --compile) is on the roadmap:
orrery build <repo> with no runtime required.
extract → analyze → render
(per-lang) (graph) (1 HTML)
- extract — walk the repo, build the node/edge graph. v0 emits the
folder/file structure for any language; the tree-sitter layer (next) adds
importand class-levelusesedges per language. - analyze — language-agnostic graph overlays: PageRank centrality and Tarjan strongly-connected-components (import cycles).
- render — inline the graph + README + vendored
3d-force-graphinto one offline HTML.
Everything flows through one type, CodeMap — { root, nodes, edges }. It's the only interface between extraction and rendering, and the plug
point for external/agent-generated data via mergeCodeMaps / --augment.
- ✅ CLI pipeline, structure extraction (any language), centrality + cycle
analysis, self-contained 3D renderer,
--augmentmerge. - ⏳ Tree-sitter
import/usesedges (per-language plugins). - ⏳
bun build --compilesingle binary (embed template + vendor assets). - ⏳ Entry-point / public-API detection per language.
- ⏳ Agent skill wrapper (language/root detection, dynamic-analysis augmentation).
src/
cli.ts # `orrery build <repo>`
schema.ts # the CodeMap contract
extract/ # structure walk + (next) tree-sitter language plugins
graph/analyze.ts # PageRank + SCC cycle detection
render/ # template.html + inliner
vendor/ # pinned 3d-force-graph + marked