cli-wizard 1.0.0__tar.gz → 2.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.
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/MANIFEST.in +1 -0
- {cli_wizard-1.0.0/src/cli_wizard.egg-info → cli_wizard-2.1.0}/PKG-INFO +29 -64
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/README.md +12 -47
- cli_wizard-2.1.0/VERSION +1 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/pyproject.toml +28 -19
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard/cli.py +8 -4
- cli_wizard-2.1.0/src/cli_wizard/commands/bootstrap.py +383 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard/commands/common.py +2 -1
- cli_wizard-2.1.0/src/cli_wizard/commands/config.py +106 -0
- cli_wizard-2.1.0/src/cli_wizard/commands/generate.py +263 -0
- cli_wizard-2.1.0/src/cli_wizard/config/configuration.py +77 -0
- cli_wizard-2.1.0/src/cli_wizard/config/schema.py +486 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard/constants.py +3 -1
- cli_wizard-2.1.0/src/cli_wizard/generator/generator.py +532 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard/generator/models.py +4 -1
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard/generator/parser.py +20 -2
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/CODEOWNERS.j2 +1 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/ISSUE_TEMPLATE/bug-report.yml.j2 +69 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/ISSUE_TEMPLATE/config.yml.j2 +5 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/ISSUE_TEMPLATE/feature-request.yml.j2 +39 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/PULL_REQUEST_TEMPLATE.md +21 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/dependabot.yaml +7 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/labeler.yaml +17 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/labels.yaml.j2 +69 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/workflows/changelog-enforcer.yaml +23 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/workflows/codeql.yaml +38 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/workflows/docs.yaml.j2 +52 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/workflows/labeler.yaml +14 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/workflows/pr-validation.yaml.j2 +42 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/workflows/release.yaml.j2 +42 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/workflows/sync-labels.yaml +27 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.github/workflows/test.yaml.j2 +46 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/.gitignore.j2 +62 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/CHANGELOG.md.j2 +31 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/DEVELOPMENT.md.j2 +89 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/LICENSE.j2 +21 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/MANIFEST.in.j2 +4 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/Makefile.j2 +28 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/README.md.j2 +23 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/VERSION.j2 +1 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/cli-wizard.yaml.j2 +17 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/pre-commit-config.yaml.j2 +23 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/pyproject.toml.j2 +84 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/src/{{ PackageName }}/__init__.py.j2 +11 -0
- cli_wizard-1.0.0/src/cli_wizard/templates/cli.py.j2 → cli_wizard-2.1.0/src/cli_wizard/templates/src/{{ PackageName }}/cli.py.j2 +37 -16
- cli_wizard-1.0.0/src/cli_wizard/templates/client.py.j2 → cli_wizard-2.1.0/src/cli_wizard/templates/src/{{ PackageName }}/client.py.j2 +26 -10
- cli_wizard-1.0.0/src/cli_wizard/templates/commands_init.py.j2 → cli_wizard-2.1.0/src/cli_wizard/templates/src/{{ PackageName }}/commands/__init__.py.j2 +2 -2
- cli_wizard-2.1.0/src/cli_wizard/templates/src/{{ PackageName }}/commands/config.py.j2 +384 -0
- cli_wizard-1.0.0/src/cli_wizard/templates/command_group.py.j2 → cli_wizard-2.1.0/src/cli_wizard/templates/src/{{ PackageName }}/commands/group.py.j2 +141 -30
- cli_wizard-2.1.0/src/cli_wizard/templates/src/{{ PackageName }}/constants.py.j2 +89 -0
- cli_wizard-1.0.0/src/cli_wizard/templates/logging.py.j2 → cli_wizard-2.1.0/src/cli_wizard/templates/src/{{ PackageName }}/logging.py.j2 +17 -9
- cli_wizard-1.0.0/src/cli_wizard/templates/profile.py.j2 → cli_wizard-2.1.0/src/cli_wizard/templates/src/{{ PackageName }}/profile.py.j2 +14 -8
- cli_wizard-2.1.0/src/cli_wizard/templates/tests/{{ PackageName }}/cli_test.py.j2 +1163 -0
- cli_wizard-2.1.0/src/cli_wizard/templates/tox.ini.j2 +27 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0/src/cli_wizard.egg-info}/PKG-INFO +29 -64
- cli_wizard-2.1.0/src/cli_wizard.egg-info/SOURCES.txt +64 -0
- cli_wizard-2.1.0/src/cli_wizard.egg-info/requires.txt +24 -0
- cli_wizard-1.0.0/VERSION +0 -1
- cli_wizard-1.0.0/src/cli_wizard/commands/config.py +0 -82
- cli_wizard-1.0.0/src/cli_wizard/commands/generate.py +0 -231
- cli_wizard-1.0.0/src/cli_wizard/config/configuration.py +0 -53
- cli_wizard-1.0.0/src/cli_wizard/config/default_config.yaml +0 -7
- cli_wizard-1.0.0/src/cli_wizard/config/schema.py +0 -182
- cli_wizard-1.0.0/src/cli_wizard/generator/generator.py +0 -241
- cli_wizard-1.0.0/src/cli_wizard/templates/README.md.j2 +0 -31
- cli_wizard-1.0.0/src/cli_wizard/templates/commands_config.py.j2 +0 -206
- cli_wizard-1.0.0/src/cli_wizard/templates/constants.py.j2 +0 -67
- cli_wizard-1.0.0/src/cli_wizard/templates/package_init.py.j2 +0 -8
- cli_wizard-1.0.0/src/cli_wizard/templates/pyproject.toml.j2 +0 -28
- cli_wizard-1.0.0/src/cli_wizard.egg-info/SOURCES.txt +0 -37
- cli_wizard-1.0.0/src/cli_wizard.egg-info/requires.txt +0 -24
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/LICENSE +0 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/setup.cfg +0 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard/__init__.py +0 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard/commands/__init__.py +0 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard/config/__init__.py +0 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard/generator/__init__.py +3 -3
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard.egg-info/dependency_links.txt +0 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard.egg-info/entry_points.txt +0 -0
- {cli_wizard-1.0.0 → cli_wizard-2.1.0}/src/cli_wizard.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cli-wizard
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Generate modern CLIs from OpenAPI specifications
|
|
5
5
|
Author-email: Giacomo Marciani <giacomo.marciani@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -17,43 +17,43 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
17
17
|
Requires-Python: >=3.12
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: click~=8.
|
|
20
|
+
Requires-Dist: click~=8.4
|
|
21
21
|
Requires-Dist: Jinja2~=3.1
|
|
22
|
-
Requires-Dist: pydantic~=2.
|
|
22
|
+
Requires-Dist: pydantic~=2.13
|
|
23
23
|
Requires-Dist: PyYAML~=6.0
|
|
24
|
-
Requires-Dist: requests~=2.
|
|
24
|
+
Requires-Dist: requests~=2.34
|
|
25
|
+
Requires-Dist: ruff~=0.16.2
|
|
25
26
|
Provides-Extra: dev
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist: pytest-cov~=7.0; extra == "dev"
|
|
34
|
-
Requires-Dist: tox~=4.32; extra == "dev"
|
|
35
|
-
Requires-Dist: twine~=6.2; extra == "dev"
|
|
27
|
+
Requires-Dist: build~=1.5; extra == "dev"
|
|
28
|
+
Requires-Dist: mypy~=2.3; extra == "dev"
|
|
29
|
+
Requires-Dist: pre-commit~=4.6; extra == "dev"
|
|
30
|
+
Requires-Dist: pytest~=9.1; extra == "dev"
|
|
31
|
+
Requires-Dist: pytest-cov~=7.1; extra == "dev"
|
|
32
|
+
Requires-Dist: tox~=4.58; extra == "dev"
|
|
33
|
+
Requires-Dist: twine<8.0,>=6.2; extra == "dev"
|
|
36
34
|
Requires-Dist: types-PyYAML~=6.0; extra == "dev"
|
|
37
|
-
Requires-Dist: types-requests~=2.
|
|
35
|
+
Requires-Dist: types-requests~=2.33; extra == "dev"
|
|
38
36
|
Provides-Extra: docs
|
|
39
37
|
Requires-Dist: sphinx~=9.1; extra == "docs"
|
|
40
|
-
Requires-Dist: sphinx-click~=6.
|
|
41
|
-
Requires-Dist: sphinx-rtd-theme~=3.
|
|
38
|
+
Requires-Dist: sphinx-click~=6.2; extra == "docs"
|
|
39
|
+
Requires-Dist: sphinx-rtd-theme~=3.1; extra == "docs"
|
|
40
|
+
Requires-Dist: sphinx-new-tab-link~=0.8; extra == "docs"
|
|
41
|
+
Requires-Dist: autodoc_pydantic~=2.2; extra == "docs"
|
|
42
42
|
Dynamic: license-file
|
|
43
43
|
|
|
44
44
|
# CLI WIZARD
|
|
45
45
|
|
|
46
46
|
<div align="center">
|
|
47
|
-
<img src="https://raw.githubusercontent.com/gmarciani/cli-wizard/main/resources/brand/
|
|
47
|
+
<img src="https://raw.githubusercontent.com/gmarciani/cli-wizard/main/resources/brand/banner.png" alt="cli-wizard-banner" width="500">
|
|
48
48
|
|
|
49
|
-
[](https://pypi.org/project/cli-wizard
|
|
50
|
-
[](https://pypi.org/project/cli-wizard
|
|
49
|
+
[](https://pypi.org/project/cli-wizard)
|
|
50
|
+
[](https://pypi.org/project/cli-wizard)
|
|
51
51
|
[](https://github.com/gmarciani/cli-wizard/blob/main/LICENSE)
|
|
52
|
-
[](https://github.com/gmarciani/cli-wizard/actions)
|
|
53
|
+
[](https://github.com/gmarciani/cli-wizard/actions)
|
|
54
54
|
[](https://codecov.io/gh/gmarciani/cli-wizard)
|
|
55
|
-
[](https://pypi.org/project/cli-wizard
|
|
55
|
+
[](https://github.com/astral-sh/ruff)
|
|
56
|
+
[](https://pypi.org/project/cli-wizard)
|
|
57
57
|
|
|
58
58
|
</div>
|
|
59
59
|
|
|
@@ -127,7 +127,7 @@ paths:
|
|
|
127
127
|
|
|
128
128
|
### Step 2: Create a Configuration File
|
|
129
129
|
|
|
130
|
-
Create a `
|
|
130
|
+
Create a `cli-wizard.yaml` file with your CLI settings. At minimum, you need `PackageName` and `DefaultBaseUrl`:
|
|
131
131
|
|
|
132
132
|
```yaml
|
|
133
133
|
# Required parameters
|
|
@@ -149,7 +149,7 @@ IncludeTags:
|
|
|
149
149
|
Run the `generate` command:
|
|
150
150
|
|
|
151
151
|
```shell
|
|
152
|
-
cli-wizard generate --openapi openapi.yaml --config
|
|
152
|
+
cli-wizard generate --openapi openapi.yaml --config cli-wizard.yaml --output my-cli
|
|
153
153
|
```
|
|
154
154
|
|
|
155
155
|
This creates a complete Python CLI project in the `my-cli` directory.
|
|
@@ -173,42 +173,7 @@ my-cli users list-users
|
|
|
173
173
|
|
|
174
174
|
## Configuration
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
### Required Parameters
|
|
179
|
-
|
|
180
|
-
| Parameter | Description |
|
|
181
|
-
|-----------|-------------|
|
|
182
|
-
| `PackageName` | Python package name for the generated CLI |
|
|
183
|
-
| `DefaultBaseUrl` | Default API base URL |
|
|
184
|
-
|
|
185
|
-
### Common Parameters
|
|
186
|
-
|
|
187
|
-
| Parameter | Default | Description |
|
|
188
|
-
|-----------|---------|-------------|
|
|
189
|
-
| `OutputDir` | `#[PackageName]` | Output directory for the generated CLI project |
|
|
190
|
-
| `MainDir` | `${HOME}/.#[PackageName]` | Main directory for CLI data (config, cache, logs) |
|
|
191
|
-
| `ProfileFile` | `#[MainDir]/profiles.yaml` | Path to profiles YAML file |
|
|
192
|
-
| `ExcludeTags` | `[]` | Tags to exclude from generation |
|
|
193
|
-
| `IncludeTags` | `[]` | Tags to include (empty means all) |
|
|
194
|
-
| `TagMapping` | `{}` | Map OpenAPI tags to CLI command group names |
|
|
195
|
-
| `CommandMapping` | `{}` | Customize command names (operationId → command name) |
|
|
196
|
-
| `SplashFile` | `None` | Path to splash text file |
|
|
197
|
-
| `SplashColor` | `#FFFFFF` | Color for splash text (hex code) |
|
|
198
|
-
| `Timeout` | `30` | Request timeout in seconds |
|
|
199
|
-
| `CaFile` | `None` | CA certificate file for SSL verification |
|
|
200
|
-
|
|
201
|
-
### Logging Parameters
|
|
202
|
-
|
|
203
|
-
| Parameter | Default | Description |
|
|
204
|
-
|-----------|---------|-------------|
|
|
205
|
-
| `LogLevel` | `INFO` | Default log level (DEBUG, INFO, WARNING, ERROR) |
|
|
206
|
-
| `LogFormat` | `[%(levelname)s] %(asctime)s %(message)s` | Log message format |
|
|
207
|
-
| `LogFile` | `None` | Path to log file (None means console only) |
|
|
208
|
-
| `LogRotationType` | `days` | Log rotation type: `size` or `days` |
|
|
209
|
-
| `LogRotationDays` | `30` | Log rotation interval in days |
|
|
210
|
-
| `LogColorStyle` | `level` | Color style: `full` or `level` |
|
|
211
|
-
|
|
176
|
+
See [configuration reference](https://gmarciani.github.io/cli-wizard/configuration.html) for full documentation.
|
|
212
177
|
See the [examples](examples/) directory for complete configuration examples.
|
|
213
178
|
|
|
214
179
|
## Commands
|
|
@@ -223,7 +188,7 @@ cli-wizard generate [OPTIONS]
|
|
|
223
188
|
|
|
224
189
|
Options:
|
|
225
190
|
- `--openapi, -o` - Path to OpenAPI spec file (default: `openapi.yaml`)
|
|
226
|
-
- `--config, -c` - Path to config YAML file (default: `
|
|
191
|
+
- `--config, -c` - Path to config YAML file (default: `cli-wizard.yaml`)
|
|
227
192
|
- `--output, -d` - Output directory for generated CLI (default: `cli`)
|
|
228
193
|
- `--working-dir, -w` - Working directory for resolving relative paths
|
|
229
194
|
|
|
@@ -233,4 +198,4 @@ Please report any issues or feature requests on the [GitHub Issues](https://gith
|
|
|
233
198
|
|
|
234
199
|
## License
|
|
235
200
|
|
|
236
|
-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
201
|
+
This project is licensed under the MIT License. See the [LICENSE](https://github.com/gmarciani/cli-wizard/blob/main/LICENSE) file for details.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# CLI WIZARD
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
|
-
<img src="https://raw.githubusercontent.com/gmarciani/cli-wizard/main/resources/brand/
|
|
4
|
+
<img src="https://raw.githubusercontent.com/gmarciani/cli-wizard/main/resources/brand/banner.png" alt="cli-wizard-banner" width="500">
|
|
5
5
|
|
|
6
|
-
[](https://pypi.org/project/cli-wizard
|
|
7
|
-
[](https://pypi.org/project/cli-wizard
|
|
6
|
+
[](https://pypi.org/project/cli-wizard)
|
|
7
|
+
[](https://pypi.org/project/cli-wizard)
|
|
8
8
|
[](https://github.com/gmarciani/cli-wizard/blob/main/LICENSE)
|
|
9
|
-
[](https://github.com/gmarciani/cli-wizard/actions)
|
|
10
|
+
[](https://github.com/gmarciani/cli-wizard/actions)
|
|
11
11
|
[](https://codecov.io/gh/gmarciani/cli-wizard)
|
|
12
|
-
[](https://pypi.org/project/cli-wizard
|
|
12
|
+
[](https://github.com/astral-sh/ruff)
|
|
13
|
+
[](https://pypi.org/project/cli-wizard)
|
|
14
14
|
|
|
15
15
|
</div>
|
|
16
16
|
|
|
@@ -84,7 +84,7 @@ paths:
|
|
|
84
84
|
|
|
85
85
|
### Step 2: Create a Configuration File
|
|
86
86
|
|
|
87
|
-
Create a `
|
|
87
|
+
Create a `cli-wizard.yaml` file with your CLI settings. At minimum, you need `PackageName` and `DefaultBaseUrl`:
|
|
88
88
|
|
|
89
89
|
```yaml
|
|
90
90
|
# Required parameters
|
|
@@ -106,7 +106,7 @@ IncludeTags:
|
|
|
106
106
|
Run the `generate` command:
|
|
107
107
|
|
|
108
108
|
```shell
|
|
109
|
-
cli-wizard generate --openapi openapi.yaml --config
|
|
109
|
+
cli-wizard generate --openapi openapi.yaml --config cli-wizard.yaml --output my-cli
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
This creates a complete Python CLI project in the `my-cli` directory.
|
|
@@ -130,42 +130,7 @@ my-cli users list-users
|
|
|
130
130
|
|
|
131
131
|
## Configuration
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
### Required Parameters
|
|
136
|
-
|
|
137
|
-
| Parameter | Description |
|
|
138
|
-
|-----------|-------------|
|
|
139
|
-
| `PackageName` | Python package name for the generated CLI |
|
|
140
|
-
| `DefaultBaseUrl` | Default API base URL |
|
|
141
|
-
|
|
142
|
-
### Common Parameters
|
|
143
|
-
|
|
144
|
-
| Parameter | Default | Description |
|
|
145
|
-
|-----------|---------|-------------|
|
|
146
|
-
| `OutputDir` | `#[PackageName]` | Output directory for the generated CLI project |
|
|
147
|
-
| `MainDir` | `${HOME}/.#[PackageName]` | Main directory for CLI data (config, cache, logs) |
|
|
148
|
-
| `ProfileFile` | `#[MainDir]/profiles.yaml` | Path to profiles YAML file |
|
|
149
|
-
| `ExcludeTags` | `[]` | Tags to exclude from generation |
|
|
150
|
-
| `IncludeTags` | `[]` | Tags to include (empty means all) |
|
|
151
|
-
| `TagMapping` | `{}` | Map OpenAPI tags to CLI command group names |
|
|
152
|
-
| `CommandMapping` | `{}` | Customize command names (operationId → command name) |
|
|
153
|
-
| `SplashFile` | `None` | Path to splash text file |
|
|
154
|
-
| `SplashColor` | `#FFFFFF` | Color for splash text (hex code) |
|
|
155
|
-
| `Timeout` | `30` | Request timeout in seconds |
|
|
156
|
-
| `CaFile` | `None` | CA certificate file for SSL verification |
|
|
157
|
-
|
|
158
|
-
### Logging Parameters
|
|
159
|
-
|
|
160
|
-
| Parameter | Default | Description |
|
|
161
|
-
|-----------|---------|-------------|
|
|
162
|
-
| `LogLevel` | `INFO` | Default log level (DEBUG, INFO, WARNING, ERROR) |
|
|
163
|
-
| `LogFormat` | `[%(levelname)s] %(asctime)s %(message)s` | Log message format |
|
|
164
|
-
| `LogFile` | `None` | Path to log file (None means console only) |
|
|
165
|
-
| `LogRotationType` | `days` | Log rotation type: `size` or `days` |
|
|
166
|
-
| `LogRotationDays` | `30` | Log rotation interval in days |
|
|
167
|
-
| `LogColorStyle` | `level` | Color style: `full` or `level` |
|
|
168
|
-
|
|
133
|
+
See [configuration reference](https://gmarciani.github.io/cli-wizard/configuration.html) for full documentation.
|
|
169
134
|
See the [examples](examples/) directory for complete configuration examples.
|
|
170
135
|
|
|
171
136
|
## Commands
|
|
@@ -180,7 +145,7 @@ cli-wizard generate [OPTIONS]
|
|
|
180
145
|
|
|
181
146
|
Options:
|
|
182
147
|
- `--openapi, -o` - Path to OpenAPI spec file (default: `openapi.yaml`)
|
|
183
|
-
- `--config, -c` - Path to config YAML file (default: `
|
|
148
|
+
- `--config, -c` - Path to config YAML file (default: `cli-wizard.yaml`)
|
|
184
149
|
- `--output, -d` - Output directory for generated CLI (default: `cli`)
|
|
185
150
|
- `--working-dir, -w` - Working directory for resolving relative paths
|
|
186
151
|
|
|
@@ -190,4 +155,4 @@ Please report any issues or feature requests on the [GitHub Issues](https://gith
|
|
|
190
155
|
|
|
191
156
|
## License
|
|
192
157
|
|
|
193
|
-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
158
|
+
This project is licensed under the MIT License. See the [LICENSE](https://github.com/gmarciani/cli-wizard/blob/main/LICENSE) file for details.
|
cli_wizard-2.1.0/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.1.0
|
|
@@ -22,32 +22,32 @@ classifiers = [
|
|
|
22
22
|
]
|
|
23
23
|
requires-python = ">=3.12"
|
|
24
24
|
dependencies = [
|
|
25
|
-
"click~=8.
|
|
25
|
+
"click~=8.4",
|
|
26
26
|
"Jinja2~=3.1",
|
|
27
|
-
"pydantic~=2.
|
|
27
|
+
"pydantic~=2.13",
|
|
28
28
|
"PyYAML~=6.0",
|
|
29
|
-
"requests~=2.
|
|
29
|
+
"requests~=2.34",
|
|
30
|
+
"ruff~=0.16.2",
|
|
30
31
|
]
|
|
31
32
|
|
|
32
33
|
[project.optional-dependencies]
|
|
33
34
|
dev = [
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"pytest-cov~=7.0",
|
|
42
|
-
"tox~=4.32",
|
|
43
|
-
"twine~=6.2",
|
|
35
|
+
"build~=1.5",
|
|
36
|
+
"mypy~=2.3",
|
|
37
|
+
"pre-commit~=4.6",
|
|
38
|
+
"pytest~=9.1",
|
|
39
|
+
"pytest-cov~=7.1",
|
|
40
|
+
"tox~=4.58",
|
|
41
|
+
"twine>=6.2,<8.0",
|
|
44
42
|
"types-PyYAML~=6.0",
|
|
45
|
-
"types-requests~=2.
|
|
43
|
+
"types-requests~=2.33",
|
|
46
44
|
]
|
|
47
45
|
docs = [
|
|
48
46
|
"sphinx~=9.1",
|
|
49
|
-
"sphinx-click~=6.
|
|
50
|
-
"sphinx-rtd-theme~=3.
|
|
47
|
+
"sphinx-click~=6.2",
|
|
48
|
+
"sphinx-rtd-theme~=3.1",
|
|
49
|
+
"sphinx-new-tab-link~=0.8",
|
|
50
|
+
"autodoc_pydantic~=2.2",
|
|
51
51
|
]
|
|
52
52
|
|
|
53
53
|
[project.scripts]
|
|
@@ -63,14 +63,23 @@ where = ["src"]
|
|
|
63
63
|
include = ["cli_wizard*"]
|
|
64
64
|
|
|
65
65
|
[tool.setuptools.package-data]
|
|
66
|
-
cli_wizard = [
|
|
66
|
+
cli_wizard = [
|
|
67
|
+
"templates/**/*.j2",
|
|
68
|
+
"templates/**/*.yaml",
|
|
69
|
+
"templates/**/*.yml",
|
|
70
|
+
"templates/**/*.md",
|
|
71
|
+
"config/*.yaml",
|
|
72
|
+
]
|
|
67
73
|
|
|
68
74
|
[tool.setuptools.dynamic]
|
|
69
75
|
version = {file = "VERSION"}
|
|
70
76
|
|
|
71
|
-
[tool.
|
|
77
|
+
[tool.ruff]
|
|
72
78
|
line-length = 88
|
|
73
|
-
target-version =
|
|
79
|
+
target-version = "py312"
|
|
80
|
+
|
|
81
|
+
[tool.ruff.lint]
|
|
82
|
+
select = ["E", "F", "W", "I"]
|
|
74
83
|
|
|
75
84
|
[tool.mypy]
|
|
76
85
|
python_version = "3.12"
|
|
@@ -3,19 +3,22 @@
|
|
|
3
3
|
|
|
4
4
|
"""Main CLI module for CLI Wizard."""
|
|
5
5
|
|
|
6
|
-
import click
|
|
7
6
|
import logging
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
import click
|
|
9
|
+
|
|
10
|
+
from cli_wizard.commands.bootstrap import bootstrap
|
|
9
11
|
from cli_wizard.commands.config import config
|
|
10
12
|
from cli_wizard.commands.generate import generate
|
|
13
|
+
from cli_wizard.constants import __version__
|
|
11
14
|
|
|
12
15
|
|
|
13
|
-
@click.group()
|
|
16
|
+
@click.group(help="CLI Wizard - Generate modern CLI from OpenAPI.")
|
|
14
17
|
@click.version_option(version=__version__, prog_name="cli-wizard")
|
|
15
18
|
@click.option("--debug", "-d", is_flag=True, help="Enable debug output")
|
|
16
19
|
@click.pass_context
|
|
17
20
|
def main(ctx: click.Context, debug: bool) -> None:
|
|
18
|
-
"""
|
|
21
|
+
"""Main CLI entry point."""
|
|
19
22
|
ctx.ensure_object(dict)
|
|
20
23
|
ctx.obj["debug"] = debug
|
|
21
24
|
|
|
@@ -29,6 +32,7 @@ def main(ctx: click.Context, debug: bool) -> None:
|
|
|
29
32
|
logging.Formatter.converter = lambda *args: __import__("time").gmtime()
|
|
30
33
|
|
|
31
34
|
|
|
35
|
+
main.add_command(bootstrap)
|
|
32
36
|
main.add_command(config)
|
|
33
37
|
main.add_command(generate)
|
|
34
38
|
|