A code structure map for your terminal. It scans your project and draws how classes relate — inheritance, interface implementation, composition — as a UML class diagram you can walk around with hjkl. Know the shape of a hundred classes before you write a line, without opening a heavy IDE.
- Class diagrams rendered on a character canvas: extends (solid), implements (dashed), composition (◆)
- Scope to one file or a few marked files;
Afor the whole project enterfocuses a class's neighborhood;+/-depth,bsiblingsmexpands member compartments — typed fields, method signatures- Live reload on save;
oopens the class in$EDITORat its line - Optional LSP layer sharpens the graph asynchronously (disambiguates same-name bases, infers Python field types, finds Go interface implementations) — pure static stays just as fast without it
- Python / Go / Java / C++ / Rust / TypeScript / JavaScript
go install github.com/RollingTheRock/CodeTree/cmd/ct@latestOr grab a single binary from Releases (Linux / macOS).
ct # TUI: space to mark files, enter for the diagram
ct -f diagram . # print the class diagram
ct -f mermaid . # Mermaid classDiagram
ct -f json . # structured JSON for scripts
ct -lsp -f diagram . # apply LSP corrections first, diff on stderrKeys: hjkl move · space mark · enter focus · esc back · m members · c composition edges · / filter · ? help · q quit
No server is bundled. If one is on your PATH (or in a well-known spot like ~/.local/share/jdtls or nvim's mason dir), codetree uses it: pyright/basedpyright, gopls, clangd, jdtls, rust-analyzer, typescript-language-server. To switch or disable, edit ~/.config/codetree/config.toml:
[lsp.python]
command = "basedpyright-langserver"
args = ["--stdio"]
# enabled = falseCGO_ENABLED=1 go build ./... # tree-sitter needs cgo
go test ./...GIFs recorded with vhs (vhs demo.tape).


