Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli: Revisit commands
Open did:key:z6MkgFq6...nBGz opened 7 months ago crate=radicle-cli type=spec

Whenever we finished migrating the CLI to clap, we should revisit all commands and try to improve them. These are some ideas to consider:

General

  • add custom error formatter
    • bring back the old error prefix
    • add custom hints
  • for arguments that can take multiple formats, support e.g. rad unfollow <NID|--from <DID>>
  • streamline RID usage
    • do not allow RIDs without prefix?
    • rad fork, rad clone
  • consolidate value parser usage across commands (perhaps explore ValueParserFactory, which should make it easy to select the correct parser when building commands)

Specific

rad issue

  • improve rad issue state

rad unfollow

  • support rad unfollow <NID|--from <DID>>

rad init

  • we ignore no-confirm in several places during the initialization process
fintohaps commented 6 months ago

Something I’d like to see, after the migration, are parsers for std::time::Duration, so that we can do something like:

#[arg(value_name = "SECS", value_parser = "terminal::args::duration_secs")]
timeout: Option<time::Duration>,