How AI agents understand codebases without wasting tokens — local-first, adapter-driven, progressive disclosure enforced by design
pip install reveal-cli==0.134.0 Copy PIP instructions
Reveal is how AI agents understand codebases without wasting tokens.
A local-first, adapter-driven semantic inspection layer — progressive disclosure enforced by design. One CLI, 26 URI adapters, 51 languages and file formats. Structure before content, always. Engineers and AI systems use the same tool, the same syntax, the same progressive drill-down.
reveal src/auth.py validate_token # What does this function do? reveal 'calls://src/?callers=validate_token' # Who calls it? (cross-file) reveal overview . # compact project map: scope, components, imports reveal 'ast://src/?complexity>10' # What's too complex? reveal check src/ # What needs fixing? (rules, complexity, links) reveal pack src/ --since main --budget 8000 # PR context snapshot for AI agents Installation pip install reveal-cli Git history and comparisons (git://, overview --against, and churn ranking in metrics --hotspots) needs the git extra: pip install "reveal-cli[git]". Without it those parts are left out and a warning says so.
Windows on a managed/locked-down machine? If Application Control Policy blocks the pip-generated reveal.exe launcher, run python -m reveal instead — it uses the same install, just skips the blocked wrapper.
Progressive disclosure is the default. dir → file → element: a directory shows its tree, a file its outline, an element its code. Raw source comes back only when you name an element or a line range.
reveal src/ # tree structure (~100-3,000 tokens, by size) reveal src/auth.py # imports, functions, classes (~150-750 tokens) reveal src/auth.py validate_token # exact code (~100-600 tokens) Local-first. No backend, no API keys, no data leaving the machine. Runs in CI/CD pipelines, air-gapped environments, and anywhere you'd use a Unix tool.
Everything is a URI. ast://, calls://, ssl://, mysql://, markdown://, claude:// — same query operators, same output format, same piping model across all of them.
reveal 'calls://src/?callers=fn&depth=3' # full impact radius before a refactor reveal 'calls://src/?rank=callers&top=20' # most-called functions and classes defined in src/ Deep-dive code navigation (works on Python, PHP, and the other tree-sitter languages; see reveal --languages):
reveal app.py process_batch --boundary # inputs read, outputs/effects produced reveal app.py process_batch --effects # DB / HTTP / FS / logging calls, classified reveal app.py process_batch --inputs # candidate inputs; builtins marked separately reveal app.py process_batch --outputs # read-after-write hazards; use --range for a block reveal app.py process_batch --callsites # calls within the selected function reveal app.py :123 --around # nearby context from a line number / stack trace reveal app.py process_batch --flow=if # recognized branch skeleton reveal legacy.php :120-340 --boundary # same flags work on flat PHP, not just OO Pinpoint inspection inside a single function or line range — built for triaging giant handlers, legacy files, and stack traces without reading top-to-bottom. See AGENT_HELP.md for the full nav-flag family.
reveal pack src/ --since main --budget 8000 # changed files first, then key dependencies reveal pack src/ --focus "auth" --budget 6000 # topic-focused snapshot Composable pipelines:
# nginx config → extract all domains → check each SSL cert reveal nginx.conf --extract domains | sed 's/^/ssl:\/\//' | reveal --stdin --check # Find functions that got more complex in this PR reveal diff://git://main/.:git://HEAD/. --format json | \ jq '.diff.functions[] | select(.complexity_delta > 5)' # Batch SSL check from a file of domains reveal @domains.txt --check Native MCP server (reveal-mcp) for AI agent integration:
# Install once, works in Claude Code, Cursor, Windsurf, any MCP-compatible agent pip install reveal-cli reveal-mcp # starts the server # 10 tools: reveal_structure, reveal_element, reveal_nav, reveal_query, reveal_pack, reveal_check, # reveal_grep, reveal_trace, reveal_health, reveal_review # Agents get progressive disclosure, deep-dive nav, and call-graph analysis — no subprocess overhead Hosting health checks across categories:
reveal health ssl://api.example.com domain://example.com mysql://prod # → cert expiry + DNS health + DB replication, one exit code Documentation as a queryable graph:
reveal 'markdown://docs/?aggregate=type' # taxonomy frequency table reveal 'markdown://docs/?link-graph' # bidirectional link analysis + orphan detection reveal 'markdown://docs/?body-contains=retry&type=procedure' # full-text + metadata AI session history as structured data (useful for workflows built on Claude Code):
reveal claude://sessions/ # list all sessions reveal 'claude://sessions/?search=validate_token' # cross-session search Using Reveal with AI Agents Add to your CLAUDE.md or AGENTS.md so agents discover all adapters at setup time, not mid-task:
## Reveal Usage Reveal is a structured resource explorer. Before broad discovery searches over a supported resource, check whether Reveal has an adapter — not just for source code, but for sessions, git history, documents, data stores, and runtime state. | Need | Adapter | Example | |------|---------|---------| | Code structure / functions | `ast://` | `reveal 'ast://src/?type=function'` | | Call relationships | `calls://` | `reveal 'calls://src/?callers=my_fn'` | | Imports / change impact | `imports://` | `reveal imports://src/` | | Git history / diffs | `git://` `diff://` | `reveal 'git://.?message~=fix'` | | Claude sessions / prompts | `claude://` | `reveal 'claude://sessions/?search=auth-refactor'` | | Codex CLI sessions | `codex://` | `reveal 'codex://sessions/?search=auth-refactor'` | | Markdown / docs | `markdown://` | `reveal docs/ --grep 'decision'` | | Databases / workbooks | `sqlite://` `mysql://` `xlsx://` | `reveal sqlite:///app.db` | | Environment variables | `env://` | `reveal env://` | | Project-specific tools | live plugins | `reveal help://adapters` | When adapter syntax is uncertain: 1. `reveal help://quick` — compact intent router (~1,600 tokens) 2. `reveal 'help://schemas/ ' --format=json` — exact query params 3. Prefer scoped, bounded queries first; drill down as needed. 4. Confirm consequential findings by reading source or running targeted checks. What Reveal Does (and Doesn't) Reveal does Reveal does not Inspect / read Modify / write Evaluate quality Auto-fix issues Package for LLMs Run LLM inference Compose workflows Orchestrate pipelines Describe itself Require external config Subcommands reveal check src/ # quality check (complexity, maintainability, links) reveal check --changed main..HEAD # PR review: rules on the files the range changed reveal health ssl://site.com # health check: exit 0 pass, 1 findings, 3 incomplete/failed reveal pack src/ --budget 8000 # token-budgeted snapshot for LLM context reveal pack src/ --architecture # pack + entry points + core abstractions brief reveal metrics src/ --hotspots # worst files by complexity and size reveal overview . # compact project map: scope, components, imports reveal overview . --against HEAD # compare the live working tree with a ref reveal imports . --external # third-party and stdlib packages (--circular, --unused) reveal calls src/ --callees main --depth 2 --detail # what main calls, level by level, with side effects reveal contracts src/ # ABC/Protocol/TypedDict/Pydantic inventory reveal surface src/ # external boundary map: CLI args, routes, env vars, I/O reveal dev new-adapter # scaffold new adapters/rules overview presents a bounded import map with counting rules, coverage and drill-down commands; overview --against REF compares a tracked ref with the live working tree. The retired architecture spelling returns canonical overview answers. pack --architecture uses import fan-in to select context; its ranking remains a separate capability.
The most-used adapters; reveal --adapters lists every one.
Both files in this release have provenance metadata.
dev treesitter html database git dns whois mcp xlsx powerpivot all
cli code-analysis ast semantic-diff progressive-disclosure code-exploration python tree-sitter
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Both files in this release have been uploaded with provenance metadata.
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.
Apr 10, 2026 2 release files Loss of provenance
Feb 20, 2026 2 release files Loss of provenance
Feb 14, 2026 2 release files Loss of provenance
Jan 21, 2026 2 release files Loss of provenance
Jan 20, 2026 2 release files Loss of provenance
Jan 8, 2026 2 release files Loss of provenance
Jan 6, 2026 2 release files Loss of provenance
Jan 4, 2026 2 release files Loss of provenance
Dec 17, 2025 2 release files Loss of provenance
Dec 14, 2025 2 release files Loss of provenance
Dec 13, 2025 2 release files Loss of provenance
Dec 8, 2025 2 release files Loss of provenance
Dec 4, 2025 2 release files Change of provenance




