Astria-cli distinguishes between the Cli container, which provides the entry point to the command line utility, and their various handlers that take the parsed CLI options as an argument.
This separation is confusing and arguably not idiomatic.
astria-cli should be refactored such that each subcommand derives the clap::Args, but also provides an entrypoint fn run(self), i.e.:
#[derive(Args, Debug)]
struct TheSubcommand {
// options, flags, etc
}
impl TheSubcommand {
fn run(self) -> Result<T, E> {
// use the parsed arguments
}
}
┆Issue Number: ENG-834
Astria-cli distinguishes between the
Clicontainer, which provides the entry point to the command line utility, and their various handlers that take the parsed CLI options as an argument.This separation is confusing and arguably not idiomatic.
astria-cli should be refactored such that each subcommand derives the
clap::Args, but also provides an entrypointfn run(self), i.e.:┆Issue Number: ENG-834