From 44451e5e920d939ed63ee8942757e90d7188d8ff Mon Sep 17 00:00:00 2001 From: Naz Date: Fri, 25 Jul 2025 15:38:38 +0100 Subject: =?UTF-8?q?=E2=9C=A8feat:=20add=20basic=20CLI=20args=20and=20data?= =?UTF-8?q?=20types=20scaffolding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/args.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/args.rs (limited to 'src/args.rs') diff --git a/src/args.rs b/src/args.rs new file mode 100644 index 0000000..274bb1e --- /dev/null +++ b/src/args.rs @@ -0,0 +1,29 @@ +use clap::{Args, Parser, Subcommand}; + +/// A command line interface to install AppImages +#[derive(Debug, Parser)] +#[command(version, about, long_about = None)] +pub struct Cli { + #[command(subcommand)] + pub command: Command, +} + +#[derive(Debug, Subcommand)] +pub enum Command { + /// Installs an AppImage + #[command(name = "install", alias = "i")] + Install(InstallArgs), +} + +#[derive(Debug, Args)] +pub struct InstallArgs { + pub appname: String, + + /// Provide a repository slug, or a direct URL to an appimage. + #[arg(long)] + pub from: String, + + /// Name of the executable + #[arg(long)] + pub executable: Option, +} -- cgit v1.2.3