repo-notes 0.3.0__tar.gz
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.
- repo_notes-0.3.0/LICENSE +21 -0
- repo_notes-0.3.0/PKG-INFO +319 -0
- repo_notes-0.3.0/README.md +284 -0
- repo_notes-0.3.0/pyproject.toml +64 -0
- repo_notes-0.3.0/setup.cfg +4 -0
- repo_notes-0.3.0/src/repo_notes/__init__.py +3 -0
- repo_notes-0.3.0/src/repo_notes/__main__.py +11 -0
- repo_notes-0.3.0/src/repo_notes/agents_generator.py +326 -0
- repo_notes-0.3.0/src/repo_notes/cache.py +157 -0
- repo_notes-0.3.0/src/repo_notes/cli.py +431 -0
- repo_notes-0.3.0/src/repo_notes/config.py +168 -0
- repo_notes-0.3.0/src/repo_notes/detectors/__init__.py +6 -0
- repo_notes-0.3.0/src/repo_notes/detectors/base.py +41 -0
- repo_notes-0.3.0/src/repo_notes/detectors/c_cpp.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/docker.py +29 -0
- repo_notes-0.3.0/src/repo_notes/detectors/go.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/java.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/javascript.py +25 -0
- repo_notes-0.3.0/src/repo_notes/detectors/kotlin.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/php.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/python.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/r_lang.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/registry.py +90 -0
- repo_notes-0.3.0/src/repo_notes/detectors/ruby.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/rust.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/shell.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/sql.py +14 -0
- repo_notes-0.3.0/src/repo_notes/detectors/swift.py +14 -0
- repo_notes-0.3.0/src/repo_notes/extractors/__init__.py +56 -0
- repo_notes-0.3.0/src/repo_notes/extractors/api_endpoints.py +113 -0
- repo_notes-0.3.0/src/repo_notes/extractors/architecture.py +492 -0
- repo_notes-0.3.0/src/repo_notes/extractors/cicd.py +95 -0
- repo_notes-0.3.0/src/repo_notes/extractors/complexity.py +160 -0
- repo_notes-0.3.0/src/repo_notes/extractors/database.py +68 -0
- repo_notes-0.3.0/src/repo_notes/extractors/dependencies.py +116 -0
- repo_notes-0.3.0/src/repo_notes/extractors/duplicates.py +68 -0
- repo_notes-0.3.0/src/repo_notes/extractors/env_vars.py +54 -0
- repo_notes-0.3.0/src/repo_notes/extractors/git.py +74 -0
- repo_notes-0.3.0/src/repo_notes/extractors/project_intelligence.py +460 -0
- repo_notes-0.3.0/src/repo_notes/extractors/readme_data.py +188 -0
- repo_notes-0.3.0/src/repo_notes/extractors/scripts.py +88 -0
- repo_notes-0.3.0/src/repo_notes/extractors/security.py +162 -0
- repo_notes-0.3.0/src/repo_notes/extractors/stats.py +61 -0
- repo_notes-0.3.0/src/repo_notes/extractors/structure.py +68 -0
- repo_notes-0.3.0/src/repo_notes/extractors/todos.py +169 -0
- repo_notes-0.3.0/src/repo_notes/extractors/type_coverage.py +74 -0
- repo_notes-0.3.0/src/repo_notes/file_cache.py +16 -0
- repo_notes-0.3.0/src/repo_notes/generator.py +793 -0
- repo_notes-0.3.0/src/repo_notes/html_generator.py +639 -0
- repo_notes-0.3.0/src/repo_notes/html_templates.py +204 -0
- repo_notes-0.3.0/src/repo_notes/readme_generator.py +176 -0
- repo_notes-0.3.0/src/repo_notes/scanner.py +171 -0
- repo_notes-0.3.0/src/repo_notes.egg-info/PKG-INFO +319 -0
- repo_notes-0.3.0/src/repo_notes.egg-info/SOURCES.txt +76 -0
- repo_notes-0.3.0/src/repo_notes.egg-info/dependency_links.txt +1 -0
- repo_notes-0.3.0/src/repo_notes.egg-info/entry_points.txt +2 -0
- repo_notes-0.3.0/src/repo_notes.egg-info/requires.txt +9 -0
- repo_notes-0.3.0/src/repo_notes.egg-info/top_level.txt +1 -0
- repo_notes-0.3.0/tests/test_agents_generator.py +498 -0
- repo_notes-0.3.0/tests/test_api_endpoints_extractor.py +71 -0
- repo_notes-0.3.0/tests/test_architecture_extractor.py +406 -0
- repo_notes-0.3.0/tests/test_cache.py +168 -0
- repo_notes-0.3.0/tests/test_cicd_extractor.py +52 -0
- repo_notes-0.3.0/tests/test_complexity_extractor.py +138 -0
- repo_notes-0.3.0/tests/test_database_extractor.py +48 -0
- repo_notes-0.3.0/tests/test_detectors.py +268 -0
- repo_notes-0.3.0/tests/test_duplicates_extractor.py +66 -0
- repo_notes-0.3.0/tests/test_env_vars_extractor.py +66 -0
- repo_notes-0.3.0/tests/test_extractors.py +115 -0
- repo_notes-0.3.0/tests/test_generator.py +680 -0
- repo_notes-0.3.0/tests/test_html_generator.py +324 -0
- repo_notes-0.3.0/tests/test_integration.py +368 -0
- repo_notes-0.3.0/tests/test_project_intelligence_extractor.py +121 -0
- repo_notes-0.3.0/tests/test_readme_generator.py +439 -0
- repo_notes-0.3.0/tests/test_scanner.py +97 -0
- repo_notes-0.3.0/tests/test_scripts_extractor.py +57 -0
- repo_notes-0.3.0/tests/test_todos_extractor.py +166 -0
- repo_notes-0.3.0/tests/test_type_coverage_extractor.py +60 -0
repo_notes-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gift Ndlovu
|
|
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,319 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: repo-notes
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Generate useful notes for any code repository from one command
|
|
5
|
+
Author: Gift Ndlovu
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/GiftKNdlovu/repo-notes
|
|
8
|
+
Project-URL: Repository, https://github.com/GiftKNdlovu/repo-notes
|
|
9
|
+
Project-URL: Issues, https://github.com/GiftKNdlovu/repo-notes/issues
|
|
10
|
+
Keywords: repository,code-analysis,developer-tools,cli,ai-agents,documentation
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Documentation
|
|
20
|
+
Classifier: Topic :: Software Development
|
|
21
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: click>=8.0
|
|
27
|
+
Requires-Dist: pyyaml>=6.0
|
|
28
|
+
Requires-Dist: pathspec>=0.11
|
|
29
|
+
Requires-Dist: rich>=13.0
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
33
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# repo-notes
|
|
37
|
+
|
|
38
|
+
Generate useful notes for any code repository from one command.
|
|
39
|
+
|
|
40
|
+
`repo-notes` scans a project and creates a readable summary of what is inside: languages, structure, dependencies, git info, architecture hints, security notes, TODOs, scripts, environment variables, type coverage, complexity, duplicate files, and API routes.
|
|
41
|
+
|
|
42
|
+
It is useful when you:
|
|
43
|
+
|
|
44
|
+
- open a new repository and want to understand it quickly
|
|
45
|
+
- want a compact `REPO_NOTES.md` for yourself or teammates
|
|
46
|
+
- want an `AGENTS.md` file for AI coding agents
|
|
47
|
+
- want JSON output for automation
|
|
48
|
+
- want a quick static-health snapshot before working on a project
|
|
49
|
+
|
|
50
|
+
It runs locally. No hosted service required.
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
Requires Python 3.10 or newer.
|
|
55
|
+
|
|
56
|
+
Install the latest version from GitHub:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install git+https://github.com/GiftKNdlovu/repo-notes.git
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
After the package is published to PyPI, installation will be:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install repo-notes
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If you are contributing locally:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
git clone https://github.com/GiftKNdlovu/repo-notes.git
|
|
72
|
+
cd repo-notes
|
|
73
|
+
pip install -e .
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Quick start
|
|
77
|
+
|
|
78
|
+
Scan the current directory:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
repo-notes .
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
This creates:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
REPO_NOTES.md
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Scan another project:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
repo-notes /path/to/project
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Force a fresh scan without using the cache:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
repo-notes . --no-cache
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Write to a custom file:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
repo-notes . --output docs/project-notes.md
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Common commands
|
|
109
|
+
|
|
110
|
+
### Generate normal project notes
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
repo-notes .
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Creates `REPO_NOTES.md`.
|
|
117
|
+
|
|
118
|
+
### Generate notes quietly for scripts or CI
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
repo-notes . --quiet
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Routine output is suppressed. Errors still go to stderr.
|
|
125
|
+
|
|
126
|
+
### Generate HTML output
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
repo-notes . --format html
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Creates `REPO_NOTES.html`.
|
|
133
|
+
|
|
134
|
+
### Generate JSON output
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
repo-notes . --format json --output repo-notes.json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Useful for automation and downstream tools.
|
|
141
|
+
|
|
142
|
+
### Generate AI-agent context
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
repo-notes . --agents
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Creates `AGENTS.md`, a compact summary designed for coding agents.
|
|
149
|
+
|
|
150
|
+
### Generate a starter README
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
repo-notes . --format readme
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Creates:
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
rnREADME.md
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
`README.md` is treated as hand-written documentation and is not overwritten by default.
|
|
163
|
+
|
|
164
|
+
To intentionally replace `README.md`, use the explicit destructive form:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
repo-notes . --format readme --replace-readme --force
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Generate both notes and a starter README
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
repo-notes . --format both
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Creates:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
REPO_NOTES.md
|
|
180
|
+
rnREADME.md
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Output formats
|
|
184
|
+
|
|
185
|
+
| Goal | Command | Output |
|
|
186
|
+
|---|---|---|
|
|
187
|
+
| Markdown notes | `repo-notes .` | `REPO_NOTES.md` |
|
|
188
|
+
| Starter README | `repo-notes . --format readme` | `rnREADME.md` |
|
|
189
|
+
| Notes + starter README | `repo-notes . --format both` | `REPO_NOTES.md` + `rnREADME.md` |
|
|
190
|
+
| HTML report | `repo-notes . --format html` | `REPO_NOTES.html` |
|
|
191
|
+
| JSON data | `repo-notes . --format json` | `REPO_NOTES.json` |
|
|
192
|
+
| Agent context | `repo-notes . --agents` | `AGENTS.md` |
|
|
193
|
+
|
|
194
|
+
## What repo-notes detects
|
|
195
|
+
|
|
196
|
+
`repo-notes` can include sections for:
|
|
197
|
+
|
|
198
|
+
- project structure
|
|
199
|
+
- languages and line counts
|
|
200
|
+
- dependency files
|
|
201
|
+
- git branch, remotes, contributors, and recent commits
|
|
202
|
+
- architecture hints, import relationships, entry points, coupling, and low-reachability candidates
|
|
203
|
+
- possible secrets and sensitive files
|
|
204
|
+
- TODO, FIXME, HACK, BUG, and similar comments
|
|
205
|
+
- package scripts, Makefile targets, and other build commands
|
|
206
|
+
- environment variables used by the project
|
|
207
|
+
- CI/CD configuration
|
|
208
|
+
- database schemas, migrations, and ORM usage
|
|
209
|
+
- rough type-coverage signals
|
|
210
|
+
- code complexity hotspots
|
|
211
|
+
- duplicate files
|
|
212
|
+
- API endpoints from common frameworks
|
|
213
|
+
|
|
214
|
+
The output is intentionally practical rather than perfect. It gives you a useful first map of a repository, not a full static-analysis platform.
|
|
215
|
+
|
|
216
|
+
## Configuration
|
|
217
|
+
|
|
218
|
+
Generate a starter config:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
repo-notes . --init
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
This creates `.repo-notes.yaml`.
|
|
225
|
+
|
|
226
|
+
Example:
|
|
227
|
+
|
|
228
|
+
```yaml
|
|
229
|
+
exclude_patterns:
|
|
230
|
+
- "*.log"
|
|
231
|
+
- "build/"
|
|
232
|
+
- "dist/"
|
|
233
|
+
|
|
234
|
+
include_hidden: false
|
|
235
|
+
min_file_size: 0
|
|
236
|
+
|
|
237
|
+
security:
|
|
238
|
+
entropy_threshold: 4.5
|
|
239
|
+
exclude_test_fixtures: false
|
|
240
|
+
patterns: []
|
|
241
|
+
|
|
242
|
+
structure:
|
|
243
|
+
max_depth: 3
|
|
244
|
+
show_hidden: false
|
|
245
|
+
|
|
246
|
+
output:
|
|
247
|
+
format: notes
|
|
248
|
+
order:
|
|
249
|
+
- structure
|
|
250
|
+
- project_intelligence
|
|
251
|
+
- stats
|
|
252
|
+
- deps
|
|
253
|
+
- git
|
|
254
|
+
- arch
|
|
255
|
+
- security
|
|
256
|
+
- todos
|
|
257
|
+
- scripts
|
|
258
|
+
- env_vars
|
|
259
|
+
- cicd
|
|
260
|
+
- database
|
|
261
|
+
- type_coverage
|
|
262
|
+
- complexity
|
|
263
|
+
- duplicates
|
|
264
|
+
- api_endpoints
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Use config when you want repeatable output across a team or CI job.
|
|
268
|
+
|
|
269
|
+
## CLI reference
|
|
270
|
+
|
|
271
|
+
```text
|
|
272
|
+
repo-notes [OPTIONS] [PATH]
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
| Option | Meaning |
|
|
276
|
+
|---|---|
|
|
277
|
+
| `PATH` | Directory to scan. Defaults to the current directory. |
|
|
278
|
+
| `-c, --config FILE` | Use a specific config file. |
|
|
279
|
+
| `-o, --output PATH` | Write output to a custom path. |
|
|
280
|
+
| `--max-depth INTEGER` | Control depth of the directory tree section. |
|
|
281
|
+
| `--include-hidden` | Include hidden files and directories. |
|
|
282
|
+
| `--format notes\|readme\|both\|html\|json` | Choose output format. |
|
|
283
|
+
| `--force` | Overwrite existing generated output files. |
|
|
284
|
+
| `-q, --quiet` | Suppress routine output. Useful in CI. |
|
|
285
|
+
| `--no-cache` | Bypass incremental cache and re-scan everything. |
|
|
286
|
+
| `--init` | Create a starter `.repo-notes.yaml`. |
|
|
287
|
+
| `--replace-readme` | Write generated README output to `README.md`. Use carefully. |
|
|
288
|
+
| `--agents` | Generate `AGENTS.md` for coding agents. |
|
|
289
|
+
| `--version` | Show installed version. |
|
|
290
|
+
| `--help` | Show help. |
|
|
291
|
+
|
|
292
|
+
## Notes on safety
|
|
293
|
+
|
|
294
|
+
- `README.md` is preserved by default.
|
|
295
|
+
- Generated starter README output goes to `rnREADME.md`.
|
|
296
|
+
- Existing output files are not silently overwritten unless `--force` is used where required.
|
|
297
|
+
- Security findings mask secret previews.
|
|
298
|
+
- Test-fixture/sample secrets are labelled separately from real findings when detected.
|
|
299
|
+
|
|
300
|
+
## Development
|
|
301
|
+
|
|
302
|
+
For contributors:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
git clone https://github.com/GiftKNdlovu/repo-notes.git
|
|
306
|
+
cd repo-notes
|
|
307
|
+
pip install -e ".[dev]"
|
|
308
|
+
./scripts/check.sh
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Run the CLI locally:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
python -m repo_notes . --no-cache
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## License
|
|
318
|
+
|
|
319
|
+
MIT
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
# repo-notes
|
|
2
|
+
|
|
3
|
+
Generate useful notes for any code repository from one command.
|
|
4
|
+
|
|
5
|
+
`repo-notes` scans a project and creates a readable summary of what is inside: languages, structure, dependencies, git info, architecture hints, security notes, TODOs, scripts, environment variables, type coverage, complexity, duplicate files, and API routes.
|
|
6
|
+
|
|
7
|
+
It is useful when you:
|
|
8
|
+
|
|
9
|
+
- open a new repository and want to understand it quickly
|
|
10
|
+
- want a compact `REPO_NOTES.md` for yourself or teammates
|
|
11
|
+
- want an `AGENTS.md` file for AI coding agents
|
|
12
|
+
- want JSON output for automation
|
|
13
|
+
- want a quick static-health snapshot before working on a project
|
|
14
|
+
|
|
15
|
+
It runs locally. No hosted service required.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Requires Python 3.10 or newer.
|
|
20
|
+
|
|
21
|
+
Install the latest version from GitHub:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install git+https://github.com/GiftKNdlovu/repo-notes.git
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
After the package is published to PyPI, installation will be:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install repo-notes
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If you are contributing locally:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
git clone https://github.com/GiftKNdlovu/repo-notes.git
|
|
37
|
+
cd repo-notes
|
|
38
|
+
pip install -e .
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
Scan the current directory:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
repo-notes .
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This creates:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
REPO_NOTES.md
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Scan another project:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
repo-notes /path/to/project
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Force a fresh scan without using the cache:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
repo-notes . --no-cache
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Write to a custom file:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
repo-notes . --output docs/project-notes.md
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Common commands
|
|
74
|
+
|
|
75
|
+
### Generate normal project notes
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
repo-notes .
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Creates `REPO_NOTES.md`.
|
|
82
|
+
|
|
83
|
+
### Generate notes quietly for scripts or CI
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
repo-notes . --quiet
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Routine output is suppressed. Errors still go to stderr.
|
|
90
|
+
|
|
91
|
+
### Generate HTML output
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
repo-notes . --format html
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Creates `REPO_NOTES.html`.
|
|
98
|
+
|
|
99
|
+
### Generate JSON output
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
repo-notes . --format json --output repo-notes.json
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Useful for automation and downstream tools.
|
|
106
|
+
|
|
107
|
+
### Generate AI-agent context
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
repo-notes . --agents
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Creates `AGENTS.md`, a compact summary designed for coding agents.
|
|
114
|
+
|
|
115
|
+
### Generate a starter README
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
repo-notes . --format readme
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Creates:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
rnREADME.md
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`README.md` is treated as hand-written documentation and is not overwritten by default.
|
|
128
|
+
|
|
129
|
+
To intentionally replace `README.md`, use the explicit destructive form:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
repo-notes . --format readme --replace-readme --force
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Generate both notes and a starter README
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
repo-notes . --format both
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Creates:
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
REPO_NOTES.md
|
|
145
|
+
rnREADME.md
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Output formats
|
|
149
|
+
|
|
150
|
+
| Goal | Command | Output |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| Markdown notes | `repo-notes .` | `REPO_NOTES.md` |
|
|
153
|
+
| Starter README | `repo-notes . --format readme` | `rnREADME.md` |
|
|
154
|
+
| Notes + starter README | `repo-notes . --format both` | `REPO_NOTES.md` + `rnREADME.md` |
|
|
155
|
+
| HTML report | `repo-notes . --format html` | `REPO_NOTES.html` |
|
|
156
|
+
| JSON data | `repo-notes . --format json` | `REPO_NOTES.json` |
|
|
157
|
+
| Agent context | `repo-notes . --agents` | `AGENTS.md` |
|
|
158
|
+
|
|
159
|
+
## What repo-notes detects
|
|
160
|
+
|
|
161
|
+
`repo-notes` can include sections for:
|
|
162
|
+
|
|
163
|
+
- project structure
|
|
164
|
+
- languages and line counts
|
|
165
|
+
- dependency files
|
|
166
|
+
- git branch, remotes, contributors, and recent commits
|
|
167
|
+
- architecture hints, import relationships, entry points, coupling, and low-reachability candidates
|
|
168
|
+
- possible secrets and sensitive files
|
|
169
|
+
- TODO, FIXME, HACK, BUG, and similar comments
|
|
170
|
+
- package scripts, Makefile targets, and other build commands
|
|
171
|
+
- environment variables used by the project
|
|
172
|
+
- CI/CD configuration
|
|
173
|
+
- database schemas, migrations, and ORM usage
|
|
174
|
+
- rough type-coverage signals
|
|
175
|
+
- code complexity hotspots
|
|
176
|
+
- duplicate files
|
|
177
|
+
- API endpoints from common frameworks
|
|
178
|
+
|
|
179
|
+
The output is intentionally practical rather than perfect. It gives you a useful first map of a repository, not a full static-analysis platform.
|
|
180
|
+
|
|
181
|
+
## Configuration
|
|
182
|
+
|
|
183
|
+
Generate a starter config:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
repo-notes . --init
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
This creates `.repo-notes.yaml`.
|
|
190
|
+
|
|
191
|
+
Example:
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
exclude_patterns:
|
|
195
|
+
- "*.log"
|
|
196
|
+
- "build/"
|
|
197
|
+
- "dist/"
|
|
198
|
+
|
|
199
|
+
include_hidden: false
|
|
200
|
+
min_file_size: 0
|
|
201
|
+
|
|
202
|
+
security:
|
|
203
|
+
entropy_threshold: 4.5
|
|
204
|
+
exclude_test_fixtures: false
|
|
205
|
+
patterns: []
|
|
206
|
+
|
|
207
|
+
structure:
|
|
208
|
+
max_depth: 3
|
|
209
|
+
show_hidden: false
|
|
210
|
+
|
|
211
|
+
output:
|
|
212
|
+
format: notes
|
|
213
|
+
order:
|
|
214
|
+
- structure
|
|
215
|
+
- project_intelligence
|
|
216
|
+
- stats
|
|
217
|
+
- deps
|
|
218
|
+
- git
|
|
219
|
+
- arch
|
|
220
|
+
- security
|
|
221
|
+
- todos
|
|
222
|
+
- scripts
|
|
223
|
+
- env_vars
|
|
224
|
+
- cicd
|
|
225
|
+
- database
|
|
226
|
+
- type_coverage
|
|
227
|
+
- complexity
|
|
228
|
+
- duplicates
|
|
229
|
+
- api_endpoints
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Use config when you want repeatable output across a team or CI job.
|
|
233
|
+
|
|
234
|
+
## CLI reference
|
|
235
|
+
|
|
236
|
+
```text
|
|
237
|
+
repo-notes [OPTIONS] [PATH]
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
| Option | Meaning |
|
|
241
|
+
|---|---|
|
|
242
|
+
| `PATH` | Directory to scan. Defaults to the current directory. |
|
|
243
|
+
| `-c, --config FILE` | Use a specific config file. |
|
|
244
|
+
| `-o, --output PATH` | Write output to a custom path. |
|
|
245
|
+
| `--max-depth INTEGER` | Control depth of the directory tree section. |
|
|
246
|
+
| `--include-hidden` | Include hidden files and directories. |
|
|
247
|
+
| `--format notes\|readme\|both\|html\|json` | Choose output format. |
|
|
248
|
+
| `--force` | Overwrite existing generated output files. |
|
|
249
|
+
| `-q, --quiet` | Suppress routine output. Useful in CI. |
|
|
250
|
+
| `--no-cache` | Bypass incremental cache and re-scan everything. |
|
|
251
|
+
| `--init` | Create a starter `.repo-notes.yaml`. |
|
|
252
|
+
| `--replace-readme` | Write generated README output to `README.md`. Use carefully. |
|
|
253
|
+
| `--agents` | Generate `AGENTS.md` for coding agents. |
|
|
254
|
+
| `--version` | Show installed version. |
|
|
255
|
+
| `--help` | Show help. |
|
|
256
|
+
|
|
257
|
+
## Notes on safety
|
|
258
|
+
|
|
259
|
+
- `README.md` is preserved by default.
|
|
260
|
+
- Generated starter README output goes to `rnREADME.md`.
|
|
261
|
+
- Existing output files are not silently overwritten unless `--force` is used where required.
|
|
262
|
+
- Security findings mask secret previews.
|
|
263
|
+
- Test-fixture/sample secrets are labelled separately from real findings when detected.
|
|
264
|
+
|
|
265
|
+
## Development
|
|
266
|
+
|
|
267
|
+
For contributors:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
git clone https://github.com/GiftKNdlovu/repo-notes.git
|
|
271
|
+
cd repo-notes
|
|
272
|
+
pip install -e ".[dev]"
|
|
273
|
+
./scripts/check.sh
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Run the CLI locally:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
python -m repo_notes . --no-cache
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## License
|
|
283
|
+
|
|
284
|
+
MIT
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "repo-notes"
|
|
7
|
+
version = "0.3.0"
|
|
8
|
+
description = "Generate useful notes for any code repository from one command"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Gift Ndlovu" },
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"repository",
|
|
17
|
+
"code-analysis",
|
|
18
|
+
"developer-tools",
|
|
19
|
+
"cli",
|
|
20
|
+
"ai-agents",
|
|
21
|
+
"documentation",
|
|
22
|
+
]
|
|
23
|
+
classifiers = [
|
|
24
|
+
"Development Status :: 4 - Beta",
|
|
25
|
+
"Environment :: Console",
|
|
26
|
+
"Intended Audience :: Developers",
|
|
27
|
+
"Programming Language :: Python :: 3",
|
|
28
|
+
"Programming Language :: Python :: 3.10",
|
|
29
|
+
"Programming Language :: Python :: 3.11",
|
|
30
|
+
"Programming Language :: Python :: 3.12",
|
|
31
|
+
"Programming Language :: Python :: 3.13",
|
|
32
|
+
"Topic :: Documentation",
|
|
33
|
+
"Topic :: Software Development",
|
|
34
|
+
"Topic :: Software Development :: Documentation",
|
|
35
|
+
"Topic :: Utilities",
|
|
36
|
+
]
|
|
37
|
+
dependencies = [
|
|
38
|
+
"click>=8.0",
|
|
39
|
+
"pyyaml>=6.0",
|
|
40
|
+
"pathspec>=0.11",
|
|
41
|
+
"rich>=13.0",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[project.optional-dependencies]
|
|
45
|
+
dev = ["pytest>=7.0", "pytest-cov>=4.0", "ruff>=0.1.0"]
|
|
46
|
+
|
|
47
|
+
[project.scripts]
|
|
48
|
+
repo-notes = "repo_notes.__main__:main"
|
|
49
|
+
|
|
50
|
+
[project.urls]
|
|
51
|
+
Homepage = "https://github.com/GiftKNdlovu/repo-notes"
|
|
52
|
+
Repository = "https://github.com/GiftKNdlovu/repo-notes"
|
|
53
|
+
Issues = "https://github.com/GiftKNdlovu/repo-notes/issues"
|
|
54
|
+
|
|
55
|
+
[tool.setuptools.packages.find]
|
|
56
|
+
where = ["src"]
|
|
57
|
+
|
|
58
|
+
[tool.pytest.ini_options]
|
|
59
|
+
testpaths = ["tests"]
|
|
60
|
+
pythonpath = ["src"]
|
|
61
|
+
|
|
62
|
+
[tool.ruff]
|
|
63
|
+
line-length = 100
|
|
64
|
+
target-version = "py310"
|