diff options
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 0000000..6ffe03f --- /dev/null +++ b/src/cli.rs | |||
@@ -0,0 +1,25 @@ | |||
1 | use std::path::PathBuf; | ||
2 | |||
3 | use clap::{Parser, Subcommand}; | ||
4 | |||
5 | use crate::packages::Manager; | ||
6 | |||
7 | #[derive(Parser)] | ||
8 | pub struct Cli { | ||
9 | #[arg(short, long)] | ||
10 | pub config: Option<PathBuf>, | ||
11 | |||
12 | #[command(subcommand)] | ||
13 | pub subcommand: Subcommands, | ||
14 | } | ||
15 | |||
16 | #[derive(Subcommand)] | ||
17 | pub enum Subcommands { | ||
18 | GenerateConfig, | ||
19 | Save { | ||
20 | #[arg(short, long)] | ||
21 | package_manager: Option<Manager>, | ||
22 | }, | ||
23 | Restore, | ||
24 | } | ||
25 | |||