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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peek_code-0.2.0.tar.gz.
File metadata
- Download URL: peek_code-0.2.0.tar.gz
- Upload date:
- Size: 552.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e94cfc20c542641930a9b8177a3184ee9c1a2c896c628c33d6790e5d18f8c1f
|
|
| MD5 |
23a8618a8a8dc481c4b52eca3dc0f35b
|
|
| BLAKE2b-256 |
2dd2a2a312f94788b0125d3cedf29e752c29a27309350ca416096b28e53bba42
|
File details
Details for the file peek_code-0.2.0-py3-none-any.whl.
File metadata
- Download URL: peek_code-0.2.0-py3-none-any.whl
- Upload date:
- Size: 60.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6f0f82e87acdba1d9ce698e9409a0dc606d6668d8790d2bd75e2fdafa021738
|
|
| MD5 |
9b19a09c9539bba1a75efcd9b0845c43
|
|
| BLAKE2b-256 |
e0e7b57ac96e7bef7afa69fd96c84f416d7a5f375dc6967737c6e4be094f8371
|