summaryrefslogtreecommitdiff
path: root/src/args.rs
diff options
context:
space:
mode:
authorNaz <ndpm13@ch-naseem.com>2025-07-25 15:38:38 +0100
committerNaz <ndpm13@ch-naseem.com>2025-07-25 15:38:38 +0100
commit44451e5e920d939ed63ee8942757e90d7188d8ff (patch)
tree3bef2ed3fc60ab3590031a5a15c85b277541a7b8 /src/args.rs
parentaaf24a57b42d10c69cfa2db0c297c93dc18741e4 (diff)
✨feat: add basic CLI args and data types scaffolding
Diffstat (limited to 'src/args.rs')
-rw-r--r--src/args.rs29
1 files changed, 29 insertions, 0 deletions
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<String>,
+}