Skip to content

Commit

Permalink
demo cli
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhibas committed Mar 26, 2024
1 parent 7f18122 commit 9574ebb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions flagfile-cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
use clap::{Parser, Subcommand};

#[derive(Parser, Debug)]
#[command(name = "Flagfile")]
#[command(version = "1.0")]
#[command(about = "Feature flagging for developers", long_about = None)]
struct Args {
#[command(subcommand)]
cmd: Command
}

#[derive(Subcommand, Debug)]
enum Command {
Init, // creates empty file with demo flag
List, // lists all flags in flagfile
Validate, // parses and validates all rules
}

fn main() {
let cli = Args::parse();
dbg!(cli.cmd);
println!("Hello, world from Flagfile cli");
}

0 comments on commit 9574ebb

Please sign in to comment.