Metadata-Version: 2.4
Name: reveal-cli
Version: 0.135.0
Summary: How AI agents understand codebases without wasting tokens — local-first, adapter-driven, progressive disclosure enforced by design
Author-email: Progressive Reveal Contributors <scottsen@users.noreply.github.com>
License: MIT
Project-URL: Homepage, https://github.com/Semantic-Infrastructure-Lab/reveal
Project-URL: Repository, https://github.com/Semantic-Infrastructure-Lab/reveal
Project-URL: Documentation, https://github.com/Semantic-Infrastructure-Lab/reveal/tree/master/reveal/docs
Project-URL: Bug Tracker, https://github.com/Semantic-Infrastructure-Lab/reveal/issues
Project-URL: Changelog, https://github.com/Semantic-Infrastructure-Lab/reveal/releases
Keywords: cli,code-analysis,ast,semantic-diff,progressive-disclosure,code-exploration,python,tree-sitter
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml>=6.0
Requires-Dist: jsonschema>=4.0
Requires-Dist: rich>=13.0.0
Requires-Dist: tree-sitter<0.26.0,>=0.25.2
Requires-Dist: tree-sitter-language-pack<=1.25.0,>=1.8.1
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: cryptography>=42.0.0
Provides-Extra: dev
Requires-Dist: hatchling==1.33.0; extra == "dev"
Requires-Dist: editables==0.5; extra == "dev"
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: pytest-xdist>=3.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: pymysql>=1.0.0; extra == "dev"
Requires-Dist: dnspython>=2.9.0; extra == "dev"
Requires-Dist: mcp>=2.0.0; extra == "dev"
Requires-Dist: pygit2>=1.14.0; extra == "dev"
Requires-Dist: openpyxl>=3.1.0; extra == "dev"
Provides-Extra: treesitter
Provides-Extra: html
Requires-Dist: lxml>=4.9.0; extra == "html"
Provides-Extra: database
Requires-Dist: pymysql>=1.0.0; extra == "database"
Provides-Extra: git
Requires-Dist: pygit2>=1.14.0; extra == "git"
Provides-Extra: dns
Requires-Dist: dnspython>=2.9.0; extra == "dns"
Provides-Extra: whois
Requires-Dist: python-whois>=0.9.0; extra == "whois"
Provides-Extra: mcp
Requires-Dist: mcp>=2.0.0; extra == "mcp"
Provides-Extra: xlsx
Requires-Dist: openpyxl>=3.1.0; extra == "xlsx"
Provides-Extra: powerpivot
Requires-Dist: pbixray>=0.5.0; extra == "powerpivot"
Provides-Extra: all
Requires-Dist: reveal-cli[database,dns,git,html,mcp,whois]; extra == "all"
Dynamic: license-file

# Reveal

Reveal shows the structure of code, documents and data before their content,
so engineers and AI agents can read only what a question needs. It runs locally.

```bash
pip install reveal-cli
reveal src/                         # what is here?
reveal src/app.py                   # what does this file contain?
reveal src/app.py main             # read this function
reveal calls src/ --callers main   # what connects to it?
reveal src/app.py main --boundary  # what does it read and touch?
reveal check src/                   # which rules find problems?
```

## Start with the question

| Step | Question | Command |
|---|---|---|
| Orient | What is here? | `reveal DIR` or `reveal overview DIR` |
| Structure | What does this contain? | `reveal FILE` |
| Content | Show me one thing | `reveal FILE FUNCTION`, `reveal DOC.md "Heading"`, `reveal FILE :20-40` |
| Relations | What connects to it? | `reveal calls DIR --callers NAME`, `reveal imports DIR --importers FILE` |
| Behavior | What does this function touch? | `reveal FILE FUNCTION --boundary` or `--effects` |
| Judgment inputs | Where should I look closer? | `reveal metrics DIR --view hotspots`, `reveal check DIR` |

Search with enclosing structural context: `reveal src/ --grep 'timeout'`.
Use `--format json` for machine-readable results. Counts name their scope and
counting rule; warnings disclose incomplete analysis and coverage limits.
Static name candidates and classified effects do not prove runtime behavior.

## One tool per question

These are current spellings. Where a noun has a subcommand, it and its URI form
use the same execution path. Quote URI arguments containing shell operators.

| Tool | Question / example |
|---|---|
| `overview` | Compact project map: `reveal overview .`; compare with `--against REF` |
| `ast` | Code elements: `reveal ast src/ --where 'complexity>10' --sort=-complexity --limit 10` |
| `calls` | Callers/callees: `reveal calls src/ --callees main --depth 2 --detail` |
| `imports` | Import relationships: `reveal imports src/ --importers app.py` |
| `git://` | History: `reveal 'git://.?type=history&message~=fix'` |
| `claude` | Session recovery: `reveal claude session/NAME --view messages --sort=-message_index --limit 3` |
| `markdown` | Documents: `reveal markdown docs/ --match retry` |
| `metrics` | File size, complexity and churn: `reveal metrics src/` |
| `check` | Rule findings: `reveal check src/`; a change: `reveal check --changed main..HEAD` |
| `surface` | Recognized external boundaries: `reveal surface src/` |
| `contracts` | Interfaces and data contracts: `reveal contracts src/` |
| `patches` | Test patch pressure: `reveal patches tests/` |
| `diff://` | Structural comparison: `reveal diff://before.py:after.py` |
| `pack` | Context within a budget: `reveal pack src/ --budget 8000` |
| `json://` | Nested JSON: `reveal json://config.json/service/mode` |
| `sqlite://` | Database structure: `reveal sqlite:///path/to/app.db` |
| `xlsx://` | Workbook structure: `reveal xlsx://book.xlsx` |
| `env://` | Environment inspection with secret redaction: `reveal env://NAME` |

Other resources: `reveal help://adapters` lists session exploration and hosting
operations. Hosting adapters remain available and are planned to move to
`reveal-ops`; nginx configuration analysis stays in core. No server or API key
is required for local file inspection.

## Install and discover

Git history, architecture comparisons and churn need the Git extra:

```bash
pip install "reveal-cli[git]"
reveal --agent-help                  # agent orientation
reveal help://quick                  # choose a tool
reveal help://languages              # supported languages and formats (live registry)
reveal help://schemas/ast            # one tool's exact controls
reveal calls --help                  # this subcommand's options
```

If a managed Windows machine blocks the generated executable, use
`python -m reveal`. To pre-download grammars for offline use, run `reveal offline`.

## Scripting and agents

```bash
reveal src/app.py main --format json
git ls-files '*.py' | reveal --stdin
reveal pack src/ --since main --budget 8000
```

Exit codes on qualified operations: **0** completed, **1** a findings gate
matched, **2** invalid invocation/resource, **3** required analysis or output
failed or was incomplete. Incompleteness takes priority over findings.
See [output diagnostics](reveal/docs/OUTPUT_DIAGNOSTICS_GUIDE.md) and each
tool's help for its supported controls and remaining legacy exceptions.

The optional `reveal-mcp` server exposes inspection tools to MCP clients;
[setup and transport details](reveal/docs/guides/MCP_SETUP.md) describe its scope.
Reveal reads, checks and packages context; it does not edit source or run an LLM.

## Evidence and documentation

- [Validation](VALIDATION.md): measured populations, independent oracles and limits.
- [Roadmap](ROADMAP.md): command consolidation and planned behavior changes.
- [Quick start](reveal/docs/QUICK_START.md) and [recipes](reveal/docs/guides/RECIPES.md).
- [Agent reference](reveal/docs/AGENT_HELP.md) and [all documentation](reveal/docs/INDEX.md).
- [Contributing](CONTRIBUTING.md).

## License

MIT; see [LICENSE](LICENSE).
