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

  • 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.6.1

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.6.1
File Size Uploaded
peek_code-0.6.1.tar.gz 854.1 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.5.0

2 release files

0.4.0

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