reveal-cli 0.8.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,352 @@
1
+ Metadata-Version: 2.4
2
+ Name: reveal-cli
3
+ Version: 0.8.0
4
+ Summary: Semantic code exploration with progressive disclosure - explore directories, files, and code elements with smart defaults
5
+ Author-email: Progressive Reveal Contributors <scottsen@users.noreply.github.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/scottsen/reveal
8
+ Project-URL: Repository, https://github.com/scottsen/reveal
9
+ Project-URL: Documentation, https://github.com/scottsen/reveal/tree/main/docs
10
+ Project-URL: Bug Tracker, https://github.com/scottsen/reveal/issues
11
+ Project-URL: Discussions, https://github.com/scottsen/reveal/discussions
12
+ Project-URL: Changelog, https://github.com/scottsen/reveal/releases
13
+ Keywords: cli,file-explorer,ai,agentic,progressive-disclosure,code-analysis
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Software Development :: Code Generators
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Classifier: Topic :: Text Processing :: Markup
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: pyyaml>=6.0
30
+ Requires-Dist: rich>=13.0.0
31
+ Requires-Dist: tree-sitter==0.21.3
32
+ Requires-Dist: tree-sitter-languages>=1.10.0
33
+ Provides-Extra: dev
34
+ Requires-Dist: pytest>=7.0; extra == "dev"
35
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
36
+ Requires-Dist: black>=23.0; extra == "dev"
37
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
38
+ Provides-Extra: treesitter
39
+ Provides-Extra: excel
40
+ Requires-Dist: openpyxl>=3.0; extra == "excel"
41
+ Provides-Extra: syntax
42
+ Requires-Dist: pygments>=2.0; extra == "syntax"
43
+ Dynamic: license-file
44
+
45
+ # reveal - Explore Code Semantically
46
+
47
+ > **The simplest way to understand code**
48
+ >
49
+ > Point it at a directory, file, or function. Get exactly what you need with zero configuration.
50
+
51
+ ## 🎯 The Problem
52
+
53
+ Developers and AI agents waste time reading entire files when they only need to understand structure or extract specific functions. There's no standard way to progressively explore code.
54
+
55
+ ## 💡 The Solution
56
+
57
+ `reveal` provides smart, semantic exploration of codebases:
58
+ - **Directories** → See what's inside
59
+ - **Files** → See structure (imports, functions, classes)
60
+ - **Elements** → See implementation (extract specific function/class)
61
+
62
+ All with perfect `filename:line` integration for vim, git, grep, and other tools.
63
+
64
+ ## ⚡ Quick Start
65
+
66
+ **Install:**
67
+ ```bash
68
+ pip install reveal-cli
69
+ ```
70
+
71
+ Includes full support for 18 file types out of the box (Python, JavaScript, TypeScript, Rust, Go, and more).
72
+
73
+ **Use:**
74
+ ```bash
75
+ reveal src/ # Directory → tree view
76
+ reveal app.py # File → structure
77
+ reveal app.py load_config # Element → extraction
78
+ ```
79
+
80
+ **That's it.** No flags, no configuration, just works.
81
+
82
+ ## 🎨 Clean Design
83
+
84
+ ### Smart Auto-Detection
85
+
86
+ ```bash
87
+ # Directories → tree view
88
+ $ reveal src/
89
+ 📁 src/
90
+ ├── app.py (247 lines, Python)
91
+ ├── database.py (189 lines, Python)
92
+ └── models/
93
+ ├── user.py (156 lines, Python)
94
+ └── post.py (203 lines, Python)
95
+
96
+ # Files → structure view
97
+ $ reveal app.py
98
+ 📄 app.py
99
+
100
+ Imports (3):
101
+ app.py:1 import os, sys
102
+ app.py:2 from typing import Dict
103
+
104
+ Functions (5):
105
+ app.py:15 load_config(path: str) -> Dict
106
+ app.py:28 setup_logging(level: str) -> None
107
+
108
+ Classes (2):
109
+ app.py:95 Database
110
+ app.py:145 RequestHandler
111
+
112
+ # Elements → extraction
113
+ $ reveal app.py load_config
114
+ app.py:15-27 | load_config
115
+
116
+ 15 def load_config(path: str) -> Dict:
117
+ 16 """Load configuration from JSON file."""
118
+ 17
119
+ 18 if not os.path.exists(path):
120
+ 19 raise FileNotFoundError(f"Config not found: {path}")
121
+ 20
122
+ 21 with open(path) as f:
123
+ 22 return json.load(f)
124
+ ```
125
+
126
+ ### Perfect Unix Integration
127
+
128
+ Every line is `filename:line` format:
129
+
130
+ ```bash
131
+ # Works with vim
132
+ $ reveal app.py | grep "Database"
133
+ app.py:95 Database
134
+
135
+ $ vim app.py:95
136
+
137
+ # Works with git
138
+ $ reveal app.py | grep "load_config"
139
+ app.py:15 load_config(path: str) -> Dict
140
+
141
+ $ git blame app.py -L 15,27
142
+
143
+ # Pipe to other tools
144
+ $ reveal app.py --format=grep | grep "config"
145
+ app.py:15:def load_config(path: str) -> Dict:
146
+ app.py:18: if not os.path.exists(path):
147
+ ```
148
+
149
+ ## 🔌 Adding New File Types (Stupidly Easy)
150
+
151
+ ### Tree-Sitter Languages (10 lines!)
152
+
153
+ ```python
154
+ from reveal import TreeSitterAnalyzer, register
155
+
156
+ @register('.go', name='Go', icon='🔷')
157
+ class GoAnalyzer(TreeSitterAnalyzer):
158
+ language = 'go'
159
+ ```
160
+
161
+ **Done!** Full Go support with structure extraction and element access.
162
+
163
+ Works for: Python, Rust, Go, JavaScript, TypeScript, C#, Java, PHP, Bash, C, C++, Swift, Kotlin, and 40+ more languages!
164
+
165
+ ### Custom Analyzers (20-50 lines)
166
+
167
+ ```python
168
+ from reveal import FileAnalyzer, register
169
+
170
+ @register('.md', name='Markdown', icon='📝')
171
+ class MarkdownAnalyzer(FileAnalyzer):
172
+ def get_structure(self):
173
+ """Extract headings."""
174
+ headings = []
175
+ for i, line in enumerate(self.lines, 1):
176
+ if line.startswith('#'):
177
+ headings.append({'line': i, 'name': line.strip('# ')})
178
+ return {'headings': headings}
179
+
180
+ def extract_element(self, element_type, name):
181
+ """Extract a section."""
182
+ # Custom extraction logic
183
+ ...
184
+ ```
185
+
186
+ That's it! Your file type now works with reveal.
187
+
188
+ ## 🚀 Features
189
+
190
+ - ✅ **Smart defaults** - No flags needed for 99% of use cases
191
+ - ✅ **Directory trees** - See what's in a folder
192
+ - ✅ **Structure extraction** - Imports, functions, classes, signals (GDScript)
193
+ - ✅ **Element extraction** - Get specific function/class
194
+ - ✅ **18 file types built-in** - Python, Rust, Go, JavaScript, TypeScript, GDScript, Bash, Jupyter, Markdown, JSON, YAML, TOML, Nginx, Dockerfile, and more
195
+ - ✅ **Shebang detection** - Extensionless scripts work automatically (detects `#!/usr/bin/env python3`, `#!/bin/bash`)
196
+ - ✅ **50+ languages available** - Via optional tree-sitter (JS, TS, C#, Java, PHP, etc.)
197
+ - ✅ **Perfect line numbers** - `filename:line` format everywhere
198
+ - ✅ **Unix composable** - Works with vim, git, grep, sed, awk
199
+ - ✅ **Multiple output formats** - text (default), json, grep
200
+ - ✅ **Easy to extend** - Add new file type in 10-50 lines
201
+ - ✅ **AI-optimized** - Designed for agentic workflows
202
+ - ✅ **Windows compatible** - Full UTF-8/emoji support
203
+
204
+ ## 📚 Real-World Examples
205
+
206
+ ### AI Agent Workflow
207
+ ```bash
208
+ # Start broad
209
+ $ reveal src/
210
+ # Pick interesting file
211
+ $ reveal src/app.py
212
+ # Deep dive
213
+ $ reveal src/app.py Database
214
+ ```
215
+
216
+ ### Developer Quick Lookup
217
+ ```bash
218
+ # See function implementation
219
+ $ reveal app.py load_config
220
+
221
+ # Jump to edit
222
+ $ vim app.py:15
223
+ ```
224
+
225
+ ### Game Development (GDScript)
226
+ ```bash
227
+ # Explore Godot scripts
228
+ $ reveal player.gd
229
+ 📄 player.gd
230
+
231
+ Functions (4):
232
+ player.gd:11 _ready() -> void
233
+ player.gd:16 take_damage(amount: int) -> void
234
+ player.gd:24 die() -> void
235
+
236
+ Signals (2):
237
+ player.gd:3 health_changed(new_health)
238
+ player.gd:4 died()
239
+
240
+ # Extract specific function
241
+ $ reveal player.gd take_damage
242
+ player.gd:16-23 | take_damage
243
+
244
+ 16 func take_damage(amount: int) -> void:
245
+ 17 """Reduce health by amount."""
246
+ 18 current_health -= amount
247
+ 19 emit_signal("health_changed", current_health)
248
+ ```
249
+
250
+ ### Integration with Tools
251
+ ```bash
252
+ # Find all TODO comments
253
+ $ reveal src/*.py | grep -i "todo"
254
+
255
+ # Count functions per file
256
+ $ for f in src/*.py; do echo "$f: $(reveal $f | grep -c 'Functions')"; done
257
+
258
+ # Extract all function names
259
+ $ reveal app.py | awk '/Functions/,/^$/ {if ($2 ~ /:/) print $3}'
260
+ ```
261
+
262
+ ## 🎯 Use Cases
263
+
264
+ **For AI Agents:**
265
+ - Explore unknown codebases efficiently
266
+ - Get structure without reading full files
267
+ - Extract specific elements on demand
268
+ - Standard interface across all file types
269
+
270
+ **For Developers:**
271
+ - Quick reference without opening editor
272
+ - Understand file structure rapidly
273
+ - Find specific functions/classes
274
+ - Perfect for terminal workflows
275
+
276
+ **For Scripts:**
277
+ - JSON output for programmatic access
278
+ - Grep-compatible format
279
+ - Composable with Unix tools
280
+ - Reliable filename:line references
281
+
282
+ ## 🏗️ Architecture
283
+
284
+ ```
285
+ reveal/
286
+ ├── base.py # FileAnalyzer base class
287
+ ├── treesitter.py # TreeSitterAnalyzer (50+ languages!)
288
+ ├── tree_view.py # Directory tree view
289
+ ├── new_cli.py # Simple CLI (200 lines)
290
+ └── analyzers_new/
291
+ ├── python.py # 15 lines
292
+ ├── rust.py # 13 lines
293
+ ├── go.py # 13 lines
294
+ ├── markdown.py # 79 lines
295
+ ├── yaml_json.py # 110 lines
296
+ └── ... # Easy to add more!
297
+ ```
298
+
299
+ **Total core:** ~500 lines
300
+ **Per analyzer:** 10-50 lines
301
+
302
+ ## 📖 Optional Flags
303
+
304
+ ```bash
305
+ # Discovery
306
+ reveal --version # Show version
307
+ reveal --list-supported # List all supported file types
308
+
309
+ # Metadata only
310
+ reveal app.py --meta
311
+
312
+ # JSON output
313
+ reveal app.py --format=json
314
+
315
+ # Grep-compatible output
316
+ reveal app.py --format=grep
317
+
318
+ # Directory depth
319
+ reveal src/ --depth=5
320
+ ```
321
+
322
+ ## 🤝 Contributing
323
+
324
+ We welcome contributions! Adding a new file type takes 10-50 lines of code.
325
+
326
+ **Most wanted:**
327
+ - New language analyzers (TypeScript, Java, Swift, Kotlin)
328
+ - Better extraction logic for existing analyzers
329
+ - Documentation improvements
330
+ - Bug reports and feature requests
331
+
332
+ ## 📜 License
333
+
334
+ MIT License - See [LICENSE](LICENSE)
335
+
336
+ ## 🔗 Links
337
+
338
+ - **GitHub:** https://github.com/scottsen/reveal
339
+ - **Issues:** https://github.com/scottsen/reveal/issues
340
+ - **Discussions:** https://github.com/scottsen/reveal/discussions
341
+
342
+ ## 🌟 Vision
343
+
344
+ Make `reveal` the standard way to explore code - for humans and AI agents alike. Clean, simple, powerful.
345
+
346
+ ---
347
+
348
+ **Status:** 🚀 v0.4.0 - Enhanced CLI + Cross-Platform | **License:** MIT
349
+
350
+ [![GitHub Stars](https://img.shields.io/github/stars/scottsen/reveal?style=social)](https://github.com/scottsen/reveal)
351
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
352
+ [![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
@@ -0,0 +1,33 @@
1
+ plugins/c-header.yaml,sha256=sRAek7FbWTq9Fe18dH0ZbGS5Dq0fbAYmY3SK7SSQfpg,2171
2
+ plugins/gdscript.yaml,sha256=HEo6D4AGkl0LUo7H85-bR81DrjQ7HBFCHm1KqoENOwg,2603
3
+ plugins/python.yaml,sha256=213ql1rlRsm1BY_2toh0_aRRWQEGCP8McSQePCsk2ng,2558
4
+ plugins/yaml.yaml,sha256=ItDYralLAwDdKHA_V-MIIVKh2f1fpxRc_R0UeGxArww,2061
5
+ reveal/__init__.py,sha256=Xyft2Ri_HeIQCVFhKZsO0N1MRCFPg_kzAt4PVVyJMHc,644
6
+ reveal/base.py,sha256=4KiQ-Q42erhzO03BnqYsYF3YttYd0gOGCqyDJ3-eAWg,7872
7
+ reveal/main.py,sha256=fgzjYq8qKaZK5JxWK50xIjGLEzO0MvYTG1DHUmsf4lY,11984
8
+ reveal/tree_view.py,sha256=xgaVy4cbM6Ug0EAF6ITUgNL6ZJLqxX7SnIPHkXbypTw,3016
9
+ reveal/treesitter.py,sha256=lueEwthz9Csm6icV4e4U4kOvRZowkuWRtdN2zDk9RuA,9726
10
+ reveal/analyzers/__init__.py,sha256=A1wvQ0be9je_gF2xZp9YY4qaxYRhg4USrqyviIHjuNo,1046
11
+ reveal/analyzers/bash.py,sha256=N6PejKPwRPuL1BGlgV78486iyspZ3bgw1YvZG5yUghw,1484
12
+ reveal/analyzers/dockerfile.py,sha256=_4QKDmLrYbwER8p9gC5RL4EmmCcqg5KBNA1eGn4kQcE,5265
13
+ reveal/analyzers/gdscript.py,sha256=HNwF54p65sIDlBY74iHzLPMG1NUv36qesGcoDlaLDqY,6765
14
+ reveal/analyzers/go.py,sha256=sylABSwHp_jSPm7eHKq2ipNmTd0IV9mBb0JA15Rnfn0,284
15
+ reveal/analyzers/javascript.py,sha256=A-decthjc94-cezrXRC-wteEHgQ820J5oWPbPRm8dKo,530
16
+ reveal/analyzers/jupyter_analyzer.py,sha256=6yz6poGJYRGdtq3IxR1Y-cijaFeIpZ4A5oMH6JMb_18,8723
17
+ reveal/analyzers/markdown.py,sha256=STcES1x_f9tKjdCgvZDeno4cSKbT4iMTEDItmNsInh8,2401
18
+ reveal/analyzers/nginx.py,sha256=uZyyDO0A3IFCJGhwvxpA8THXunrSYweln7poHawT07A,7108
19
+ reveal/analyzers/python.py,sha256=qbPttzQzOMoWGYcpvwxGTZaBFLBduzZglj7AVBCle-U,389
20
+ reveal/analyzers/rust.py,sha256=ogeRQvUfvgih1b5QfgslrDk_pc2dlCNbgYEqz66HWF0,296
21
+ reveal/analyzers/toml.py,sha256=U3nuBzjCX3NdMqXU4xxVRmUoAh5SVCsDS-uJdbyy8wo,3014
22
+ reveal/analyzers/typescript.py,sha256=p35mvBVsPx8bADzJhjhH9ggShPHAx7LBXSOEIUlfHiw,667
23
+ reveal/analyzers/yaml_json.py,sha256=uyEZ_Y24BK7eET8xYbE8Q4rAIO5CXwStMwf_l3vsvF8,3066
24
+ reveal/tests/__init__.py,sha256=meoUhQILMxty6Gk_XHj0-zbKRn711fTxZ6JIMc2Y7JU,29
25
+ reveal/tests/test_json_yaml_line_numbers.py,sha256=mEUGR5_BMco_0N3Bf9hVRgDrdPVKmQsmog6rsAkb0BU,7649
26
+ reveal/tests/test_line_numbers.py,sha256=3oeC8rc_ofhGaXK-6HDyBJwyUZGMtjIcRSrRLLvYZrw,5137
27
+ reveal/tests/test_toml_analyzer.py,sha256=4SAdDYYfA3paCWWS-tw3ZKxVPt9X00wCj0YQfUYl154,7051
28
+ reveal_cli-0.8.0.dist-info/licenses/LICENSE,sha256=KJ5Eu4wDOnBsoZhjgPVzNtU-_R0eCEaSRo-bEFFwLSE,1088
29
+ reveal_cli-0.8.0.dist-info/METADATA,sha256=nNXurr6pYv6821z4WmayrLRjqeRc2k6flOsiToBrosc,10357
30
+ reveal_cli-0.8.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
+ reveal_cli-0.8.0.dist-info/entry_points.txt,sha256=_EMjogo56bn7uRIjUkHXWr7MYb09640wCTvuPhYBJug,44
32
+ reveal_cli-0.8.0.dist-info/top_level.txt,sha256=x35WvsdwMGe0jIYO57z-HxlnZLdyK6STnD7fSKfZATI,15
33
+ reveal_cli-0.8.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ reveal = reveal.main:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Progressive Reveal Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ plugins
2
+ reveal