From 5c89b37d49ee3eed6f520dd26e0409b65af6993d Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 11 Jan 2024 20:29:23 +0400 Subject: Initial CLI interface --- src/main.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index e7a11a9..8c82ed1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,19 @@ +use clap::Parser; + +/// Create a mirror of a repository +#[derive(Parser, Debug)] +#[command(author, version, about, long_about = None)] +struct Args { + /// The path to save the repository to + #[arg(short, long)] + path: String, + + /// The URL of the repository to clone + #[arg(short, long)] + url: String, +} + fn main() { - println!("Hello, world!"); + let args = Args::parse(); + println!("{:?}", args); } -- cgit v1.2.3