epik/cli/
mod.rs

1use clap::{Parser, Subcommand};
2
3#[derive(Parser)]
4#[command(name = "epik")]
5#[command(author, version, about = "Epic Games launcher for Linux written in Rust - GUI-first application", long_about = None)]
6pub struct Cli {
7    #[command(subcommand)]
8    pub command: Option<Commands>,
9
10    // Enable verbose logging
11    #[arg(short, long, global = true)]
12    pub verbose: bool,
13}
14
15#[derive(Subcommand)]
16pub enum Commands {
17    // Authenticate with Epic Games Store
18    Auth {
19        // Logout instead of login
20        #[arg(short, long)]
21        logout: bool,
22    },
23
24    // List games in your library
25    List {
26        // Show installed games only
27        #[arg(short, long)]
28        installed: bool,
29    },
30
31    // Install a game
32    Install {
33        // App name of the game to install
34        app_name: String,
35    },
36
37    // Launch a game
38    Launch {
39        // App name of the game to launch
40        app_name: String,
41    },
42
43    // Uninstall a game
44    Uninstall {
45        // App name of the game to uninstall
46        app_name: String,
47    },
48
49    // Show information about a game
50    Info {
51        // App name of the game
52        app_name: String,
53    },
54
55    // Show status and configuration
56    Status,
57
58    // Check for game updates
59    Update {
60        // App name of the game to check/update
61        app_name: String,
62
63        // Only check for updates, don't install them
64        #[arg(short, long)]
65        check_only: bool,
66    },
67
68    // Manage cloud saves
69    CloudSave {
70        // App name of the game
71        app_name: String,
72
73        // Download cloud saves
74        #[arg(short, long)]
75        download: bool,
76
77        // Upload local saves to cloud
78        #[arg(short, long)]
79        upload: bool,
80    },
81
82    // Import an existing game installation
83    Import {
84        // App name of the game (e.g., Fortnite)
85        app_name: String,
86
87        // Path to the game installation directory
88        install_path: std::path::PathBuf,
89
90        // Executable name relative to install path
91        executable: String,
92    },
93
94    // Launch the GUI
95    Gui,
96}