Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 committed May 29, 2024
1 parent 11c9f10 commit 9782f6f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
34 changes: 31 additions & 3 deletions hugr-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,40 @@ hugr-cli
[![msrv][]](https://github.com/CQCL/hugr)
[![codecov][]](https://codecov.io/gh/CQCL/hugr)

This crate provides tooling used by the `hugr` CLI tool.
Refer to the [main crate](http://crates.io/crates/hugr) for more information.
`hugr` CLI tool for common tasks on serialised HUGR (e.g. validation,
visualisation).

Refer to the [main HUGR crate](http://crates.io/crates/hugr) for more information.

## Usage

Add the dependency to your project:
Install using `cargo`:

```bash
cargo install hugr-cli
```

This will install the `hugr` binary. Running `hugr --help` shows:

```
Validate a HUGR.
Usage: hugr [OPTIONS] <INPUT>
Arguments:
<INPUT>
Options:
-m, --mermaid Visualise with mermaid.
-n, --no-validate Skip validation.
-v, --verbose... Increase logging verbosity
-q, --quiet... Decrease logging verbosity
-h, --help Print help
-V, --version Print version
```


To extend the CLI you can also add the project as a library dependency:

```bash
cargo add hugr-cli
Expand Down
1 change: 0 additions & 1 deletion hugr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ extension_inference = []
[dependencies]
hugr-core = { path = "../hugr-core", version = "0.1.0" }
hugr-passes = { path = "../hugr-passes", version = "0.1.0" }
hugr-cli = { path = "../hugr-cli", version = "0.1.0", optional = true }

[dev-dependencies]
rstest = { workspace = true }
Expand Down

0 comments on commit 9782f6f

Please sign in to comment.