§ Guides
Installation
Install the core package and one or more adapters for your CLI framework.
Requirements
| Language | Requirement |
|---|---|
| Go | Go 1.21 or later · module path github.com/murli-cli/murli-go |
| Rust | Rust stable (edition 2021), Cargo · crate murli on crates.io |
| Python | Python 3.9 or later, pip · package murli on PyPI |
Install
shellcobra
go get github.com/murli-cli/murli-go go get github.com/murli-cli/murli-go/cobra
shellurfave/cli v2
go get github.com/murli-cli/murli-go go get github.com/murli-cli/murli-go/cli/v2
shellurfave/cli v3
go get github.com/murli-cli/murli-go go get github.com/murli-cli/murli-go/cli/v3
tomlCargo.toml
[dependencies]
murli = { version = "0.1", features = ["clap"] } # clap adapter
murli = { version = "0.1", features = ["argh"] } # argh adapter
murli = { version = "0.1", features = ["clap", "argh"] } # both
shellpip
pip install murli # core + argparse adapter pip install "murli[click]" # + click adapter pip install "murli[typer]" # + typer adapter pip install "murli[all]" # click + typer
Module layout
| Module | Contents | When |
|---|---|---|
| github.com/murli-cli/murli-go | Core types: Writer, Logger, AgentError, Metadata, ProfileStore, schema types, exit code constants |
Always |
| github.com/murli-cli/murli-go/cobra | Execute, Enable, NewWriter, Annotate, EmitSchema, BuildDescribeTree |
cobra only |
| github.com/murli-cli/murli-go/cli/v2 | Run, NewWriter, Annotate, AnnotateApp, EmitSchema, BuildV2DescribeTree |
urfave/cli v2 only |
| github.com/murli-cli/murli-go/cli/v3 | Run, Wrap, NewWriter, Annotate, EmitSchema, BuildV3DescribeTree |
urfave/cli v3 only |
| Feature flag | Contents | When |
|---|---|---|
| (none) | Core crate: Writer, AgentError, ProgressEvent, exit code constants |
Always |
| features = ["clap"] | murli::clap::GlobalArgs, murli::clap::enable, murli::clap::handle_builtins, murli::clap::handle_matches |
clap users |
| features = ["argh"] | murli::argh::GlobalArgs, murli::argh::handle_builtins, murli::argh::writer_from_args |
argh users |
| Package extra | Contents | When |
|---|---|---|
| murli | Core + argparse adapter: enable, parse, annotate, Writer, Metadata, AgentError |
Always |
| murli[click] | Adds @murli.pass_writer, click group and command support |
click users |
| murli[typer] | Adds murli.get_writer(ctx), typer app support |
typer users |
Verify
Every CLI wrapped by murli exposes a describe subcommand automatically. Run it to confirm the integration is working:
shell
mytool describe | jq '.murli'
# {
# "version": "1.0.2",
# "adapter": "cobra" # or "clap", "click", "argparse", etc.
# }