aboutsummaryrefslogtreecommitdiff
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
new file mode 100644
index 0000000..f59139d
--- /dev/null
+++ b/src/cli.rs
@@ -0,0 +1,25 @@
+use structopt::StructOpt;
+
+#[derive(StructOpt, Debug)]
+pub enum Command {
+ Run,
+ Config,
+}
+
+#[derive(StructOpt, Debug)]
+#[structopt(
+name = env!("CARGO_PKG_NAME"),
+about = env!("CARGO_PKG_DESCRIPTION"),
+version = env!("CARGO_PKG_VERSION"),
+author = env!("CARGO_PKG_AUTHORS"),
+)]
+pub struct Opt {
+ #[structopt(short, long)]
+ pub debug: bool,
+
+ #[structopt(short, long, parse(from_occurrences))]
+ pub verbose: u8,
+
+ #[structopt(subcommand)] // help
+ pub command: Command,
+}