Skip to content

Commit cf411c2

Browse files
committed
[README.md] Verbatim real CLI help text
1 parent 0ea6f02 commit cf411c2

1 file changed

Lines changed: 147 additions & 0 deletions

File tree

README.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,150 @@ at your option.
123123
Unless you explicitly state otherwise, any contribution intentionally submitted
124124
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
125125
dual licensed as above, without any additional terms or conditions.
126+
127+
## CLI Help
128+
129+
```
130+
$ ./target/release/cdd-rust --help
131+
CDD Toolchain CLI
132+
133+
Usage: cdd-rust [OPTIONS] <COMMAND>
134+
135+
Commands:
136+
sync Synchronize DB schema to Rust models and OpenAPI-ready structs
137+
test-gen Generates integration tests based on OpenAPI contracts
138+
scaffold Scaffolds handler functions from OpenAPI Routes
139+
schema-gen Generates a JSON Schema from a Rust struct or enum
140+
to_docs_json Generates a JSON output with documentation code snippets for an OpenAPI spec
141+
from_openapi Generates code from an OpenAPI specification
142+
to_openapi Generates an OpenAPI specification from source code
143+
serve_json_rpc Expose CLI interface as JSON-RPC server over HTTP
144+
help Print this message or the help of the given subcommand(s)
145+
146+
Options:
147+
-t, --target <TARGET>
148+
Target mode (server or client)
149+
150+
Possible values:
151+
- server: Generate Actix Web server scaffolding
152+
- client: Generate Reqwest client scaffolding
153+
- cli: Generate Clap CLI scaffolding
154+
155+
[env: CDD_TARGET=]
156+
[default: server]
157+
158+
-h, --help
159+
Print help (see a summary with '-h')
160+
161+
-V, --version
162+
Print version
163+
```
164+
165+
### `from_openapi`
166+
167+
```
168+
$ ./target/release/cdd-rust from_openapi --help
169+
Generates code from an OpenAPI specification
170+
171+
Usage: cdd-rust from_openapi [OPTIONS] <COMMAND>
172+
173+
Commands:
174+
to_sdk_cli Generate a CLI SDK
175+
to_sdk Generate a Client SDK
176+
to_server Generate Server scaffolding
177+
help Print this message or the help of the given subcommand(s)
178+
179+
Options:
180+
-t, --target <TARGET>
181+
Target mode (server or client)
182+
183+
Possible values:
184+
- server: Generate Actix Web server scaffolding
185+
- client: Generate Reqwest client scaffolding
186+
- cli: Generate Clap CLI scaffolding
187+
188+
[env: CDD_TARGET=]
189+
[default: server]
190+
191+
-h, --help
192+
Print help (see a summary with '-h')
193+
```
194+
195+
### `to_openapi`
196+
197+
```
198+
$ ./target/release/cdd-rust to_openapi --help
199+
Generates an OpenAPI specification from source code
200+
201+
Usage: cdd-rust to_openapi [OPTIONS] --input <INPUT>
202+
203+
Options:
204+
-i, --input <INPUT>
205+
Path to the code directory or file to parse
206+
207+
[env: CDD_INPUT=]
208+
209+
-o, --output <OUTPUT>
210+
Output file for the generated OpenAPI spec
211+
212+
[env: CDD_OUTPUT=]
213+
[default: spec.json]
214+
215+
-t, --target <TARGET>
216+
Target mode (server or client)
217+
218+
Possible values:
219+
- server: Generate Actix Web server scaffolding
220+
- client: Generate Reqwest client scaffolding
221+
- cli: Generate Clap CLI scaffolding
222+
223+
[env: CDD_TARGET=]
224+
[default: server]
225+
226+
-h, --help
227+
Print help (see a summary with '-h')
228+
```
229+
230+
### `to_docs_json`
231+
232+
```
233+
$ ./target/release/cdd-rust to_docs_json --help
234+
Generates a JSON output with documentation code snippets for an OpenAPI spec
235+
236+
Usage: cdd-rust to_docs_json [OPTIONS] --input <INPUT>
237+
238+
Options:
239+
-i, --input <INPUT>
240+
Path or URL to the OpenAPI specification
241+
242+
[env: CDD_INPUT=]
243+
244+
--no-imports
245+
If provided, omit the imports field in the code object
246+
247+
[env: CDD_NO_IMPORTS=]
248+
249+
--no-wrapping
250+
If provided, omit the wrapper_start and wrapper_end fields in the code object
251+
252+
[env: CDD_NO_WRAPPING=]
253+
254+
-o, --output <OUTPUT>
255+
Output file for the generated JSON
256+
257+
[env: CDD_OUTPUT=]
258+
259+
-t, --target <TARGET>
260+
Target mode (server or client)
261+
262+
Possible values:
263+
- server: Generate Actix Web server scaffolding
264+
- client: Generate Reqwest client scaffolding
265+
- cli: Generate Clap CLI scaffolding
266+
267+
[env: CDD_TARGET=]
268+
[default: server]
269+
270+
-h, --help
271+
Print help (see a summary with '-h')
272+
```

0 commit comments

Comments
 (0)