|
9 | 9 | //! directory](https://doc.rust-lang.org/book/ch14-04-installing-binaries.html) |
10 | 10 | //! in your path. |
11 | 11 | //! |
12 | | -//! The CLI provides two subcommands: |
13 | | -//! |
14 | | -//! - `validate` for validating HUGR files. |
15 | | -//! - `mermaid` for visualizing HUGR files as mermaid diagrams. |
16 | | -//! |
17 | | -//! ### Validate |
18 | | -//! |
19 | | -//! Validate and visualize a HUGR file |
20 | | -//! |
21 | | -//! Usage: `hugr validate [OPTIONS] [INPUT]` |
22 | | -//! |
23 | | -//! ```text |
24 | | -//! Options: |
25 | | -//! -v, --verbose... Increase logging verbosity |
26 | | -//! -q, --quiet... Decrease logging verbosity |
27 | | -//! -h, --help Print help (see more with '--help') |
28 | | -//! -V, --version Print version |
29 | | -//! |
30 | | -//! Input: |
31 | | -//! --no-std Don't use standard extensions when validating hugrs. Prelude is still used. |
32 | | -//! -e, --extensions <EXTENSIONS> Paths to serialised extensions to validate against. |
33 | | -//! --hugr-json Read the input as a HUGR JSON file instead of an envelope |
34 | | -//! [INPUT] Input file. Defaults to `-` for stdin |
| 12 | +//! The top level help can be accessed with: |
| 13 | +//! ```sh |
| 14 | +//! hugr --help |
35 | 15 | //! ``` |
36 | 16 | //! |
37 | | -//! ### Mermaid |
38 | | -//! |
39 | | -//! Write HUGR as mermaid diagrams |
40 | | -//! |
41 | | -//! Usage: `hugr mermaid [OPTIONS] [INPUT]` |
42 | | -//! |
43 | | -//! ```text |
44 | | -//! Options: |
45 | | -//! --validate Validate before rendering, includes extension inference. |
46 | | -//! -o, --output <OUTPUT> Output file '-' for stdout [default: -] |
47 | | -//! -v, --verbose... Increase logging verbosity |
48 | | -//! -q, --quiet... Decrease logging verbosity |
49 | | -//! -h, --help Print help (see more with '--help') |
50 | | -//! -V, --version Print version |
51 | | -//! |
52 | | -//! Input: |
53 | | -//! --no-std Don't use standard extensions when validating hugrs. Prelude is still used. |
54 | | -//! -e, --extensions <EXTENSIONS> Paths to serialised extensions to validate against. |
55 | | -//! --hugr-json Read the input as a HUGR JSON file instead of an envelope |
56 | | -//! [INPUT] Input file. Defaults to `-` for stdin. |
| 17 | +//! Refer to the help for each subcommand for more information, e.g. |
| 18 | +//! ```sh |
| 19 | +//! hugr validate --help |
57 | 20 | //! ``` |
58 | 21 |
|
59 | 22 | use clap::{Parser, crate_version}; |
@@ -87,7 +50,7 @@ pub struct CliArgs { |
87 | 50 | #[derive(Debug, clap::Subcommand)] |
88 | 51 | #[non_exhaustive] |
89 | 52 | pub enum CliCommand { |
90 | | - /// Validate and visualize a HUGR file. |
| 53 | + /// Validate a HUGR package. |
91 | 54 | Validate(validate::ValArgs), |
92 | 55 | /// Write standard extensions out in serialized form. |
93 | 56 | GenExtensions(extensions::ExtArgs), |
|
0 commit comments