zero-cli 1.0.1

A command line tool for Zero Secrets Manager
mod auth;
mod common;
mod projects;
mod secrets;
mod teams;
use clap::{Parser, Subcommand};
use dotenv::dotenv;

#[derive(Parser)]
#[command(author="Ottofeller", version="1.0.0", about="CLI for the Zero service", long_about = None)]
struct Cli {
    #[command(subcommand)]
    commands: Commands,
}

#[derive(Subcommand)]

enum Commands {
    #[clap(about = "Authentication and authorization")]
    Auth(auth::AuthCli),
    #[clap(about = "Manage projects")]
    Projects(projects::ProjectsCli),
    #[clap(about = "Manage secrets")]
    Secrets(secrets::SecretsCli),
    #[clap(about = "Manage teams")]
    Teams(teams::TeamsCli),
}

fn main() {
    // It loads the .env file located in the environment's current directory.
    dotenv().ok();

    let cli = Cli::parse();

    match &cli.commands {
        Commands::Auth(input) => auth::match_command(input),
        Commands::Projects(input) => projects::match_command(input),
        Commands::Secrets(input) => secrets::match_command(input),
        Commands::Teams(input) => teams::match_command(input),
    }
}