added a little bit of the commands

This commit is contained in:
2026-07-13 17:11:38 -05:00
parent 3009504e8d
commit 04c57f15f8
4 changed files with 1379 additions and 14 deletions
+30 -1
View File
@@ -1,3 +1,32 @@
use std::process;
use clap::Parser;
use clap::crate_version;
use cli::Cli;
use colored::*;
use git_version::git_version;
const GIT_VERSION: &str = git_version!();
fn main() {
println!("Hello, world!");
let cli = Cli::parse();
if cli.version {
let top_msg = format!("Harbor version {}", crate_version!().green()).bright_blue();
let bottom_msg =
format!("An open source secrets management and distribution platform.").blue();
let commit_msg = format!("Git commit {}", GIT_VERSION).dimmed();
println!("{}\n{}\n{}", top_msg, bottom_msg, commit_msg);
process::exit(0);
}
if cli.command.is_none() {
println!(
"{}\n{}",
"No command was entered.".red(),
"Exiting...".dimmed()
);
process::exit(0);
}
}