Skip to main content

How AI agents understand codebases without wasting tokens — local-first, adapter-driven, progressive disclosure enforced by design

Project description

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, 22 URI adapters, 190+ languages. 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/?target=validate_token' # Who calls it? (cross-file)
reveal overview .                           # one-glance dashboard: quality, activity, deps
reveal 'ast://src/?complexity>10'           # What's too complex?
reveal health ssl://api.example.com domain://example.com ./src  # One-shot health check
reveal pack src/ --since main --budget 8000 # PR context snapshot for AI agents

Installation

pip install reveal-cli

What Makes It Different

Progressive disclosure — the only way in. dir → file → element isn't optional; it's the architecture. You cannot accidentally dump 7,000 tokens of raw code.

reveal src/                          # tree structure (~50-200 tokens)
reveal src/auth.py                   # imports, functions, classes (~200-500 tokens)
reveal src/auth.py validate_token    # exact code (~100-300 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/?target=fn&depth=3'    # full impact radius before a refactor
reveal 'calls://src/?rank=callers&top=20'  # most architecturally coupled functions
reveal 'calls://src/?uncalled'             # functions with no callers — rough check, verify results

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
# Five tools: reveal_structure, reveal_element, reveal_query, reveal_pack, reveal_check
# Agents get progressive disclosure and call-graph analysis — no subprocess overhead

Unified health checks across categories:

reveal health ./src ssl://api.example.com domain://example.com mysql://prod
# → code quality + 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

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 review main..HEAD       # PR review: diff + check + hotspots, one pass
reveal health ssl://site.com   # health check with exit codes 0/1/2
reveal pack src/ --budget 8000 # token-budgeted snapshot for LLM context
reveal hotspots src/           # top complexity hotspots
reveal overview .              # one-glance dashboard: stats, quality, git activity
reveal deps .                  # dependency health: circular imports, unused, packages
reveal dev new-adapter <name>  # scaffold new adapters/rules

Adapters (22 built-in)

Adapter What it queries
ast:// Functions, classes, complexity, decorators — 190+ languages
calls:// Cross-file call graph: callers, callees, coupling metrics, dead code
diff:// Structural diff between branches or commits (with per-function complexity delta)
imports:// Dependency graph, circular imports, unused imports
stats:// Codebase quality scores, hotspots, duplication
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
xlsx:// Excel data extraction and analysis
claude:// AI session history, tool usage, file access patterns
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
  • 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
  • All Docs — complete documentation index
  • AI Agents: reveal --agent-help

License

See LICENSE for details.

Contributing

See CONTRIBUTING.md for guidelines.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reveal_cli-0.70.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reveal_cli-0.70.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file reveal_cli-0.70.0.tar.gz.

File metadata

  • Download URL: reveal_cli-0.70.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reveal_cli-0.70.0.tar.gz
Algorithm Hash digest
SHA256 bedd8f83603ee1e5924e81138c8f1600767981947bb2305624411571b497d9bf
MD5 339082fecbbdf645285c45be0b79fb8c
BLAKE2b-256 e7b15f87dafc5d17146fda2d699d1d1bfd4320d4fa9ca36af952eed98165e92f

See more details on using hashes here.

Provenance

The following attestation bundles were made for reveal_cli-0.70.0.tar.gz:

Publisher: publish-to-pypi.yml on Semantic-Infrastructure-Lab/reveal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reveal_cli-0.70.0-py3-none-any.whl.

File metadata

  • Download URL: reveal_cli-0.70.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reveal_cli-0.70.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbe2d256746feaee1f538478845a1f8ae90b80649bfb9e92d2c4943f335de13a
MD5 e5f0ed909b5c1b7e87aafe643a294124
BLAKE2b-256 0a939e968853934545b29a9aa073329fe297aab1c97cd7056f4f232753225e05

See more details on using hashes here.

Provenance

The following attestation bundles were made for reveal_cli-0.70.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Semantic-Infrastructure-Lab/reveal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page