LAB NOTEBOOK No. 01 · PROJECT · INDIA — UTC+5:30Code · repositoryOn PyPI · shipped
Code · repository · On PyPI · shipped

peek

⑂ Code · repository·htop for codebases — understand any repo in five seconds. Languages, size and structure in one screen: pip install peek-
View code on GitHub ↗ ← Back to archive

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
CLI TUI Rich + Textual Python PyPI developer tools
Python 89.2% · HTML 10.8%
Tests
146
Themes
10
Python
3.11+
FAQ — peek
What does peek do that `ls` or `cloc` does not?tap ↕

It answers the question you actually have about an unfamiliar repo: what is this, which language dominates, where does the code live, and which files should I read first — in one screen instead of five commands.

Does it send my code anywhere?tap ↕

No. Everything runs locally and works offline. The optional `--llm` summary is the only feature that talks to an API, and it stays off unless you set a key yourself.

Can I contribute?tap ↕

Yes — the repo keeps a set of issues labelled good first issue. Install with pip install -e "./peek[dev]" and the test suite runs locally.

View code on GitHub ↗ ← All projects GitHub ↗