feat(cli): block out cli

blocked out the args and commands that will be implemented later
This commit is contained in:
2026-08-31 14:48:08 -05:00
parent cfc636fb5a
commit 029fc48b53
2 changed files with 37 additions and 1 deletions
+31
View File
@@ -0,0 +1,31 @@
use clap::{Args, Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(version, about = "a cli to change git users")]
pub struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Debug, Subcommand)]
pub enum Commands {
List,
Use(UseArgs),
Add(AddArgs),
}
#[derive(Debug, Args)]
pub struct UseArgs {
pub profile_name: String,
#[arg(short, long)]
pub global: bool,
}
#[derive(Debug, Args)]
pub struct AddArgs {
pub profile_name: String,
#[arg(long)]
pub name: String,
#[arg(long)]
pub email: String,
}
+6 -1
View File
@@ -1,3 +1,8 @@
use clap::Parser;
mod cli;
fn main() {
println!("Hello, git!");
let args = cli::Cli::parse();
println!("{:?}", args);
}