Skip to main content

Reveal

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, 35 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 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.

What Makes It Different

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.

Cross-file call graph analysis:

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

PR-aware context snapshots for AI agents:

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 / runtime | `env://` `python://` | `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/<adapter>' --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 <name>  # 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.

Adapters

The most-used adapters; reveal --adapters lists every one.

Adapter What it queries
ast:// Functions, classes, complexity, decorators — every language reveal --languages lists
calls:// Cross-file call graph: callers, callees, coupling metrics
diff:// Structural diff between branches or commits (with per-function complexity delta)
imports:// Dependency graph, importers (who imports this module), circular imports, unused imports
metrics:// Per-file size, complexity, churn and provenance; file hotspots
git:// Commits, blame, branches, tags, function-level history
ssl:// Certificate expiry, chain validation, hostname match
autossl:// cPanel AutoSSL run logs — per-domain TLS outcomes, DCV failures
letsencrypt:// Let's Encrypt certbot live certificates — expiry, multi-domain, renewal status
domain:// DNS, WHOIS, registrar, HTTP redirect chain, email DNS
nginx:// Config parsing, ACL rules, upstream routing, ACME validation
cpanel:// User environment, domains, SSL health, ACL audit
mysql:// Schema, replication status, table analysis
sqlite:// Schema, query analysis
markdown:// Frontmatter, headings, link graphs, full-text search
json:// JMESPath queries, nested navigation, flatten
env:// Environment variable analysis, .env validation
python:// Runtime introspection of live Python modules
patches:// Test patch pressure: repeated mocks, private patches, patch-heavy tests; ?view=pressure joins it with production boundary fan-out (was testability://)
xlsx:// Excel data extraction and analysis
claude:// AI session history, tool usage, file access patterns
codex:// OpenAI Codex CLI session history, tool usage, per-session analysis
reveal:// Reveal introspects itself: adapters, rules, config
help:// Built-in documentation, searchable from the CLI

Documentation

  • Why Reveal — what makes it powerful
  • Quick Start — 5-minute introduction
  • What Reveal Is Good For — organized use cases and best-fit workflows
  • MCP Server — native integration with Claude Code, Cursor, Windsurf
  • CI/CD Recipes — GitHub Actions and GitLab CI ready-to-paste YAML
  • Benchmarks — measured 3.9–15x token reduction on real scenarios
  • Recipes — task-based workflows
  • Validation — per-language recall of reveal's DD signals (import/dependency graph and side-effect/boundary classification) measured against independent oracles on real corpora, with a supported-vs-validated status table and reproducible harnesses
  • All Docs — complete documentation index
  • AI Agents: reveal --agent-help

License

See LICENSE for details.

Contributing

See CONTRIBUTING.md for guidelines.

Metadata

Release files for reveal-cli 0.133.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 reveal-cli 0.133.0
File Size Uploaded Provenance Actions
reveal_cli-0.133.0.tar.gz 3.2 MB With provenance Details for reveal_cli-0.133.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reveal-cli 0.133.0
File Interpreter ABI Platform Actions
reveal_cli-0.133.0-py3-none-any.whl Python 3 none any Details for reveal_cli-0.133.0-py3-none-any.whl

Total release size: 6.2 MB

Release files / reveal_cli-0.133.0.tar.gz

Download URL reveal_cli-0.133.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
558220cf9a48ab4ecaf3361618e34017639aece96913b556f9591cc9aca3e40c
BLAKE2b-256 checksum
How to use checksums
ca463f9d9f69f4fa942323b1755d4aa27b993e2fb353dc43c90a41e40f31257a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / reveal_cli-0.133.0-py3-none-any.whl

Download URL reveal_cli-0.133.0-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b146f5586db3d4bd5005aa04bc0fe982ee1cdd070f1c47414c81853d1c679218
BLAKE2b-256 checksum
How to use checksums
0223a79aa6dc356e6493fa6e369deabcb0017e0d1634c9c0b35d6aaa5462682c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for reveal-cli 0.133.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for reveal_cli-0.133.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.133.0 This release

2 release files Full provenance

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