cli-scry 0.1.1__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,271 @@
1
+ Metadata-Version: 2.4
2
+ Name: cli-scry
3
+ Version: 0.1.1
4
+ Summary: Peer into any Python codebase. Discover structure, extract files, export for LLMs.
5
+ Project-URL: Homepage, https://github.com/amdouek/scry
6
+ Project-URL: Repository, https://github.com/amdouek/scry
7
+ Project-URL: Issues, https://github.com/amdouek/scry/issues
8
+ Author-email: Alon Douek <Alon.Douek@monash.edu>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: cli,code-sharing,codebase,developer-tools,export,llm,project-structure,scry
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Topic :: Utilities
24
+ Requires-Python: >=3.10
25
+ Provides-Extra: legacy
26
+ Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'legacy'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # scry
30
+
31
+ > *Peer into any Python codebase. Discover structure, extract files, export for LLM parsing.*
32
+
33
+ **scry** is a zero-dependency, single-file CLI tool that auto-discovers
34
+ your Python project structure and lets you selectively export files for
35
+ sharing -- in LLM chat sessions, code reviews, documentation, or
36
+ anywhere else you need a clean, readable snapshot of your codebase.
37
+
38
+ ### Via pip
39
+ ```bash
40
+ pip install cli-scry
41
+ ```
42
+
43
+ ### Via pipx
44
+ ```bash
45
+ pipx install cli-scry
46
+ ```
47
+
48
+ ### Direct download
49
+ ```bash
50
+ curl -O https://raw.githubusercontent.com/amdouek/scry/main/scry/cli.py
51
+ python cli.py --help
52
+ ```
53
+
54
+ > Note: The PyPI package is `cli-scry` (the name `scry` was
55
+ > already taken by an unrelated package). The CLI command is simply
56
+ > `scry`.
57
+
58
+ ## Why?
59
+ Modern coding increasingly involves pasting code into LLM
60
+ conversations, sharing project subsets with collaborators, or
61
+ extracting specific modules for targeted code review.
62
+ The typical workflow (manually copying files, remembering paths,
63
+ stitching things together) is tedious and error-prone.
64
+
65
+ `scry` simplifies this! Point to any Python project and it
66
+ will automatically discover packages, modules, config files, and project
67
+ structure. Then export exactly the slice you need, in a format optimised for
68
+ the recipient (be it human or machine).
69
+
70
+ > **Due credit** -- this tool was heavily inspired by the excellent [repomix](https://github.com/yamadashy/repomix) tool. Where `repomix` is a feature-rich,
71
+ > comprehensive solution, `scry` is deliberately minimal: No dependencies,
72
+ > single-file, Python-native and designed for quick, selective
73
+ > exports as well as full-repo dumps.
74
+
75
+ ## Quick Start
76
+ ```bash
77
+ # See what scry discovers in your project
78
+ scry --list-modules
79
+
80
+ # List every file (not just Python)
81
+ scry --list-files
82
+
83
+ # View core files + project overview in terminal
84
+ scry
85
+
86
+ # Export core files + project overview
87
+ scry -o core.txt
88
+
89
+ # Export a specific module
90
+ scry --module models
91
+
92
+ # Export only files you've changed since last commit
93
+ scry --changed
94
+
95
+ # Export everything as LLM-optimised XML
96
+ scry --all --format xml -o codebase.xml
97
+ # or
98
+ scry --all -o codebase.xml # Auto-detects extension
99
+
100
+ # Export specific files
101
+ scry --files src/core.py config/defaults.yaml tests/test_core.py
102
+ ```
103
+
104
+ ## Features
105
+
106
+ ### Auto-Discovery
107
+ `scry` understands Python project conventions out of the box:
108
+
109
+ - Flat layout (`mypackage/` in project root)
110
+ - Src layout (`src/mypackage/`)
111
+ - Subpackages (automatically grouped as modules)
112
+ - Special directories (`tests/`, `scripts/`, `examples/`, etc.)
113
+ - Core project files (`pyproject.toml`, `README.md`, `requirements.txt`, etc.)
114
+
115
+ You don't have to configure anything - just run it for your project!
116
+
117
+ ### Selective Export
118
+ ```bash
119
+ scry --module models # One module
120
+ scry --module models training # Multiple modules
121
+ scry --files src/config.yaml # Specific files
122
+ scry --changed # Git-changed files only
123
+ scry --all # Everything
124
+ ```
125
+
126
+ ### Secret Detection
127
+ Before every export, scry scans for potential secrets (API keys,
128
+ tokens, private keys, database credentials, and other sensitive
129
+ patterns). Warnings are displayed before any output is written.
130
+
131
+ **IMPORTANTLY**, `scry` does NOT automatically prevent secrets
132
+ from appearing in the output. The output warnings require acknowledgement,
133
+ but users MUST take care to ensure that sensitive info is not shared.
134
+
135
+ An example warning:
136
+
137
+ ```
138
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
139
+ POTENTIAL SECRETS DETECTED
140
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
141
+
142
+ config/settings.py:
143
+ Line 42: Generic API Key — Generic API key assignment detected
144
+ Line 67: Database URL — Database connection string with credentials
145
+
146
+ Found 2 potential secret(s) across 1 file(s).
147
+ Review the above before sharing this export.
148
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
149
+ ```
150
+
151
+ Detected patterns include:
152
+ - AWS access keys and secret keys
153
+ - GitHub, GitLab, and Slack tokens
154
+ - Stripe, SendGrid, and Heroku API keys
155
+ - Private key blocks (RSA, EC, DSA, etc.)
156
+ - Database connection strings with embedded credentials
157
+ - Generic `password=`, `secret=`, `api_key=` assignments
158
+ - JWT tokens
159
+ - Sensitive filenames (`.env`, `.pem`, `.key`, `credentials.*`)
160
+
161
+ Use --no-scan to skip if needed (but **use with caution!**).
162
+
163
+ ## Output Formats
164
+ **Text** (default) - Markdown-style with fenced code blocks:
165
+ ```bash
166
+ scry --module models -o export.txt
167
+ ```
168
+
169
+ **XML** - Structured, `CDATA`-wrapped, and optimised for LLM parsing:
170
+ ```bash
171
+ scry --all --format xml -o codebase.xml
172
+ # or
173
+ scry --all -o codebase.xml
174
+ ```
175
+
176
+ The XML format uses `<file path="..." language="..." size="...">`
177
+ elements with CDATA sections, which avoids the nested-backtick
178
+ problems that can occur when LLMs parse markdown.
179
+
180
+ ## Full Project Listing
181
+ Discover every file in your project, not just Python modules:
182
+ ```bash
183
+ # List all files with sizes, grouped by directory
184
+ scry --list-files
185
+
186
+ # Filter to specific extensions
187
+ scry --list-files --ext .yaml .yml .toml .json
188
+ ```
189
+
190
+ The output includes a per-extension summary table, which is
191
+ particularly helpful to spot any parts of your repo that are too chunky!
192
+
193
+ ```
194
+ Extension Count Total Size
195
+ ─────────────── ────── ────────────
196
+ .py 31 42.3 KB
197
+ .yaml 3 2.8 KB
198
+ .toml 1 1.3 KB
199
+ ─────────────── ────── ────────────
200
+ TOTAL 35 46.2 KB
201
+ ```
202
+
203
+ ## Optional Configuration
204
+ `scry` is designed to work without any configuration. However,
205
+ if you want fine-grained control, you can generate a config file:
206
+ ```bash
207
+ scry --init-config
208
+ ```
209
+
210
+ This creates `.scry.toml` in your project root, which is pre-populated
211
+ with your project structure (as discovered by `scry`). You can use this
212
+ to customise core files, ignore patterns, default modules, etc.
213
+
214
+ ```toml
215
+ [scry]
216
+ project_name = "myproject"
217
+ core_files = ["pyproject.toml", "README.md"]
218
+ default_module = "utils"
219
+ tree_depth = 4
220
+
221
+ ignore_dirs = [".git", "__pycache__", "venv", "node_modules"]
222
+ ignore_patterns = ["*.egg-info", "*.pyc"]
223
+ extensions = [".py"]
224
+ ```
225
+
226
+ ## Common workflows
227
+
228
+ ### Starting an LLM chat session
229
+ ```bash
230
+ # Give the LLM your project overview and the module you're working on
231
+ scry --module embeddings -o context.txt
232
+ # Then paste or upload context.txt into your chat
233
+ ```
234
+
235
+ ### Debugging with an LLM
236
+ ```bash
237
+ # Export only what you've changed (minimal, focused context)
238
+ scry --changed
239
+ ```
240
+
241
+ ### Full codebase export for deep refactoring
242
+ ```bash
243
+ # XML format for best LLM parsing
244
+ scry --all --format xml -o codebase.xml
245
+ ```
246
+
247
+ ### Exploring an unfamiliar project
248
+ ```bash
249
+ # What modules exist?
250
+ scry --list-modules
251
+
252
+ # What non-Python files are there?
253
+ scry --list-files --ext .yaml .json .toml .cfg
254
+
255
+ # Export the module you want to understand
256
+ scry --module data_processing
257
+ ```
258
+
259
+ ## How does `scry` work?
260
+ `scry` performs the following steps:
261
+ 1. **Detect project root** and load `.scry.toml` if present;
262
+ 2. **Discover source packages** by checking `src/` layout, then flat layout;
263
+ 3. **Map subpackages to module names** (each subdirectory with .py files becomes a selectable module);
264
+ 4. **Detect core files** (`pyproject.toml`, `README.md`, etc.);
265
+ 5. **Scan for secrets** before any export;
266
+ 6. **Format and output** in the requested format (currently supports txt and xml).
267
+
268
+ ## Requirements
269
+ - Python 3.10+
270
+ - **Zero dependencies** - `scry` is deliberately lightweight; we use only the standard Python library
271
+ - Optional: `tomli` for `.scry.toml` support on Python <3.11
@@ -0,0 +1,7 @@
1
+ scry/__init__.py,sha256=guC3CIiNbLBFWRQzj1VbZkVxdGY1JpdVP3iDtAsrvGg,118
2
+ scry/cli.py,sha256=nnQ8HIabkHY-XamrOX52b13gtlHxYz1JAyjHTSRL43Q,45530
3
+ cli_scry-0.1.1.dist-info/METADATA,sha256=ffv9kXTrQY3e7TYz7R0s598vcbxTNow6qGK9pBqL-tQ,8851
4
+ cli_scry-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
5
+ cli_scry-0.1.1.dist-info/entry_points.txt,sha256=qgeJk2-hrQZ7P0iK1WPxKJUIxkgmIHuwBJkNTw11ICE,39
6
+ cli_scry-0.1.1.dist-info/licenses/LICENSE,sha256=VKnm5c3xFAFV-TRpRA-YtaTbQMNcz3VGWd4ZB5_SYlY,1088
7
+ cli_scry-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ scry = scry.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alon Douek
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.
scry/__init__.py ADDED
@@ -0,0 +1,7 @@
1
+ """scry: Peer into any Python codebase."""
2
+
3
+ __version__ = "0.1.0"
4
+
5
+ from scry.cli import main
6
+
7
+ __all__ = ["main"]