devgen-cli 0.2.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.
- devgen/__init__.py +0 -0
- devgen/ai.py +28 -0
- devgen/cli/__init__.py +0 -0
- devgen/cli/changelog.py +38 -0
- devgen/cli/commit.py +96 -0
- devgen/cli/config.py +169 -0
- devgen/cli/gitignore.py +138 -0
- devgen/cli/license.py +101 -0
- devgen/cli/main.py +101 -0
- devgen/cli/release.py +30 -0
- devgen/cli/setup.py +85 -0
- devgen/modules/__init__.py +0 -0
- devgen/modules/changelog_generator.py +190 -0
- devgen/modules/commit_generator.py +257 -0
- devgen/modules/gitignore_generator.py +116 -0
- devgen/modules/license_generator.py +80 -0
- devgen/modules/release_note_generator.py +66 -0
- devgen/providers/__init__.py +21 -0
- devgen/providers/anthropic.py +23 -0
- devgen/providers/gemini.py +24 -0
- devgen/providers/huggingface.py +45 -0
- devgen/providers/openai.py +48 -0
- devgen/providers/openrouter.py +33 -0
- devgen/utils.py +198 -0
- devgen_cli-0.2.0.dist-info/METADATA +287 -0
- devgen_cli-0.2.0.dist-info/RECORD +30 -0
- devgen_cli-0.2.0.dist-info/WHEEL +5 -0
- devgen_cli-0.2.0.dist-info/entry_points.txt +2 -0
- devgen_cli-0.2.0.dist-info/licenses/LICENSE +675 -0
- devgen_cli-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devgen-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A collection of developer tools
|
|
5
|
+
Home-page: https://github.com/S4NKALP/devgen
|
|
6
|
+
Author: Sankalp Tharu
|
|
7
|
+
Author-email: Sankalp Tharu <sankalptharu50028@gmail.com>
|
|
8
|
+
License: GPL-3.0-or-later
|
|
9
|
+
Project-URL: Homepage, https://github.com/S4NKALP/devgen
|
|
10
|
+
Keywords: devgen,cli,git,changelog,gitignore,license,commit-generator,commit
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: anthropic>=0.75.0
|
|
24
|
+
Requires-Dist: google-generativeai>=0.8.5
|
|
25
|
+
Requires-Dist: jinja2>=3.1.6
|
|
26
|
+
Requires-Dist: openai>=2.11.0
|
|
27
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
28
|
+
Requires-Dist: questionary>=2.1.1
|
|
29
|
+
Requires-Dist: requests>=2.32.5
|
|
30
|
+
Requires-Dist: rich>=14.2.0
|
|
31
|
+
Requires-Dist: toml>=0.10.2
|
|
32
|
+
Requires-Dist: twine>=6.2.0
|
|
33
|
+
Requires-Dist: typer>=0.20.0
|
|
34
|
+
Dynamic: author
|
|
35
|
+
Dynamic: home-page
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: requires-python
|
|
38
|
+
|
|
39
|
+
# DevGen
|
|
40
|
+
|
|
41
|
+
<div align="center">
|
|
42
|
+
|
|
43
|
+
<img src="https://img.shields.io/pypi/v/devgen?color=blue&label=PyPI&logo=pypi&logoColor=white" alt="PyPI">
|
|
44
|
+
<img src="https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&logoColor=white" alt="Python">
|
|
45
|
+
<a href="https://github.com/S4NKALP/devgen/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-GPL--3.0--or--later-blue.svg" alt="License"></a>
|
|
46
|
+
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
**DevGen** is an AI-powered developer toolkit that automates common Git and project management tasks. Generate semantic commit messages, changelogs, release notes, `.gitignore` files, and licensesβall from a single unified CLI.
|
|
50
|
+
|
|
51
|
+
## β¨ Features
|
|
52
|
+
|
|
53
|
+
- π **AI-Powered Commit Messages** - Automatically generate semantic commit messages from your staged changes using AI
|
|
54
|
+
- π **Changelog Generation** - Create changelogs from git history using conventional commits
|
|
55
|
+
- π **Release Notes** - Generate clean, emoji-enhanced release notes for your releases
|
|
56
|
+
- π **Gitignore Templates** - Generate `.gitignore` files from GitHub's official templates
|
|
57
|
+
- π **License Generation** - Quickly generate open source licenses with interactive setup
|
|
58
|
+
- βοΈ **Multi-Provider AI Support** - Works with Gemini, OpenAI, Anthropic, HuggingFace, and OpenRouter
|
|
59
|
+
|
|
60
|
+
## π¦ Installation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Stable release from PyPI
|
|
64
|
+
pip install devgen
|
|
65
|
+
|
|
66
|
+
# Using pipx (recommended for isolated CLI)
|
|
67
|
+
pipx install devgen
|
|
68
|
+
|
|
69
|
+
# Using uv (fast Python package manager)
|
|
70
|
+
uv tool install devgen
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## π Quick Start
|
|
74
|
+
|
|
75
|
+
### 1. Initial Setup
|
|
76
|
+
|
|
77
|
+
Configure your AI provider and API key:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
devgen setup config
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
This will create a configuration file at `~/.devgen.yaml` with your preferred AI provider, model, and API key.
|
|
84
|
+
|
|
85
|
+
### 2. Generate Commit Messages
|
|
86
|
+
|
|
87
|
+
Stage your changes and let DevGen generate semantic commit messages:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Dry run to preview commit messages
|
|
91
|
+
devgen commit run --dry-run
|
|
92
|
+
|
|
93
|
+
# Actually commit with AI-generated messages
|
|
94
|
+
devgen commit run
|
|
95
|
+
|
|
96
|
+
# Commit and automatically push
|
|
97
|
+
devgen commit run --push
|
|
98
|
+
|
|
99
|
+
# Force regeneration of commit messages
|
|
100
|
+
devgen commit run --force-rebuild
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**How it works:**
|
|
104
|
+
- DevGen detects all staged and unstaged changes
|
|
105
|
+
- Groups files by directory
|
|
106
|
+
- Generates semantic commit messages for each group using AI
|
|
107
|
+
- Follows [Conventional Commits](https://www.conventionalcommits.org/) format
|
|
108
|
+
|
|
109
|
+
**Additional commit commands:**
|
|
110
|
+
```bash
|
|
111
|
+
# View cached commit messages
|
|
112
|
+
devgen commit list-cached
|
|
113
|
+
|
|
114
|
+
# Clear the commit cache
|
|
115
|
+
devgen commit clear-cache
|
|
116
|
+
|
|
117
|
+
# Check what files are staged
|
|
118
|
+
devgen commit validate
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 3. Generate Changelogs
|
|
122
|
+
|
|
123
|
+
Create changelogs from your git history:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Generate changelog from last tag to HEAD
|
|
127
|
+
devgen changelog generate
|
|
128
|
+
|
|
129
|
+
# Generate from a specific reference
|
|
130
|
+
devgen changelog generate --from v1.0.0
|
|
131
|
+
|
|
132
|
+
# Output to a custom file
|
|
133
|
+
devgen changelog generate --output CHANGES.md
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The changelog follows Semantic Release conventions, categorizing commits into:
|
|
137
|
+
- **BREAKING CHANGES**
|
|
138
|
+
- **Features**
|
|
139
|
+
- **Bug Fixes**
|
|
140
|
+
- **Documentation**
|
|
141
|
+
- **Other Changes**
|
|
142
|
+
|
|
143
|
+
### 4. Generate Release Notes
|
|
144
|
+
|
|
145
|
+
Create release notes for your releases:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Generate release notes
|
|
149
|
+
devgen release notes --version 1.4.0
|
|
150
|
+
|
|
151
|
+
# Custom output file
|
|
152
|
+
devgen release notes --version 1.4.0 --output RELEASE.md
|
|
153
|
+
|
|
154
|
+
# From a specific reference
|
|
155
|
+
devgen release notes --version 1.4.0 --from v1.3.0
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 5. Generate .gitignore Files
|
|
159
|
+
|
|
160
|
+
Create `.gitignore` files from GitHub templates:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Interactive mode (search and select templates)
|
|
164
|
+
devgen gitignore generate
|
|
165
|
+
|
|
166
|
+
# Specify templates directly
|
|
167
|
+
devgen gitignore generate Python Node Docker
|
|
168
|
+
|
|
169
|
+
# List available templates
|
|
170
|
+
devgen gitignore list
|
|
171
|
+
|
|
172
|
+
# Use cached templates (offline mode)
|
|
173
|
+
devgen gitignore generate --offline Python
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Options:**
|
|
177
|
+
- `--append` / `--overwrite` - Append to or overwrite existing `.gitignore`
|
|
178
|
+
- `--output` - Specify output file path (default: `.gitignore`)
|
|
179
|
+
- `--offline` - Use only cached templates
|
|
180
|
+
|
|
181
|
+
### 6. Generate Licenses
|
|
182
|
+
|
|
183
|
+
Generate open source licenses interactively:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
devgen license generate
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
This will:
|
|
190
|
+
1. Show available licenses (MIT, Apache-2.0, GPL-3.0, etc.)
|
|
191
|
+
2. Prompt for author name
|
|
192
|
+
3. Prompt for year (defaults to current year)
|
|
193
|
+
4. Generate the license file
|
|
194
|
+
|
|
195
|
+
**Available licenses:**
|
|
196
|
+
- MIT
|
|
197
|
+
- Apache-2.0
|
|
198
|
+
- GPL-2.0, GPL-3.0
|
|
199
|
+
- LGPL-2.1
|
|
200
|
+
- AGPL-3.0
|
|
201
|
+
- BSD-2-Clause, BSD-3-Clause
|
|
202
|
+
- MPL-2.0
|
|
203
|
+
- EPL-2.0
|
|
204
|
+
- BSL-1.0
|
|
205
|
+
- CC0-1.0
|
|
206
|
+
- Unlicense
|
|
207
|
+
|
|
208
|
+
## βοΈ Configuration
|
|
209
|
+
|
|
210
|
+
Configuration is stored in `~/.devgen.yaml`. You can edit it manually or use the interactive setup:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
devgen setup config
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Configuration options:**
|
|
217
|
+
- `provider` - AI provider: `gemini`, `openai`, `anthropic`, `huggingface`, or `openrouter`
|
|
218
|
+
- `model` - Model name (e.g., `gemini-2.5-flash`, `gpt-4`, `claude-3-opus`)
|
|
219
|
+
- `api_key` - Your API key
|
|
220
|
+
- `emoji` - Enable/disable emojis in commit messages (default: `true`)
|
|
221
|
+
|
|
222
|
+
## π Command Reference
|
|
223
|
+
|
|
224
|
+
### Commit Commands
|
|
225
|
+
```bash
|
|
226
|
+
devgen commit run [--dry-run] [--push] [--debug] [--force-rebuild]
|
|
227
|
+
devgen commit validate
|
|
228
|
+
devgen commit list-cached
|
|
229
|
+
devgen commit clear-cache
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Changelog Commands
|
|
233
|
+
```bash
|
|
234
|
+
devgen changelog generate [--output FILE] [--from REF]
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Release Commands
|
|
238
|
+
```bash
|
|
239
|
+
devgen release notes [--version VERSION] [--output FILE] [--from REF]
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Gitignore Commands
|
|
243
|
+
```bash
|
|
244
|
+
devgen gitignore generate [TEMPLATES...] [--output FILE] [--append/--overwrite] [--offline]
|
|
245
|
+
devgen gitignore list [--cached]
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### License Commands
|
|
249
|
+
```bash
|
|
250
|
+
devgen license generate [--output FILE]
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Setup Commands
|
|
254
|
+
```bash
|
|
255
|
+
devgen setup config
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## π― Use Cases
|
|
259
|
+
|
|
260
|
+
- **Automated Commit Workflow**: Let AI analyze your changes and generate meaningful commit messages
|
|
261
|
+
- **Release Preparation**: Automatically generate changelogs and release notes from git history
|
|
262
|
+
- **Project Setup**: Quickly add `.gitignore` and license files to new projects
|
|
263
|
+
- **CI/CD Integration**: Use in scripts to automate documentation generation
|
|
264
|
+
|
|
265
|
+
## π§ Requirements
|
|
266
|
+
|
|
267
|
+
- Python 3.10 or higher
|
|
268
|
+
- Git repository (for commit/changelog/release features)
|
|
269
|
+
- API key for your chosen AI provider
|
|
270
|
+
|
|
271
|
+
## π License
|
|
272
|
+
|
|
273
|
+
This project is licensed under the GPL-3.0-or-later License - see the [LICENSE](LICENSE) file for details.
|
|
274
|
+
|
|
275
|
+
## π€ Contributing
|
|
276
|
+
|
|
277
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
278
|
+
|
|
279
|
+
## π Links
|
|
280
|
+
|
|
281
|
+
- **Homepage**: [https://github.com/S4NKALP/devgen](https://github.com/S4NKALP/devgen)
|
|
282
|
+
- **PyPI**: [https://pypi.org/project/devgen](https://pypi.org/project/devgen)
|
|
283
|
+
|
|
284
|
+
## π Acknowledgments
|
|
285
|
+
|
|
286
|
+
- Uses GitHub's official [gitignore templates](https://github.com/github/gitignore)
|
|
287
|
+
- Follows [Conventional Commits](https://www.conventionalcommits.org/) specification
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
devgen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
devgen/ai.py,sha256=e4aVFfa1atwmIBI9QSot4EnEiDG9SBwtGOMx91mh1ow,1494
|
|
3
|
+
devgen/utils.py,sha256=phhhmXXSSmMrH_aB7nOqxEilJ_OXpKYfOpYr2Ht48rI,5548
|
|
4
|
+
devgen/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
devgen/cli/changelog.py,sha256=V8HhhzsIcI0CZQnJeUv06Zns4oCVS51ndFsnQC78HZ8,960
|
|
6
|
+
devgen/cli/commit.py,sha256=3hBohdAW1dY1QzWIXj1TxL661eLd-2nAmY8dI5SvTMM,2460
|
|
7
|
+
devgen/cli/config.py,sha256=l1ip4Rw7k1rph3HIxT9rXF0WTUecP_ptUfy2-aC6JKI,4960
|
|
8
|
+
devgen/cli/gitignore.py,sha256=Nl7t_EZDhsOs5y-YkbOiuFLxHuAw48QTpw4_m9qJR2w,4446
|
|
9
|
+
devgen/cli/license.py,sha256=LAwro2Mwf7PEQWORMFqwp__Mn0Kx3BPhqZR-ttuKAbk,2830
|
|
10
|
+
devgen/cli/main.py,sha256=xmuZH3m7ckl14fjTnjtys65MD_aXA2JW4jjo0vfmZaQ,3356
|
|
11
|
+
devgen/cli/release.py,sha256=X0PfH7Vx__-CraiCNoMvxXWDmcmKdCdX16TYNubteV4,864
|
|
12
|
+
devgen/cli/setup.py,sha256=LOxYkjHDYQIwIOv7N4VJRek6QyU_pqk7B_R3qArjOm0,2477
|
|
13
|
+
devgen/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
devgen/modules/changelog_generator.py,sha256=UzKEYoWeRyDCqhCNNVWwvf91ka0lofcLc4uf9DJU8SM,6789
|
|
15
|
+
devgen/modules/commit_generator.py,sha256=x-cM1PVPyPdS6HZrLRNpQzjl1HdyhQM4rm_iciJBpr0,8635
|
|
16
|
+
devgen/modules/gitignore_generator.py,sha256=DpHAOrKIwSDklv7CLelYro478MQGJ4EcMAFi5E--348,4379
|
|
17
|
+
devgen/modules/license_generator.py,sha256=nOWcyPKgMnjHIYmu6CwZ-teDr_nl0j1lWpouuMjqDQg,2665
|
|
18
|
+
devgen/modules/release_note_generator.py,sha256=IiVNHV6KdpTjPCJCxuYKLWX_pVc-2ORuh82OQwZBVWg,2112
|
|
19
|
+
devgen/providers/__init__.py,sha256=Iug5kxOGF64uF6htTHumLCPmdrtoGwZwb7j5YuTqD_E,759
|
|
20
|
+
devgen/providers/anthropic.py,sha256=IeOwQTLcemOlSLAHAu7MPQVoAK2ZvjixzKuKKNq2nqs,782
|
|
21
|
+
devgen/providers/gemini.py,sha256=xrFo5vMTCpWjg2eUaLDygDc949K1-esp31rMSsIUZEY,792
|
|
22
|
+
devgen/providers/huggingface.py,sha256=bJjna6XDcjSWb6E-RZOYzSjP8ea5X5_zjCQAekF1iIc,1575
|
|
23
|
+
devgen/providers/openai.py,sha256=4uiPC1NrqR6Qu_hMouLMjpZWs5kNK2ZIkb37F_y1Sek,2173
|
|
24
|
+
devgen/providers/openrouter.py,sha256=NT7v8GujUH0Pg8TA9CG1SIkKSd3H-YEQmSfpU1Vc1GU,1107
|
|
25
|
+
devgen_cli-0.2.0.dist-info/licenses/LICENSE,sha256=-JHhLXXB2RRUeojKiRRTDHyJ1QiOCtrDfwbahUOb6Yc,35150
|
|
26
|
+
devgen_cli-0.2.0.dist-info/METADATA,sha256=HnJ01wdFp0H7TJc06STaiIJGXHYW-SpFJ2zb5KdcQJ8,7937
|
|
27
|
+
devgen_cli-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
28
|
+
devgen_cli-0.2.0.dist-info/entry_points.txt,sha256=NdqXSz3M3_0x0I3tFrXEF7r0mwCDmMfUNZbh2HDZSCg,47
|
|
29
|
+
devgen_cli-0.2.0.dist-info/top_level.txt,sha256=u-4SzOUkP7II9PqLZ4PCpIAsxv4tuxuJ4gtdApYG4Bw,7
|
|
30
|
+
devgen_cli-0.2.0.dist-info/RECORD,,
|