skytool 0.1.0-pre.2

an experimental API client for BlueSky / ATProto
Documentation
mod data;
mod key;
mod password;

crate::macros::defn_error!(
  Error => {
    data,
    key,
    password
  }
);

#[derive(Debug, Clone, clap::Parser)]
pub(crate) struct Command {
  #[command(subcommand)]
  pub(crate) subcommand: Subcommand,
  #[command(flatten)]
  pub(crate) valkey: crate::integrations::fred::ValkeyOptions,
}

impl Command {
  pub(crate) async fn run(self) -> Result<Box<dyn crate::Output>, Error> {
    let Self { subcommand, valkey } = self;

    subcommand.run(&valkey).await
  }
}

crate::macros::auto_subcommand!(
  // #[command(disable_help_flag = true]
  #[command(
    about = "offline operations",
    disable_help_subcommand = true
  )]
  (Subcommand => Command) => (run(valkey: &crate::integrations::fred::ValkeyOptions)) => {
    data,
    #[command(subcommand)]
    key,
    #[command(subcommand)]
    password
  }
);