summaryrefslogtreecommitdiff
path: root/src/args.rs
blob: 274bb1e5dbdc42550706a04b39ad8d925174aaf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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>,
}