Demo by code — python -m peek.tools.gen_demo • also assets/demo.svg + assets/demo.html
peek — htop for codebases
Understand any codebase in 5 seconds. pip install peek-code && peek .
5 seconds → languages, stack, Start Here, graph. Every output is a screenshot.
Install
pip install peek-code
pipx install peek-code # or: uv tool install peek-code
pip install -e "peek[dev]" # dev — pyproject is at peek/pyproject.toml
Requires Python 3.11+. Deps: typer, rich, textual, pathspec.
Full install →
docs.md
Quick Start
peek # TUI — q quit, / filter, j/k nav, o open, t cycle, w watch
peek --no-tui # static Rich (CI / screenshot)
peek --theme dracula --html -o map.html && open map.html
Keys: q quit • j/k nav • o open $EDITOR • / filter • enter details • esc clear • ? help • t theme • w watch
peek wtf # paste traceback → explain with Start Here hint
cat tb.txt | peek wtf
peek watch . # live rescan on file change (polling, Ctrl+C)
peek config set theme dracula # persists
Full CLI →
docs.md#cli-reference· TUI →docs.md#tui-guide· WTF →docs.md#wtf· Watch →docs.md#watch· Config →docs.md#config-set
Demo (by code)
python -m peek.tools.gen_demo # → peek/assets/demo.gif (800×450, <3MB) + demo.svg
peek --html -o peek/assets/demo.html
pytest peek/tests/test_demo_assets.py -v
How it works →
docs.md#demo-video
Features
| What you get | Where |
|---|---|
.gitignore-aware walk, languages/LOC, tech stack, entry points, import graph, PageRank ranking |
peek scan / peek analyze / peek (TUI) |
| TUI with 10 themes, filter, open, HTML export, token-aware pack, ranked find, optional LLM | peek / --html / --pack / find / --llm |
wtf traceback explainer (scan-aware Start Here hint), watch live rescan (polling 0.8s/debounce 0.4s, w toggle), config set/get/list persistent theme, t live theme cycling |
peek wtf / peek watch . / peek watch + w / peek config set theme dracula / t |
| Never crashes, <1s for 500 files, offline, no API key | — |
Full 5-col table + vs others →
docs.md#features
10 Themes
peek --theme dracula
peek --theme-list # anthropic-pro (default), cinematic, dracula, nord, catppuccin-mocha, tokyo-night, solarized-dark, github-dark, monokai, minimal-mono
Warm clay anthropic-pro → neon cinematic → dracula → nord. 15 tokens #RRGGBB, precedence cli > PEEK_THEME > config > anthropic-pro.
Full table + previews →
docs.md#10-themes
Documentation
- Full manual:
docs.md— Install, Demo, Features, Themes, CLI, TUI, Pack/Find/LLM, WTF, Watch, Config Set, Architecture, Testing - Research:
docs/research/— viral thesis, candidates, 5-day plan - Plans:
docs/superpowers/
v2 Highlights
peek wtf→ traceback explainer, parsesTraceback+Error+ frames, Start Here hint — no LLMpeek pack --format xml --budget 4000 --include "*.py"→ token-smart pack v2 with budget and globspeek config set theme dracula→ writes~/.peek/config.toml,get/listvalidated viaget_themepeek watch ./peek --watch(wtoggle) → polling 0.8s / debounce 0.4s,watchfilesif installedt→ live cycle 10 themes in TUI
Development
git clone https://github.com/hariomlohardev/peek && cd peek
pip install -e "peek[dev]"
pytest -q # 108 passed, 1 skipped
peek --no-tui && peek # static + TUI
See CONTRIBUTING.md. ruff + pytest before PR. Branch v2.
Why peek?
Every output is a screenshot. Every repo is a new demo. pip install peek-code is zero friction — unlike gitingest (no ranking) or pydeps (no TUI).
License
MIT — LICENSE · Built by Hariom Lohar — hariomlohar.new@gmail.com
Metadata
Release files for peek-code 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| peek_code-0.2.1.tar.gz | 553.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| peek_code-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 614.9 kB
Release files / peek_code-0.2.1.tar.gz
| Download URL | peek_code-0.2.1.tar.gz |
|---|---|
| Size | 553.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19cacaa53d813f6f88b81848a6c057edae056855030850406ad39c2821dc7e47
|
|
BLAKE2b-256 checksum How to use checksums |
a3ceca0f889237da7ed40acd562789a61148aeacaeccef55c45d0dd0e0ce2409
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / peek_code-0.2.1-py3-none-any.whl
| Download URL | peek_code-0.2.1-py3-none-any.whl |
|---|---|
| Size | 61.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f62834bbc5d9d133719c8fce291b7d222313bb9efe50297491f871d10a7c1652
|
|
BLAKE2b-256 checksum How to use checksums |
59c77a8fa4aeed4c86cd5c30851737ad43ba3cf0b5c5562daf83f65732679f67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|