add clap, start to structure commands

This commit is contained in:
2022-11-05 16:33:58 -04:00
parent 9de7c81b96
commit b2e5fa81f1
5 changed files with 241 additions and 14 deletions

View File

@@ -1,3 +1,24 @@
fn main() {
println!("Hello, world!");
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
struct Cli {
#[clap(subcommand)]
command: Commands,
}
#[derive(Subcommand)]
enum Commands {
/// 🚀 Publish to IPFS
Publish {},
}
fn main() {
let cli = Cli::parse();
match &cli.command {
Commands::Publish {} => {
todo!("publish command");
}
}
}