Skip to content

Commit 96a294f

Browse files
ss2165cqc-alec
andauthored
feat(cli): describe sub-command (#2650)
Closes #2603 See base PR for more context: #2639 The `describe` CLI command loads the package with a description and: - If successful prints the description as tables to output - If error prints partial description to output and error to stderror - If --json flag is passed outputs as json instead, for use with other tools ## Help <img width="762" height="932" alt="image" src="https://github.com/user-attachments/assets/adf53b06-652a-4967-afcb-88e9cabfaad8" /> ## Summary <img width="1056" height="337" alt="image" src="https://github.com/user-attachments/assets/f0882eb3-2b80-421d-9de7-614dc4e42c7c" /> ## JSON (nushell render) <img width="1449" height="261" alt="image" src="https://github.com/user-attachments/assets/7a2728cc-a0d4-417c-b938-06b26d409d47" /> --------- Co-authored-by: Alec Edgington <[email protected]>
1 parent 349dd61 commit 96a294f

File tree

9 files changed

+821
-8
lines changed

9 files changed

+821
-8
lines changed

Cargo.lock

Lines changed: 94 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ pretty_assertions = "1.4.1"
9191
zstd = "0.13.2"
9292
relrc = "0.5.0"
9393
wyhash = "0.6.0"
94+
schemars = "1.0.4"
9495

9596
# These public dependencies usually require breaking changes downstream, so we
9697
# try to be as permissive as possible.

hugr-cli/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ clap-verbosity-flag.workspace = true
2121
derive_more = { workspace = true, features = ["display", "error", "from"] }
2222
hugr = { path = "../hugr", version = "0.24.0" }
2323
serde_json.workspace = true
24+
serde = { workspace = true, features = ["derive"] }
2425
clio = { workspace = true, features = ["clap-parse"] }
2526
anyhow.workspace = true
2627
thiserror.workspace = true
2728
tracing = "0.1.41"
2829
tracing-subscriber = { version = "0.3.20", features = ["fmt"] }
30+
tabled = "0.20.0"
31+
schemars = { workspace = true, features = ["derive"] }
32+
2933

3034
[lints]
3135
workspace = true

0 commit comments

Comments
 (0)