A zero-config codebase cartographer. Point it at any repository and it draws the map: languages, size, structure and the files that actually matter — in about five seconds, entirely offline.
pip install peek-code
peek .
The default is an interactive TUI built on Rich and Textual — j/k to move, / to filter, o to open a file in $EDITOR, enter for details. peek --no-tui prints a static Rich report for screenshots, pipes and CI, and peek --html -o map.html writes a shareable page.
Two commands go further than a summary. peek --pack selects the highest-signal files within a token budget and prints them as one LLM-ready bundle — peek --pack --ask "auth" narrows it to a topic. peek trace walks a function tree across files: what calls it, what it calls, and how deep, with --html for a browsable version.
peek find "token validation" . --limit 10
peek trace scan --depth 3 --html
Python 3.11+, ten themes, 146 tests, MIT. Issues tagged good first issue are open if you want to build on it.
Highlights
- Read any codebase in about five seconds, fully offline
- Interactive TUI, static Rich output, or a shareable HTML map
- `--pack` builds an LLM-ready bundle inside a token budget
- `peek find` ranks matches across filenames and content
- `peek trace` walks the function tree across files, with an HTML view
- Ten themes, 146 passing tests, zero configuration