dz-devkit-cli 0.1.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.
- dz_devkit_cli-0.1.0/LICENSE +21 -0
- dz_devkit_cli-0.1.0/PKG-INFO +342 -0
- dz_devkit_cli-0.1.0/README.md +322 -0
- dz_devkit_cli-0.1.0/devkit/__init__.py +8 -0
- dz_devkit_cli-0.1.0/devkit/cli.py +23 -0
- dz_devkit_cli-0.1.0/devkit/commands/__init__.py +3 -0
- dz_devkit_cli-0.1.0/devkit/commands/git_stats.py +50 -0
- dz_devkit_cli-0.1.0/devkit/commands/organize.py +52 -0
- dz_devkit_cli-0.1.0/devkit/commands/scaffold.py +64 -0
- dz_devkit_cli-0.1.0/dz_devkit_cli.egg-info/PKG-INFO +342 -0
- dz_devkit_cli-0.1.0/dz_devkit_cli.egg-info/SOURCES.txt +16 -0
- dz_devkit_cli-0.1.0/dz_devkit_cli.egg-info/dependency_links.txt +1 -0
- dz_devkit_cli-0.1.0/dz_devkit_cli.egg-info/entry_points.txt +2 -0
- dz_devkit_cli-0.1.0/dz_devkit_cli.egg-info/requires.txt +2 -0
- dz_devkit_cli-0.1.0/dz_devkit_cli.egg-info/top_level.txt +1 -0
- dz_devkit_cli-0.1.0/pyproject.toml +34 -0
- dz_devkit_cli-0.1.0/setup.cfg +4 -0
- dz_devkit_cli-0.1.0/tests/test_cli.py +21 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Oussama Boudinar lionweb01@gmail.com
|
|
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,342 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dz-devkit-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A modern CLI toolkit for developers: organize files, scaffold projects, inspect git repos.
|
|
5
|
+
Author-email: Oussama Boudinar <lionweb01@gmail.com>
|
|
6
|
+
Maintainer-email: Oussama Boudinar <lionweb01@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/dzopensource-lab/devkit-cli
|
|
9
|
+
Project-URL: Repository, https://github.com/dzopensource-lab/devkit-cli
|
|
10
|
+
Project-URL: Issues, https://github.com/dzopensource-lab/devkit-cli/issues
|
|
11
|
+
Keywords: cli,developer-tools,productivity,python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: click>=8.1.0
|
|
18
|
+
Requires-Dist: rich>=13.0.0
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
markdown
|
|
22
|
+
|
|
23
|
+
# π οΈ DevKit CLI
|
|
24
|
+
|
|
25
|
+
**A modern CLI toolkit for developers β organize files, scaffold projects, and inspect git repositories. All in one command.**
|
|
26
|
+
|
|
27
|
+
[](https://github.com/dzopensource-lab/devkit-cli/actions/workflows/test.yml)
|
|
28
|
+
[](https://www.python.org/)
|
|
29
|
+
[](LICENSE)
|
|
30
|
+
|
|
31
|
+
> Stop wasting time on repetitive tasks. `devkit` handles the boring stuff so you can focus on writing code.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## π¬ Quick Start (60 seconds)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# 1. Clone and install
|
|
39
|
+
git clone https://github.com/dzopensource-lab/devkit-cli.git
|
|
40
|
+
cd devkit-cli
|
|
41
|
+
pip install -e .
|
|
42
|
+
|
|
43
|
+
# 2. Try it immediately
|
|
44
|
+
devkit organize ~/Downloads --dry-run
|
|
45
|
+
devkit scaffold my-new-project --type web
|
|
46
|
+
devkit git-stats
|
|
47
|
+
|
|
48
|
+
That's it. You're ready to go. π
|
|
49
|
+
π What is DevKit?
|
|
50
|
+
|
|
51
|
+
devkit is a command-line toolkit that solves three daily problems every developer faces:
|
|
52
|
+
Problem Solution Command
|
|
53
|
+
ποΈ "My Downloads folder is a mess" Auto-sort files into categories devkit organize
|
|
54
|
+
π§± "I waste 10 minutes setting up every new project" Generate project structure instantly devkit scaffold
|
|
55
|
+
π "I forget my repo's commit count and current branch" See git stats in one command devkit git-stats
|
|
56
|
+
β¨ Features
|
|
57
|
+
|
|
58
|
+
π Smart file organizer β Sorts files into Images/, Documents/, Code/, Audio/, Videos/, Archives/ automatically
|
|
59
|
+
|
|
60
|
+
π§± Project scaffolder β Creates ready-to-use templates for web and python-cli projects
|
|
61
|
+
|
|
62
|
+
π Git inspector β Quick overview: branch, commit count, last author, last commit message
|
|
63
|
+
|
|
64
|
+
π¨ Beautiful terminal output β Colors, tables, and clear feedback powered by rich
|
|
65
|
+
|
|
66
|
+
π‘οΈ Safe by default β --dry-run mode lets you preview changes before executing
|
|
67
|
+
|
|
68
|
+
π§ͺ Tested β Fully covered by pytest and GitHub Actions CI
|
|
69
|
+
|
|
70
|
+
β‘ Fast β No dependencies beyond click and rich
|
|
71
|
+
|
|
72
|
+
π Installation
|
|
73
|
+
Option 1: Install from source (recommended for now)
|
|
74
|
+
bash
|
|
75
|
+
|
|
76
|
+
git clone https://github.com/dzopensource-lab/devkit-cli.git
|
|
77
|
+
cd devkit-cli
|
|
78
|
+
pip install -e .
|
|
79
|
+
|
|
80
|
+
Option 2: Install from PyPI (coming soon)
|
|
81
|
+
bash
|
|
82
|
+
|
|
83
|
+
pip install devkit-cli
|
|
84
|
+
|
|
85
|
+
Verify installation
|
|
86
|
+
bash
|
|
87
|
+
|
|
88
|
+
devkit --version
|
|
89
|
+
# devkit-cli, version 0.1.0
|
|
90
|
+
|
|
91
|
+
devkit --help
|
|
92
|
+
# Usage: devkit [OPTIONS] COMMAND [ARGS]...
|
|
93
|
+
|
|
94
|
+
π Commands Reference
|
|
95
|
+
π devkit organize β Sort files into folders
|
|
96
|
+
|
|
97
|
+
Syntax:
|
|
98
|
+
bash
|
|
99
|
+
|
|
100
|
+
devkit organize <PATH> [--dry-run]
|
|
101
|
+
|
|
102
|
+
What it does:
|
|
103
|
+
Scans the folder <PATH> and moves files into categorized subfolders based on their extension.
|
|
104
|
+
|
|
105
|
+
Categories:
|
|
106
|
+
Folder Extensions
|
|
107
|
+
Images/ .jpg, .jpeg, .png, .gif, .svg, .webp, .bmp
|
|
108
|
+
Documents/ .pdf, .doc, .docx, .txt, .md, .odt, .xlsx, .pptx
|
|
109
|
+
Videos/ .mp4, .mkv, .avi, .mov, .webm
|
|
110
|
+
Audio/ .mp3, .wav, .flac, .ogg, .m4a
|
|
111
|
+
Archives/ .zip, .rar, .7z, .tar, .gz
|
|
112
|
+
Code/ .py, .js, .ts, .html, .css, .json, .yml, .yaml, .sh
|
|
113
|
+
Other/ Everything else
|
|
114
|
+
|
|
115
|
+
Example:
|
|
116
|
+
|
|
117
|
+
Before:
|
|
118
|
+
text
|
|
119
|
+
|
|
120
|
+
Downloads/
|
|
121
|
+
βββ photo.jpg
|
|
122
|
+
βββ report.pdf
|
|
123
|
+
βββ song.mp3
|
|
124
|
+
βββ project.zip
|
|
125
|
+
βββ script.py
|
|
126
|
+
|
|
127
|
+
Run:
|
|
128
|
+
bash
|
|
129
|
+
|
|
130
|
+
devkit organize ~/Downloads
|
|
131
|
+
|
|
132
|
+
After:
|
|
133
|
+
text
|
|
134
|
+
|
|
135
|
+
Downloads/
|
|
136
|
+
βββ Images/
|
|
137
|
+
β βββ photo.jpg
|
|
138
|
+
βββ Documents/
|
|
139
|
+
β βββ report.pdf
|
|
140
|
+
βββ Audio/
|
|
141
|
+
β βββ song.mp3
|
|
142
|
+
βββ Archives/
|
|
143
|
+
β βββ project.zip
|
|
144
|
+
βββ Code/
|
|
145
|
+
βββ script.py
|
|
146
|
+
|
|
147
|
+
Safe preview:
|
|
148
|
+
bash
|
|
149
|
+
|
|
150
|
+
devkit organize ~/Downloads --dry-run
|
|
151
|
+
|
|
152
|
+
Shows what would happen without moving anything. Always use this first!
|
|
153
|
+
π§± devkit scaffold β Create a new project
|
|
154
|
+
|
|
155
|
+
Syntax:
|
|
156
|
+
bash
|
|
157
|
+
|
|
158
|
+
devkit scaffold <NAME> [--type web|python-cli]
|
|
159
|
+
|
|
160
|
+
What it does:
|
|
161
|
+
Creates a new folder <NAME> with a ready-to-use starter template.
|
|
162
|
+
|
|
163
|
+
Available templates:
|
|
164
|
+
Template 1: web (default)
|
|
165
|
+
|
|
166
|
+
Creates:
|
|
167
|
+
|
|
168
|
+
index.html β Starter HTML5 page
|
|
169
|
+
|
|
170
|
+
style.css β Basic styles
|
|
171
|
+
|
|
172
|
+
script.js β Starter JS file
|
|
173
|
+
|
|
174
|
+
bash
|
|
175
|
+
|
|
176
|
+
devkit scaffold my-website
|
|
177
|
+
|
|
178
|
+
Output:
|
|
179
|
+
text
|
|
180
|
+
|
|
181
|
+
my-website/
|
|
182
|
+
βββ index.html
|
|
183
|
+
βββ style.css
|
|
184
|
+
βββ script.js
|
|
185
|
+
|
|
186
|
+
Template 2: python-cli
|
|
187
|
+
|
|
188
|
+
Creates:
|
|
189
|
+
|
|
190
|
+
main.py β CLI starter using click
|
|
191
|
+
|
|
192
|
+
requirements.txt β Dependencies
|
|
193
|
+
|
|
194
|
+
bash
|
|
195
|
+
|
|
196
|
+
devkit scaffold my-tool --type python-cli
|
|
197
|
+
|
|
198
|
+
Output:
|
|
199
|
+
text
|
|
200
|
+
|
|
201
|
+
my-tool/
|
|
202
|
+
βββ main.py
|
|
203
|
+
βββ requirements.txt
|
|
204
|
+
|
|
205
|
+
π devkit git-stats β Inspect a git repository
|
|
206
|
+
|
|
207
|
+
Syntax:
|
|
208
|
+
bash
|
|
209
|
+
|
|
210
|
+
devkit git-stats [PATH]
|
|
211
|
+
|
|
212
|
+
What it does:
|
|
213
|
+
Displays key statistics about a git repository in a formatted table.
|
|
214
|
+
|
|
215
|
+
Example:
|
|
216
|
+
bash
|
|
217
|
+
|
|
218
|
+
devkit git-stats
|
|
219
|
+
|
|
220
|
+
Output:
|
|
221
|
+
text
|
|
222
|
+
|
|
223
|
+
Git Stats β devkit-cli
|
|
224
|
+
βββββββββββββββββ³ββββββββββββββββββββββββββββββ
|
|
225
|
+
β Metric β Value β
|
|
226
|
+
β‘ββββββββββββββββββββββββββββββββββββββββββββββ©
|
|
227
|
+
β Branch β main β
|
|
228
|
+
β Total commits β 5 β
|
|
229
|
+
β Last commit β feat: add clean command β
|
|
230
|
+
β Last author β Oussama Boudinar β
|
|
231
|
+
βββββββββββββββββ΄βββββββββββββββββββββββββββββββ
|
|
232
|
+
|
|
233
|
+
On another repo:
|
|
234
|
+
bash
|
|
235
|
+
|
|
236
|
+
devkit git-stats /path/to/any/repo
|
|
237
|
+
|
|
238
|
+
π‘ Use Cases
|
|
239
|
+
Use Case 1: Monthly Downloads cleanup
|
|
240
|
+
bash
|
|
241
|
+
|
|
242
|
+
devkit organize ~/Downloads
|
|
243
|
+
|
|
244
|
+
Use Case 2: Start a new web project instantly
|
|
245
|
+
bash
|
|
246
|
+
|
|
247
|
+
devkit scaffold my-landing-page
|
|
248
|
+
cd my-landing-page
|
|
249
|
+
# Open in browser, start coding!
|
|
250
|
+
|
|
251
|
+
Use Case 3: Quick repo status before a standup meeting
|
|
252
|
+
bash
|
|
253
|
+
|
|
254
|
+
devkit git-stats
|
|
255
|
+
|
|
256
|
+
ποΈ Project Structure
|
|
257
|
+
text
|
|
258
|
+
|
|
259
|
+
devkit-cli/
|
|
260
|
+
βββ devkit/
|
|
261
|
+
β βββ __init__.py # Package metadata
|
|
262
|
+
β βββ cli.py # Main entry point (Click group)
|
|
263
|
+
β βββ commands/
|
|
264
|
+
β βββ organize.py # File organizer command
|
|
265
|
+
β βββ scaffold.py # Project scaffolder command
|
|
266
|
+
β βββ git_stats.py # Git stats command
|
|
267
|
+
βββ tests/
|
|
268
|
+
β βββ test_cli.py # Basic tests
|
|
269
|
+
βββ .github/
|
|
270
|
+
β βββ workflows/
|
|
271
|
+
β βββ test.yml # CI pipeline
|
|
272
|
+
βββ docs/
|
|
273
|
+
β βββ quickstart.md # 60-second guide
|
|
274
|
+
β βββ commands.md # Full command reference
|
|
275
|
+
β βββ examples.md # Real-world examples
|
|
276
|
+
βββ pyproject.toml # Package config
|
|
277
|
+
βββ README.md # This file
|
|
278
|
+
βββ CONTRIBUTING.md # How to contribute
|
|
279
|
+
βββ CHANGELOG.md # Version history
|
|
280
|
+
βββ LICENSE # MIT License
|
|
281
|
+
|
|
282
|
+
π‘οΈ Safety Notes
|
|
283
|
+
β οΈ Warning Reason
|
|
284
|
+
Always run --dry-run first on organize To preview before moving files
|
|
285
|
+
Don't organize system folders (C:\Windows, Program Files) May require permissions and break the system
|
|
286
|
+
Backup important folders before organizing Though safe, always be careful
|
|
287
|
+
π€ Contributing
|
|
288
|
+
|
|
289
|
+
See CONTRIBUTING.md for guidelines.
|
|
290
|
+
|
|
291
|
+
Quick version:
|
|
292
|
+
|
|
293
|
+
Fork the repo
|
|
294
|
+
|
|
295
|
+
Create a branch: git checkout -b feature/my-feature
|
|
296
|
+
|
|
297
|
+
Make changes + add tests
|
|
298
|
+
|
|
299
|
+
Push and open a Pull Request
|
|
300
|
+
|
|
301
|
+
π§ͺ Testing
|
|
302
|
+
bash
|
|
303
|
+
|
|
304
|
+
pytest
|
|
305
|
+
pytest -v
|
|
306
|
+
|
|
307
|
+
πΊοΈ Roadmap
|
|
308
|
+
|
|
309
|
+
β
|
|
310
|
+
|
|
311
|
+
organize β Sort files into categories
|
|
312
|
+
β
|
|
313
|
+
|
|
314
|
+
scaffold β Create project templates
|
|
315
|
+
β
|
|
316
|
+
|
|
317
|
+
git-stats β Show repository statistics
|
|
318
|
+
β
|
|
319
|
+
|
|
320
|
+
GitHub Actions CI
|
|
321
|
+
β
|
|
322
|
+
|
|
323
|
+
clean command β Remove node_modules, __pycache__, .venv
|
|
324
|
+
β
|
|
325
|
+
|
|
326
|
+
organize --recursive β Support subfolders
|
|
327
|
+
β
|
|
328
|
+
|
|
329
|
+
Custom categories from devkit.toml
|
|
330
|
+
β
|
|
331
|
+
|
|
332
|
+
More scaffold templates (react, fastapi, vue)
|
|
333
|
+
β
|
|
334
|
+
|
|
335
|
+
Publish to PyPI
|
|
336
|
+
|
|
337
|
+
π License
|
|
338
|
+
|
|
339
|
+
MIT Β© 2026 Oussama Boudinar lionweb01@gmail.com β dzopensource-lab
|
|
340
|
+
β Show your support
|
|
341
|
+
|
|
342
|
+
If devkit helped you, please give it a β on GitHub β it means a lot!
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
markdown
|
|
2
|
+
|
|
3
|
+
# π οΈ DevKit CLI
|
|
4
|
+
|
|
5
|
+
**A modern CLI toolkit for developers β organize files, scaffold projects, and inspect git repositories. All in one command.**
|
|
6
|
+
|
|
7
|
+
[](https://github.com/dzopensource-lab/devkit-cli/actions/workflows/test.yml)
|
|
8
|
+
[](https://www.python.org/)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
|
|
11
|
+
> Stop wasting time on repetitive tasks. `devkit` handles the boring stuff so you can focus on writing code.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## π¬ Quick Start (60 seconds)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# 1. Clone and install
|
|
19
|
+
git clone https://github.com/dzopensource-lab/devkit-cli.git
|
|
20
|
+
cd devkit-cli
|
|
21
|
+
pip install -e .
|
|
22
|
+
|
|
23
|
+
# 2. Try it immediately
|
|
24
|
+
devkit organize ~/Downloads --dry-run
|
|
25
|
+
devkit scaffold my-new-project --type web
|
|
26
|
+
devkit git-stats
|
|
27
|
+
|
|
28
|
+
That's it. You're ready to go. π
|
|
29
|
+
π What is DevKit?
|
|
30
|
+
|
|
31
|
+
devkit is a command-line toolkit that solves three daily problems every developer faces:
|
|
32
|
+
Problem Solution Command
|
|
33
|
+
ποΈ "My Downloads folder is a mess" Auto-sort files into categories devkit organize
|
|
34
|
+
π§± "I waste 10 minutes setting up every new project" Generate project structure instantly devkit scaffold
|
|
35
|
+
π "I forget my repo's commit count and current branch" See git stats in one command devkit git-stats
|
|
36
|
+
β¨ Features
|
|
37
|
+
|
|
38
|
+
π Smart file organizer β Sorts files into Images/, Documents/, Code/, Audio/, Videos/, Archives/ automatically
|
|
39
|
+
|
|
40
|
+
π§± Project scaffolder β Creates ready-to-use templates for web and python-cli projects
|
|
41
|
+
|
|
42
|
+
π Git inspector β Quick overview: branch, commit count, last author, last commit message
|
|
43
|
+
|
|
44
|
+
π¨ Beautiful terminal output β Colors, tables, and clear feedback powered by rich
|
|
45
|
+
|
|
46
|
+
π‘οΈ Safe by default β --dry-run mode lets you preview changes before executing
|
|
47
|
+
|
|
48
|
+
π§ͺ Tested β Fully covered by pytest and GitHub Actions CI
|
|
49
|
+
|
|
50
|
+
β‘ Fast β No dependencies beyond click and rich
|
|
51
|
+
|
|
52
|
+
π Installation
|
|
53
|
+
Option 1: Install from source (recommended for now)
|
|
54
|
+
bash
|
|
55
|
+
|
|
56
|
+
git clone https://github.com/dzopensource-lab/devkit-cli.git
|
|
57
|
+
cd devkit-cli
|
|
58
|
+
pip install -e .
|
|
59
|
+
|
|
60
|
+
Option 2: Install from PyPI (coming soon)
|
|
61
|
+
bash
|
|
62
|
+
|
|
63
|
+
pip install devkit-cli
|
|
64
|
+
|
|
65
|
+
Verify installation
|
|
66
|
+
bash
|
|
67
|
+
|
|
68
|
+
devkit --version
|
|
69
|
+
# devkit-cli, version 0.1.0
|
|
70
|
+
|
|
71
|
+
devkit --help
|
|
72
|
+
# Usage: devkit [OPTIONS] COMMAND [ARGS]...
|
|
73
|
+
|
|
74
|
+
π Commands Reference
|
|
75
|
+
π devkit organize β Sort files into folders
|
|
76
|
+
|
|
77
|
+
Syntax:
|
|
78
|
+
bash
|
|
79
|
+
|
|
80
|
+
devkit organize <PATH> [--dry-run]
|
|
81
|
+
|
|
82
|
+
What it does:
|
|
83
|
+
Scans the folder <PATH> and moves files into categorized subfolders based on their extension.
|
|
84
|
+
|
|
85
|
+
Categories:
|
|
86
|
+
Folder Extensions
|
|
87
|
+
Images/ .jpg, .jpeg, .png, .gif, .svg, .webp, .bmp
|
|
88
|
+
Documents/ .pdf, .doc, .docx, .txt, .md, .odt, .xlsx, .pptx
|
|
89
|
+
Videos/ .mp4, .mkv, .avi, .mov, .webm
|
|
90
|
+
Audio/ .mp3, .wav, .flac, .ogg, .m4a
|
|
91
|
+
Archives/ .zip, .rar, .7z, .tar, .gz
|
|
92
|
+
Code/ .py, .js, .ts, .html, .css, .json, .yml, .yaml, .sh
|
|
93
|
+
Other/ Everything else
|
|
94
|
+
|
|
95
|
+
Example:
|
|
96
|
+
|
|
97
|
+
Before:
|
|
98
|
+
text
|
|
99
|
+
|
|
100
|
+
Downloads/
|
|
101
|
+
βββ photo.jpg
|
|
102
|
+
βββ report.pdf
|
|
103
|
+
βββ song.mp3
|
|
104
|
+
βββ project.zip
|
|
105
|
+
βββ script.py
|
|
106
|
+
|
|
107
|
+
Run:
|
|
108
|
+
bash
|
|
109
|
+
|
|
110
|
+
devkit organize ~/Downloads
|
|
111
|
+
|
|
112
|
+
After:
|
|
113
|
+
text
|
|
114
|
+
|
|
115
|
+
Downloads/
|
|
116
|
+
βββ Images/
|
|
117
|
+
β βββ photo.jpg
|
|
118
|
+
βββ Documents/
|
|
119
|
+
β βββ report.pdf
|
|
120
|
+
βββ Audio/
|
|
121
|
+
β βββ song.mp3
|
|
122
|
+
βββ Archives/
|
|
123
|
+
β βββ project.zip
|
|
124
|
+
βββ Code/
|
|
125
|
+
βββ script.py
|
|
126
|
+
|
|
127
|
+
Safe preview:
|
|
128
|
+
bash
|
|
129
|
+
|
|
130
|
+
devkit organize ~/Downloads --dry-run
|
|
131
|
+
|
|
132
|
+
Shows what would happen without moving anything. Always use this first!
|
|
133
|
+
π§± devkit scaffold β Create a new project
|
|
134
|
+
|
|
135
|
+
Syntax:
|
|
136
|
+
bash
|
|
137
|
+
|
|
138
|
+
devkit scaffold <NAME> [--type web|python-cli]
|
|
139
|
+
|
|
140
|
+
What it does:
|
|
141
|
+
Creates a new folder <NAME> with a ready-to-use starter template.
|
|
142
|
+
|
|
143
|
+
Available templates:
|
|
144
|
+
Template 1: web (default)
|
|
145
|
+
|
|
146
|
+
Creates:
|
|
147
|
+
|
|
148
|
+
index.html β Starter HTML5 page
|
|
149
|
+
|
|
150
|
+
style.css β Basic styles
|
|
151
|
+
|
|
152
|
+
script.js β Starter JS file
|
|
153
|
+
|
|
154
|
+
bash
|
|
155
|
+
|
|
156
|
+
devkit scaffold my-website
|
|
157
|
+
|
|
158
|
+
Output:
|
|
159
|
+
text
|
|
160
|
+
|
|
161
|
+
my-website/
|
|
162
|
+
βββ index.html
|
|
163
|
+
βββ style.css
|
|
164
|
+
βββ script.js
|
|
165
|
+
|
|
166
|
+
Template 2: python-cli
|
|
167
|
+
|
|
168
|
+
Creates:
|
|
169
|
+
|
|
170
|
+
main.py β CLI starter using click
|
|
171
|
+
|
|
172
|
+
requirements.txt β Dependencies
|
|
173
|
+
|
|
174
|
+
bash
|
|
175
|
+
|
|
176
|
+
devkit scaffold my-tool --type python-cli
|
|
177
|
+
|
|
178
|
+
Output:
|
|
179
|
+
text
|
|
180
|
+
|
|
181
|
+
my-tool/
|
|
182
|
+
βββ main.py
|
|
183
|
+
βββ requirements.txt
|
|
184
|
+
|
|
185
|
+
π devkit git-stats β Inspect a git repository
|
|
186
|
+
|
|
187
|
+
Syntax:
|
|
188
|
+
bash
|
|
189
|
+
|
|
190
|
+
devkit git-stats [PATH]
|
|
191
|
+
|
|
192
|
+
What it does:
|
|
193
|
+
Displays key statistics about a git repository in a formatted table.
|
|
194
|
+
|
|
195
|
+
Example:
|
|
196
|
+
bash
|
|
197
|
+
|
|
198
|
+
devkit git-stats
|
|
199
|
+
|
|
200
|
+
Output:
|
|
201
|
+
text
|
|
202
|
+
|
|
203
|
+
Git Stats β devkit-cli
|
|
204
|
+
βββββββββββββββββ³ββββββββββββββββββββββββββββββ
|
|
205
|
+
β Metric β Value β
|
|
206
|
+
β‘ββββββββββββββββββββββββββββββββββββββββββββββ©
|
|
207
|
+
β Branch β main β
|
|
208
|
+
β Total commits β 5 β
|
|
209
|
+
β Last commit β feat: add clean command β
|
|
210
|
+
β Last author β Oussama Boudinar β
|
|
211
|
+
βββββββββββββββββ΄βββββββββββββββββββββββββββββββ
|
|
212
|
+
|
|
213
|
+
On another repo:
|
|
214
|
+
bash
|
|
215
|
+
|
|
216
|
+
devkit git-stats /path/to/any/repo
|
|
217
|
+
|
|
218
|
+
π‘ Use Cases
|
|
219
|
+
Use Case 1: Monthly Downloads cleanup
|
|
220
|
+
bash
|
|
221
|
+
|
|
222
|
+
devkit organize ~/Downloads
|
|
223
|
+
|
|
224
|
+
Use Case 2: Start a new web project instantly
|
|
225
|
+
bash
|
|
226
|
+
|
|
227
|
+
devkit scaffold my-landing-page
|
|
228
|
+
cd my-landing-page
|
|
229
|
+
# Open in browser, start coding!
|
|
230
|
+
|
|
231
|
+
Use Case 3: Quick repo status before a standup meeting
|
|
232
|
+
bash
|
|
233
|
+
|
|
234
|
+
devkit git-stats
|
|
235
|
+
|
|
236
|
+
ποΈ Project Structure
|
|
237
|
+
text
|
|
238
|
+
|
|
239
|
+
devkit-cli/
|
|
240
|
+
βββ devkit/
|
|
241
|
+
β βββ __init__.py # Package metadata
|
|
242
|
+
β βββ cli.py # Main entry point (Click group)
|
|
243
|
+
β βββ commands/
|
|
244
|
+
β βββ organize.py # File organizer command
|
|
245
|
+
β βββ scaffold.py # Project scaffolder command
|
|
246
|
+
β βββ git_stats.py # Git stats command
|
|
247
|
+
βββ tests/
|
|
248
|
+
β βββ test_cli.py # Basic tests
|
|
249
|
+
βββ .github/
|
|
250
|
+
β βββ workflows/
|
|
251
|
+
β βββ test.yml # CI pipeline
|
|
252
|
+
βββ docs/
|
|
253
|
+
β βββ quickstart.md # 60-second guide
|
|
254
|
+
β βββ commands.md # Full command reference
|
|
255
|
+
β βββ examples.md # Real-world examples
|
|
256
|
+
βββ pyproject.toml # Package config
|
|
257
|
+
βββ README.md # This file
|
|
258
|
+
βββ CONTRIBUTING.md # How to contribute
|
|
259
|
+
βββ CHANGELOG.md # Version history
|
|
260
|
+
βββ LICENSE # MIT License
|
|
261
|
+
|
|
262
|
+
π‘οΈ Safety Notes
|
|
263
|
+
β οΈ Warning Reason
|
|
264
|
+
Always run --dry-run first on organize To preview before moving files
|
|
265
|
+
Don't organize system folders (C:\Windows, Program Files) May require permissions and break the system
|
|
266
|
+
Backup important folders before organizing Though safe, always be careful
|
|
267
|
+
π€ Contributing
|
|
268
|
+
|
|
269
|
+
See CONTRIBUTING.md for guidelines.
|
|
270
|
+
|
|
271
|
+
Quick version:
|
|
272
|
+
|
|
273
|
+
Fork the repo
|
|
274
|
+
|
|
275
|
+
Create a branch: git checkout -b feature/my-feature
|
|
276
|
+
|
|
277
|
+
Make changes + add tests
|
|
278
|
+
|
|
279
|
+
Push and open a Pull Request
|
|
280
|
+
|
|
281
|
+
π§ͺ Testing
|
|
282
|
+
bash
|
|
283
|
+
|
|
284
|
+
pytest
|
|
285
|
+
pytest -v
|
|
286
|
+
|
|
287
|
+
πΊοΈ Roadmap
|
|
288
|
+
|
|
289
|
+
β
|
|
290
|
+
|
|
291
|
+
organize β Sort files into categories
|
|
292
|
+
β
|
|
293
|
+
|
|
294
|
+
scaffold β Create project templates
|
|
295
|
+
β
|
|
296
|
+
|
|
297
|
+
git-stats β Show repository statistics
|
|
298
|
+
β
|
|
299
|
+
|
|
300
|
+
GitHub Actions CI
|
|
301
|
+
β
|
|
302
|
+
|
|
303
|
+
clean command β Remove node_modules, __pycache__, .venv
|
|
304
|
+
β
|
|
305
|
+
|
|
306
|
+
organize --recursive β Support subfolders
|
|
307
|
+
β
|
|
308
|
+
|
|
309
|
+
Custom categories from devkit.toml
|
|
310
|
+
β
|
|
311
|
+
|
|
312
|
+
More scaffold templates (react, fastapi, vue)
|
|
313
|
+
β
|
|
314
|
+
|
|
315
|
+
Publish to PyPI
|
|
316
|
+
|
|
317
|
+
π License
|
|
318
|
+
|
|
319
|
+
MIT Β© 2026 Oussama Boudinar lionweb01@gmail.com β dzopensource-lab
|
|
320
|
+
β Show your support
|
|
321
|
+
|
|
322
|
+
If devkit helped you, please give it a β on GitHub β it means a lot!
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Copyright (c) 2026 Oussama Boudinar <lionweb01@gmail.com>
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
"""DevKit β a modern CLI toolkit for developers."""
|
|
4
|
+
|
|
5
|
+
__version__ = "0.1.0"
|
|
6
|
+
__author__ = "Oussama Boudinar"
|
|
7
|
+
__email__ = "lionweb01@gmail.com"
|
|
8
|
+
__license__ = "MIT"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Copyright (c) 2026 Oussama Boudinar <lionweb01@gmail.com>
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
"""Entry point for the DevKit CLI."""
|
|
4
|
+
|
|
5
|
+
import click
|
|
6
|
+
|
|
7
|
+
from devkit.commands import git_stats, organize, scaffold
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@click.group()
|
|
11
|
+
@click.version_option(package_name="devkit-cli")
|
|
12
|
+
def main() -> None:
|
|
13
|
+
"""DevKit β a modern CLI toolkit for developers."""
|
|
14
|
+
pass
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
main.add_command(organize.organize)
|
|
18
|
+
main.add_command(scaffold.scaffold)
|
|
19
|
+
main.add_command(git_stats.git_stats)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
if __name__ == "__main__":
|
|
23
|
+
main()
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Copyright (c) 2026 Oussama Boudinar <lionweb01@gmail.com>
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
"""Show quick statistics for a git repository."""
|
|
4
|
+
|
|
5
|
+
import subprocess
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
import click
|
|
9
|
+
from rich.console import Console
|
|
10
|
+
from rich.table import Table
|
|
11
|
+
|
|
12
|
+
console = Console()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _git(path: Path, *args: str) -> str:
|
|
16
|
+
return subprocess.check_output(
|
|
17
|
+
["git", "-C", str(path), *args], text=True
|
|
18
|
+
).strip()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@click.command()
|
|
22
|
+
@click.argument(
|
|
23
|
+
"path",
|
|
24
|
+
type=click.Path(exists=True, file_okay=False, path_type=Path),
|
|
25
|
+
default=".",
|
|
26
|
+
)
|
|
27
|
+
def git_stats(path: Path) -> None:
|
|
28
|
+
"""Show git statistics for the repository in PATH."""
|
|
29
|
+
if not (path / ".git").exists():
|
|
30
|
+
console.print(f"[red]β[/] No git repository found in {path}")
|
|
31
|
+
raise SystemExit(1)
|
|
32
|
+
|
|
33
|
+
try:
|
|
34
|
+
branch = _git(path, "rev-parse", "--abbrev-ref", "HEAD")
|
|
35
|
+
commits = _git(path, "rev-list", "--count", "HEAD")
|
|
36
|
+
last_commit = _git(path, "log", "-1", "--pretty=%s")
|
|
37
|
+
author = _git(path, "log", "-1", "--pretty=%an")
|
|
38
|
+
except subprocess.CalledProcessError:
|
|
39
|
+
console.print("[red]β[/] Failed to read git history.")
|
|
40
|
+
raise SystemExit(1)
|
|
41
|
+
|
|
42
|
+
table = Table(title=f"Git Stats β {path.resolve().name}")
|
|
43
|
+
table.add_column("Metric", style="cyan", no_wrap=True)
|
|
44
|
+
table.add_column("Value", style="green")
|
|
45
|
+
table.add_row("Branch", branch)
|
|
46
|
+
table.add_row("Total commits", commits)
|
|
47
|
+
table.add_row("Last commit", last_commit)
|
|
48
|
+
table.add_row("Last author", author)
|
|
49
|
+
|
|
50
|
+
console.print(table)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Copyright (c) 2026 Oussama Boudinar <lionweb01@gmail.com>
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
"""Organize files in a directory into category folders."""
|
|
4
|
+
|
|
5
|
+
import shutil
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
import click
|
|
9
|
+
from rich.console import Console
|
|
10
|
+
|
|
11
|
+
console = Console()
|
|
12
|
+
|
|
13
|
+
CATEGORIES: dict[str, list[str]] = {
|
|
14
|
+
"Images": [".jpg", ".jpeg", ".png", ".gif", ".svg", ".webp", ".bmp"],
|
|
15
|
+
"Documents": [".pdf", ".doc", ".docx", ".txt", ".md", ".odt", ".xlsx", ".pptx"],
|
|
16
|
+
"Videos": [".mp4", ".mkv", ".avi", ".mov", ".webm"],
|
|
17
|
+
"Audio": [".mp3", ".wav", ".flac", ".ogg", ".m4a"],
|
|
18
|
+
"Archives": [".zip", ".rar", ".7z", ".tar", ".gz"],
|
|
19
|
+
"Code": [".py", ".js", ".ts", ".html", ".css", ".json", ".yml", ".yaml", ".sh"],
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@click.command()
|
|
24
|
+
@click.argument("path", type=click.Path(exists=True, file_okay=False, path_type=Path))
|
|
25
|
+
@click.option("--dry-run", is_flag=True, help="Preview changes without moving files.")
|
|
26
|
+
def organize(path: Path, dry_run: bool) -> None:
|
|
27
|
+
"""Organize files in PATH into category folders."""
|
|
28
|
+
console.print(f"[bold cyan]Organizing:[/] {path}")
|
|
29
|
+
if dry_run:
|
|
30
|
+
console.print("[yellow]Dry-run mode β no files will be moved.[/]")
|
|
31
|
+
|
|
32
|
+
moved = 0
|
|
33
|
+
for file in sorted(path.iterdir()):
|
|
34
|
+
if not file.is_file():
|
|
35
|
+
continue
|
|
36
|
+
|
|
37
|
+
category = next(
|
|
38
|
+
(cat for cat, exts in CATEGORIES.items() if file.suffix.lower() in exts),
|
|
39
|
+
"Other",
|
|
40
|
+
)
|
|
41
|
+
target_dir = path / category
|
|
42
|
+
|
|
43
|
+
if dry_run:
|
|
44
|
+
console.print(f" [dim]β[/] {file.name} β {category}/")
|
|
45
|
+
else:
|
|
46
|
+
target_dir.mkdir(exist_ok=True)
|
|
47
|
+
shutil.move(str(file), str(target_dir / file.name))
|
|
48
|
+
|
|
49
|
+
moved += 1
|
|
50
|
+
|
|
51
|
+
verb = "Would move" if dry_run else "Moved"
|
|
52
|
+
console.print(f"[green]β[/] {verb} {moved} file(s).")
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Copyright (c) 2026 Oussama Boudinar <lionweb01@gmail.com>
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
"""Scaffold new projects from built-in templates."""
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
import click
|
|
8
|
+
from rich.console import Console
|
|
9
|
+
|
|
10
|
+
console = Console()
|
|
11
|
+
|
|
12
|
+
TEMPLATES: dict[str, dict[str, str]] = {
|
|
13
|
+
"web": {
|
|
14
|
+
"index.html": (
|
|
15
|
+
"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n"
|
|
16
|
+
" <meta charset=\"UTF-8\" />\n"
|
|
17
|
+
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n"
|
|
18
|
+
" <title>New Project</title>\n"
|
|
19
|
+
" <link rel=\"stylesheet\" href=\"style.css\" />\n"
|
|
20
|
+
"</head>\n<body>\n <h1>Hello, world!</h1>\n"
|
|
21
|
+
" <script src=\"script.js\"></script>\n</body>\n</html>\n"
|
|
22
|
+
),
|
|
23
|
+
"style.css": "body {\n font-family: system-ui, sans-serif;\n margin: 2rem;\n}\n",
|
|
24
|
+
"script.js": "console.log('Ready.');\n",
|
|
25
|
+
},
|
|
26
|
+
"python-cli": {
|
|
27
|
+
"main.py": (
|
|
28
|
+
"import click\n\n\n"
|
|
29
|
+
"@click.command()\n"
|
|
30
|
+
"def main() -> None:\n"
|
|
31
|
+
' """My CLI tool."""\n'
|
|
32
|
+
" click.echo('Hello!')\n\n\n"
|
|
33
|
+
'if __name__ == "__main__":\n'
|
|
34
|
+
" main()\n"
|
|
35
|
+
),
|
|
36
|
+
"requirements.txt": "click>=8.1.0\n",
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@click.command()
|
|
42
|
+
@click.argument("name")
|
|
43
|
+
@click.option(
|
|
44
|
+
"--type",
|
|
45
|
+
"template",
|
|
46
|
+
type=click.Choice(TEMPLATES.keys()),
|
|
47
|
+
default="web",
|
|
48
|
+
show_default=True,
|
|
49
|
+
)
|
|
50
|
+
def scaffold(name: str, template: str) -> None:
|
|
51
|
+
"""Create a new project NAME from a template."""
|
|
52
|
+
target = Path(name)
|
|
53
|
+
if target.exists():
|
|
54
|
+
console.print(f"[red]β[/] Directory '{name}' already exists.")
|
|
55
|
+
raise SystemExit(1)
|
|
56
|
+
|
|
57
|
+
files = TEMPLATES[template]
|
|
58
|
+
for filename, content in files.items():
|
|
59
|
+
file_path = target / filename
|
|
60
|
+
file_path.parent.mkdir(parents=True, exist_ok=True)
|
|
61
|
+
file_path.write_text(content)
|
|
62
|
+
|
|
63
|
+
console.print(f"[green]β[/] Created '{name}' ({template}) β {len(files)} file(s).")
|
|
64
|
+
console.print(f"[dim] cd {name}[/]")
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dz-devkit-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A modern CLI toolkit for developers: organize files, scaffold projects, inspect git repos.
|
|
5
|
+
Author-email: Oussama Boudinar <lionweb01@gmail.com>
|
|
6
|
+
Maintainer-email: Oussama Boudinar <lionweb01@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/dzopensource-lab/devkit-cli
|
|
9
|
+
Project-URL: Repository, https://github.com/dzopensource-lab/devkit-cli
|
|
10
|
+
Project-URL: Issues, https://github.com/dzopensource-lab/devkit-cli/issues
|
|
11
|
+
Keywords: cli,developer-tools,productivity,python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: click>=8.1.0
|
|
18
|
+
Requires-Dist: rich>=13.0.0
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
markdown
|
|
22
|
+
|
|
23
|
+
# π οΈ DevKit CLI
|
|
24
|
+
|
|
25
|
+
**A modern CLI toolkit for developers β organize files, scaffold projects, and inspect git repositories. All in one command.**
|
|
26
|
+
|
|
27
|
+
[](https://github.com/dzopensource-lab/devkit-cli/actions/workflows/test.yml)
|
|
28
|
+
[](https://www.python.org/)
|
|
29
|
+
[](LICENSE)
|
|
30
|
+
|
|
31
|
+
> Stop wasting time on repetitive tasks. `devkit` handles the boring stuff so you can focus on writing code.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## π¬ Quick Start (60 seconds)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# 1. Clone and install
|
|
39
|
+
git clone https://github.com/dzopensource-lab/devkit-cli.git
|
|
40
|
+
cd devkit-cli
|
|
41
|
+
pip install -e .
|
|
42
|
+
|
|
43
|
+
# 2. Try it immediately
|
|
44
|
+
devkit organize ~/Downloads --dry-run
|
|
45
|
+
devkit scaffold my-new-project --type web
|
|
46
|
+
devkit git-stats
|
|
47
|
+
|
|
48
|
+
That's it. You're ready to go. π
|
|
49
|
+
π What is DevKit?
|
|
50
|
+
|
|
51
|
+
devkit is a command-line toolkit that solves three daily problems every developer faces:
|
|
52
|
+
Problem Solution Command
|
|
53
|
+
ποΈ "My Downloads folder is a mess" Auto-sort files into categories devkit organize
|
|
54
|
+
π§± "I waste 10 minutes setting up every new project" Generate project structure instantly devkit scaffold
|
|
55
|
+
π "I forget my repo's commit count and current branch" See git stats in one command devkit git-stats
|
|
56
|
+
β¨ Features
|
|
57
|
+
|
|
58
|
+
π Smart file organizer β Sorts files into Images/, Documents/, Code/, Audio/, Videos/, Archives/ automatically
|
|
59
|
+
|
|
60
|
+
π§± Project scaffolder β Creates ready-to-use templates for web and python-cli projects
|
|
61
|
+
|
|
62
|
+
π Git inspector β Quick overview: branch, commit count, last author, last commit message
|
|
63
|
+
|
|
64
|
+
π¨ Beautiful terminal output β Colors, tables, and clear feedback powered by rich
|
|
65
|
+
|
|
66
|
+
π‘οΈ Safe by default β --dry-run mode lets you preview changes before executing
|
|
67
|
+
|
|
68
|
+
π§ͺ Tested β Fully covered by pytest and GitHub Actions CI
|
|
69
|
+
|
|
70
|
+
β‘ Fast β No dependencies beyond click and rich
|
|
71
|
+
|
|
72
|
+
π Installation
|
|
73
|
+
Option 1: Install from source (recommended for now)
|
|
74
|
+
bash
|
|
75
|
+
|
|
76
|
+
git clone https://github.com/dzopensource-lab/devkit-cli.git
|
|
77
|
+
cd devkit-cli
|
|
78
|
+
pip install -e .
|
|
79
|
+
|
|
80
|
+
Option 2: Install from PyPI (coming soon)
|
|
81
|
+
bash
|
|
82
|
+
|
|
83
|
+
pip install devkit-cli
|
|
84
|
+
|
|
85
|
+
Verify installation
|
|
86
|
+
bash
|
|
87
|
+
|
|
88
|
+
devkit --version
|
|
89
|
+
# devkit-cli, version 0.1.0
|
|
90
|
+
|
|
91
|
+
devkit --help
|
|
92
|
+
# Usage: devkit [OPTIONS] COMMAND [ARGS]...
|
|
93
|
+
|
|
94
|
+
π Commands Reference
|
|
95
|
+
π devkit organize β Sort files into folders
|
|
96
|
+
|
|
97
|
+
Syntax:
|
|
98
|
+
bash
|
|
99
|
+
|
|
100
|
+
devkit organize <PATH> [--dry-run]
|
|
101
|
+
|
|
102
|
+
What it does:
|
|
103
|
+
Scans the folder <PATH> and moves files into categorized subfolders based on their extension.
|
|
104
|
+
|
|
105
|
+
Categories:
|
|
106
|
+
Folder Extensions
|
|
107
|
+
Images/ .jpg, .jpeg, .png, .gif, .svg, .webp, .bmp
|
|
108
|
+
Documents/ .pdf, .doc, .docx, .txt, .md, .odt, .xlsx, .pptx
|
|
109
|
+
Videos/ .mp4, .mkv, .avi, .mov, .webm
|
|
110
|
+
Audio/ .mp3, .wav, .flac, .ogg, .m4a
|
|
111
|
+
Archives/ .zip, .rar, .7z, .tar, .gz
|
|
112
|
+
Code/ .py, .js, .ts, .html, .css, .json, .yml, .yaml, .sh
|
|
113
|
+
Other/ Everything else
|
|
114
|
+
|
|
115
|
+
Example:
|
|
116
|
+
|
|
117
|
+
Before:
|
|
118
|
+
text
|
|
119
|
+
|
|
120
|
+
Downloads/
|
|
121
|
+
βββ photo.jpg
|
|
122
|
+
βββ report.pdf
|
|
123
|
+
βββ song.mp3
|
|
124
|
+
βββ project.zip
|
|
125
|
+
βββ script.py
|
|
126
|
+
|
|
127
|
+
Run:
|
|
128
|
+
bash
|
|
129
|
+
|
|
130
|
+
devkit organize ~/Downloads
|
|
131
|
+
|
|
132
|
+
After:
|
|
133
|
+
text
|
|
134
|
+
|
|
135
|
+
Downloads/
|
|
136
|
+
βββ Images/
|
|
137
|
+
β βββ photo.jpg
|
|
138
|
+
βββ Documents/
|
|
139
|
+
β βββ report.pdf
|
|
140
|
+
βββ Audio/
|
|
141
|
+
β βββ song.mp3
|
|
142
|
+
βββ Archives/
|
|
143
|
+
β βββ project.zip
|
|
144
|
+
βββ Code/
|
|
145
|
+
βββ script.py
|
|
146
|
+
|
|
147
|
+
Safe preview:
|
|
148
|
+
bash
|
|
149
|
+
|
|
150
|
+
devkit organize ~/Downloads --dry-run
|
|
151
|
+
|
|
152
|
+
Shows what would happen without moving anything. Always use this first!
|
|
153
|
+
π§± devkit scaffold β Create a new project
|
|
154
|
+
|
|
155
|
+
Syntax:
|
|
156
|
+
bash
|
|
157
|
+
|
|
158
|
+
devkit scaffold <NAME> [--type web|python-cli]
|
|
159
|
+
|
|
160
|
+
What it does:
|
|
161
|
+
Creates a new folder <NAME> with a ready-to-use starter template.
|
|
162
|
+
|
|
163
|
+
Available templates:
|
|
164
|
+
Template 1: web (default)
|
|
165
|
+
|
|
166
|
+
Creates:
|
|
167
|
+
|
|
168
|
+
index.html β Starter HTML5 page
|
|
169
|
+
|
|
170
|
+
style.css β Basic styles
|
|
171
|
+
|
|
172
|
+
script.js β Starter JS file
|
|
173
|
+
|
|
174
|
+
bash
|
|
175
|
+
|
|
176
|
+
devkit scaffold my-website
|
|
177
|
+
|
|
178
|
+
Output:
|
|
179
|
+
text
|
|
180
|
+
|
|
181
|
+
my-website/
|
|
182
|
+
βββ index.html
|
|
183
|
+
βββ style.css
|
|
184
|
+
βββ script.js
|
|
185
|
+
|
|
186
|
+
Template 2: python-cli
|
|
187
|
+
|
|
188
|
+
Creates:
|
|
189
|
+
|
|
190
|
+
main.py β CLI starter using click
|
|
191
|
+
|
|
192
|
+
requirements.txt β Dependencies
|
|
193
|
+
|
|
194
|
+
bash
|
|
195
|
+
|
|
196
|
+
devkit scaffold my-tool --type python-cli
|
|
197
|
+
|
|
198
|
+
Output:
|
|
199
|
+
text
|
|
200
|
+
|
|
201
|
+
my-tool/
|
|
202
|
+
βββ main.py
|
|
203
|
+
βββ requirements.txt
|
|
204
|
+
|
|
205
|
+
π devkit git-stats β Inspect a git repository
|
|
206
|
+
|
|
207
|
+
Syntax:
|
|
208
|
+
bash
|
|
209
|
+
|
|
210
|
+
devkit git-stats [PATH]
|
|
211
|
+
|
|
212
|
+
What it does:
|
|
213
|
+
Displays key statistics about a git repository in a formatted table.
|
|
214
|
+
|
|
215
|
+
Example:
|
|
216
|
+
bash
|
|
217
|
+
|
|
218
|
+
devkit git-stats
|
|
219
|
+
|
|
220
|
+
Output:
|
|
221
|
+
text
|
|
222
|
+
|
|
223
|
+
Git Stats β devkit-cli
|
|
224
|
+
βββββββββββββββββ³ββββββββββββββββββββββββββββββ
|
|
225
|
+
β Metric β Value β
|
|
226
|
+
β‘ββββββββββββββββββββββββββββββββββββββββββββββ©
|
|
227
|
+
β Branch β main β
|
|
228
|
+
β Total commits β 5 β
|
|
229
|
+
β Last commit β feat: add clean command β
|
|
230
|
+
β Last author β Oussama Boudinar β
|
|
231
|
+
βββββββββββββββββ΄βββββββββββββββββββββββββββββββ
|
|
232
|
+
|
|
233
|
+
On another repo:
|
|
234
|
+
bash
|
|
235
|
+
|
|
236
|
+
devkit git-stats /path/to/any/repo
|
|
237
|
+
|
|
238
|
+
π‘ Use Cases
|
|
239
|
+
Use Case 1: Monthly Downloads cleanup
|
|
240
|
+
bash
|
|
241
|
+
|
|
242
|
+
devkit organize ~/Downloads
|
|
243
|
+
|
|
244
|
+
Use Case 2: Start a new web project instantly
|
|
245
|
+
bash
|
|
246
|
+
|
|
247
|
+
devkit scaffold my-landing-page
|
|
248
|
+
cd my-landing-page
|
|
249
|
+
# Open in browser, start coding!
|
|
250
|
+
|
|
251
|
+
Use Case 3: Quick repo status before a standup meeting
|
|
252
|
+
bash
|
|
253
|
+
|
|
254
|
+
devkit git-stats
|
|
255
|
+
|
|
256
|
+
ποΈ Project Structure
|
|
257
|
+
text
|
|
258
|
+
|
|
259
|
+
devkit-cli/
|
|
260
|
+
βββ devkit/
|
|
261
|
+
β βββ __init__.py # Package metadata
|
|
262
|
+
β βββ cli.py # Main entry point (Click group)
|
|
263
|
+
β βββ commands/
|
|
264
|
+
β βββ organize.py # File organizer command
|
|
265
|
+
β βββ scaffold.py # Project scaffolder command
|
|
266
|
+
β βββ git_stats.py # Git stats command
|
|
267
|
+
βββ tests/
|
|
268
|
+
β βββ test_cli.py # Basic tests
|
|
269
|
+
βββ .github/
|
|
270
|
+
β βββ workflows/
|
|
271
|
+
β βββ test.yml # CI pipeline
|
|
272
|
+
βββ docs/
|
|
273
|
+
β βββ quickstart.md # 60-second guide
|
|
274
|
+
β βββ commands.md # Full command reference
|
|
275
|
+
β βββ examples.md # Real-world examples
|
|
276
|
+
βββ pyproject.toml # Package config
|
|
277
|
+
βββ README.md # This file
|
|
278
|
+
βββ CONTRIBUTING.md # How to contribute
|
|
279
|
+
βββ CHANGELOG.md # Version history
|
|
280
|
+
βββ LICENSE # MIT License
|
|
281
|
+
|
|
282
|
+
π‘οΈ Safety Notes
|
|
283
|
+
β οΈ Warning Reason
|
|
284
|
+
Always run --dry-run first on organize To preview before moving files
|
|
285
|
+
Don't organize system folders (C:\Windows, Program Files) May require permissions and break the system
|
|
286
|
+
Backup important folders before organizing Though safe, always be careful
|
|
287
|
+
π€ Contributing
|
|
288
|
+
|
|
289
|
+
See CONTRIBUTING.md for guidelines.
|
|
290
|
+
|
|
291
|
+
Quick version:
|
|
292
|
+
|
|
293
|
+
Fork the repo
|
|
294
|
+
|
|
295
|
+
Create a branch: git checkout -b feature/my-feature
|
|
296
|
+
|
|
297
|
+
Make changes + add tests
|
|
298
|
+
|
|
299
|
+
Push and open a Pull Request
|
|
300
|
+
|
|
301
|
+
π§ͺ Testing
|
|
302
|
+
bash
|
|
303
|
+
|
|
304
|
+
pytest
|
|
305
|
+
pytest -v
|
|
306
|
+
|
|
307
|
+
πΊοΈ Roadmap
|
|
308
|
+
|
|
309
|
+
β
|
|
310
|
+
|
|
311
|
+
organize β Sort files into categories
|
|
312
|
+
β
|
|
313
|
+
|
|
314
|
+
scaffold β Create project templates
|
|
315
|
+
β
|
|
316
|
+
|
|
317
|
+
git-stats β Show repository statistics
|
|
318
|
+
β
|
|
319
|
+
|
|
320
|
+
GitHub Actions CI
|
|
321
|
+
β
|
|
322
|
+
|
|
323
|
+
clean command β Remove node_modules, __pycache__, .venv
|
|
324
|
+
β
|
|
325
|
+
|
|
326
|
+
organize --recursive β Support subfolders
|
|
327
|
+
β
|
|
328
|
+
|
|
329
|
+
Custom categories from devkit.toml
|
|
330
|
+
β
|
|
331
|
+
|
|
332
|
+
More scaffold templates (react, fastapi, vue)
|
|
333
|
+
β
|
|
334
|
+
|
|
335
|
+
Publish to PyPI
|
|
336
|
+
|
|
337
|
+
π License
|
|
338
|
+
|
|
339
|
+
MIT Β© 2026 Oussama Boudinar lionweb01@gmail.com β dzopensource-lab
|
|
340
|
+
β Show your support
|
|
341
|
+
|
|
342
|
+
If devkit helped you, please give it a β on GitHub β it means a lot!
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
devkit/__init__.py
|
|
5
|
+
devkit/cli.py
|
|
6
|
+
devkit/commands/__init__.py
|
|
7
|
+
devkit/commands/git_stats.py
|
|
8
|
+
devkit/commands/organize.py
|
|
9
|
+
devkit/commands/scaffold.py
|
|
10
|
+
dz_devkit_cli.egg-info/PKG-INFO
|
|
11
|
+
dz_devkit_cli.egg-info/SOURCES.txt
|
|
12
|
+
dz_devkit_cli.egg-info/dependency_links.txt
|
|
13
|
+
dz_devkit_cli.egg-info/entry_points.txt
|
|
14
|
+
dz_devkit_cli.egg-info/requires.txt
|
|
15
|
+
dz_devkit_cli.egg-info/top_level.txt
|
|
16
|
+
tests/test_cli.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
devkit
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dz-devkit-cli"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A modern CLI toolkit for developers: organize files, scaffold projects, inspect git repos."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "Oussama Boudinar", email = "lionweb01@gmail.com" }]
|
|
14
|
+
maintainers = [{ name = "Oussama Boudinar", email = "lionweb01@gmail.com" }]
|
|
15
|
+
keywords = ["cli", "developer-tools", "productivity", "python"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"click>=8.1.0",
|
|
22
|
+
"rich>=13.0.0",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
devkit = "devkit.cli:main"
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://github.com/dzopensource-lab/devkit-cli"
|
|
30
|
+
Repository = "https://github.com/dzopensource-lab/devkit-cli"
|
|
31
|
+
Issues = "https://github.com/dzopensource-lab/devkit-cli/issues"
|
|
32
|
+
|
|
33
|
+
[tool.setuptools.packages.find]
|
|
34
|
+
include = ["devkit*"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2026 Oussama Boudinar <lionweb01@gmail.com>
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
"""Basic CLI tests."""
|
|
4
|
+
|
|
5
|
+
from click.testing import CliRunner
|
|
6
|
+
|
|
7
|
+
from devkit.cli import main
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_cli_help() -> None:
|
|
11
|
+
runner = CliRunner()
|
|
12
|
+
result = runner.invoke(main, ["--help"])
|
|
13
|
+
assert result.exit_code == 0
|
|
14
|
+
assert "DevKit" in result.output
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def test_scaffold_creates_files(tmp_path) -> None:
|
|
18
|
+
runner = CliRunner()
|
|
19
|
+
with runner.isolated_filesystem(temp_dir=tmp_path):
|
|
20
|
+
result = runner.invoke(main, ["scaffold", "myproj", "--type", "web"])
|
|
21
|
+
assert result.exit_code == 0
|