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 → polyglot graph, languages, stack, Start Here. Every output is a screenshot.
Install
pip install peek-code
# or
pipx install peek-code
uv tool install peek-code
# dev (with tests + demo generator) — from repo root:
pip install -e "./peek[dev]"
# or from peek/: pip install -e ".[dev]"
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
peek graph --format svg -o graph.svg # polyglot import graph → DOT/SVG/HTML
peek find "auth token" --semantic # semantic BM25 (+ fastembed) — multi-word = intent
peek mcp # MCP server for Claude Code / any MCP client
peek trace --html # function tree → browser (filter, theme, expand, copy)
Keys: q quit • j/k nav • o open $EDITOR • / filter • enter details • esc clear • ? help • t theme • w watch
peek trace scan --depth 3 # terminal tree: what it takes & where it goes
peek trace scan --html -o trace.html # polished HTML + browser (filter, theme, expand)
peek trace --at peek/scanner.py:601 --depth 2 --local # pinpoint via file:line
peek wtf # paste traceback → explain with Start Here hint
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· Semantic →docs.md#semantic
GitHub Action
- uses: hariomlohardev/peek@v1 # posts Start Here as a PR comment (outputs: start-here, summary)
with:
path: .
Example workflow →
.github/workflows/peek.yml· Full guide →docs.md#github-action
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, polyglot graph (Python + JavaScript/TypeScript), PageRank |
peek scan / peek analyze / peek (TUI) |
| TUI 10 themes, filter, open, HTML export, token-aware pack, ranked find (keyword + semantic) | peek / --html / --pack / find |
graph DOT/SVG/HTML, symbols index (AST + JS regex), semantic BM25/fastembed, index cache |
peek graph --format svg / peek find "auth token" --semantic |
pack 3.0: tiktoken, --clip, --dry-run, --diff/--staged, URL https:// |
peek --pack --clip --dry-run --diff HEAD |
trace Python-only function tree — flag not TUI, depth/direction/cross-file, --html browser (filter, theme, expand) |
peek trace --html / peek trace --at file:line --depth 3 |
wtf/watch/config/mcp server, never crashes, <1s for 500 files, offline |
peek wtf / peek watch . / peek mcp |
Full table →
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, Symbols, Semantic, Graph, Git, MCP, WTF, Watch, Config
v3 Highlights
polyglotgraph — Python AST + JavaScript/TypeScriptimport/requireregex,peek graph --format svgsemanticBM25 (peek/embeddings.py) +fastembed,peek find "auth token" --semantic,peek --pack --ask "auth token" --semanticpack 3.0—--clip/--dry-run/--diff HEAD/--staged, URL fetch, tiktoken;peek mcpstdio server for Claude Code
v2 Highlights
peek wtf/peek pack v2 --format xml --budget 4000/peek config set theme dracula/peek watch .(wtoggle) /ttheme cycle
Development
git clone https://github.com/hariomlohardev/peek && cd peek
pip install -e ".[dev]"
pytest -q # 146 passed, 1 skipped
peek --no-tui && peek # static + TUI
See CONTRIBUTING.md. ruff + pytest before PR. Branch v3.
Contributing — Good First Issues
New to open source? Start here — 20 good first issues, each ~30 min, one file, copy-paste steps:
Browse: https://github.com/hariomlohardev/peek/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22
- Beginner (30 min): docstrings, typo fixes,
--helpexamples,peek --versiontest — pick any, no setup beyondpip install -e ".[dev]" - Intermediate (60-90 min):
tiktokentokens,peek diff,peek serve, symbol index - Complex (1-2 days):
peek-mcpfor Claude Code, polyglottree-sitter, semantic embeddings,peek-vscode
Every issue has exact file, acceptance checkboxes, and pytest -q gate. PRs with good first issue label get priority review.
See CONTRIBUTING.md for ruff + pytest workflow. Branch v3 is the big upshift (polyglot + semantic + MCP).
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.6.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 | Provenance | Actions |
|---|---|---|---|---|
| peek_code-0.6.1.tar.gz | 854.1 kB | Without provenance | Details for peek_code-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| peek_code-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for peek_code-0.6.1-py3-none-any.whl |
Total release size: 982.7 kB
Release files / peek_code-0.6.1.tar.gz
| Download URL | peek_code-0.6.1.tar.gz |
|---|---|
| Size | 854.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f728d825d866039e7168077379da40d6a89b3851a93a7c326e1e39c14ae2a4b
|
|
BLAKE2b-256 checksum How to use checksums |
a5a339a5e3a6301386ba6a44306ebef6633c70bcaa8dc5e4f9c8a7a2d4c86421
|
| 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.6.1-py3-none-any.whl
| Download URL | peek_code-0.6.1-py3-none-any.whl |
|---|---|
| Size | 128.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53933089bc4388e330add207ef320a44e543b140f9bc378c99181b9776639531
|
|
BLAKE2b-256 checksum How to use checksums |
b7a260bcb2aee885f94d876d2746b0f85432ab29eb4d996c4d15d3f3b47629d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for peek-code 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.