Skip to main content

peek demo — htop for codebases (code-generated, 800x450, ~15s)

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 .

PyPI Python tests themes Rich+Textual Good First Issues

5 seconds → polyglot graph, languages, stack, Start Here. Every output is a screenshot.


Install

pip install peek-code
pipx install peek-code          # or: uv tool install peek-code
pip install -e ".[dev]" # dev — from peek/ (package dir)

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

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
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

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
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

  • polyglot graph — Python AST + JavaScript/TypeScript import/require regex, peek graph --format svg
  • semantic BM25 (peek/embeddings.py) + fastembed, peek find "auth token" --semantic, peek --pack --ask "auth token" --semantic
  • pack 3.0 — --clip/--dry-run/--diff HEAD/--staged, URL fetch, tiktoken; peek mcp stdio server for Claude Code

v2 Highlights

  • peek wtf / peek pack v2 --format xml --budget 4000 / peek config set theme dracula / peek watch . (w toggle) / t theme 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:

Good First Issues

Browse: https://github.com/hariomlohardev/peek/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22

  • Beginner (30 min): docstrings, typo fixes, --help examples, peek --version test — pick any, no setup beyond pip install -e ".[dev]"
  • Intermediate (60-90 min): tiktoken tokens, peek diff, peek serve, symbol index
  • Complex (1-2 days): peek-mcp for Claude Code, polyglot tree-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.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peek-code 0.4.0
File Size Uploaded
peek_code-0.4.0.tar.gz 801.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for peek-code 0.4.0
File Interpreter ABI Platform
peek_code-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 885.6 kB

Release files / peek_code-0.4.0.tar.gz

Download URL peek_code-0.4.0.tar.gz
Size 801.2 kB
Tags Source
SHA-256 checksum
How to use checksums
02c2def8a936c91ac51063b2f8eec4ba3f9311ec97f5892284c0c37b6275c505
BLAKE2b-256 checksum
How to use checksums
82341adc784afba7de42e6c62d669e03d27655707b744af5e13a24a577bcc927
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.4.0-py3-none-any.whl

Download URL peek_code-0.4.0-py3-none-any.whl
Size 84.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
827bd63e2fd0de2fa0fa64bfb562bed5fc3691be19b48909d2c3942befd9f9a9
BLAKE2b-256 checksum
How to use checksums
2216b06909382f10484f72bdd5addc6ae10efef337860644693d16d862e43a89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.6.1

2 release files

0.5.0

2 release files

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page