diff --git a/.vscode/settings.json b/.vscode/settings.json index 39349ef..33a8a47 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,16 +4,20 @@ "axum", "chrono", "color", + "colored", "Conn", "dotenv", "hmac", "minisign", "oneshot", "openapi", + "postgres", "recv", "repr", + "serde", "Servable", "sqlx", + "tokio", "utoipa" ] } \ No newline at end of file diff --git a/src/cli.rs b/src/cli.rs index 1e290cf..9d62a2f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,6 +1,7 @@ use std::{collections::HashSet, path::PathBuf}; use clap::{command, Parser, Subcommand}; +use colored::Colorize; use error_stack::{Report, ResultExt}; use sqlx::PgPool; use tokio::sync::mpsc::UnboundedReceiver; @@ -97,7 +98,8 @@ impl Cli { windows::install_service()?; // Print success message - println!("Succssfully installed service {APP_NAME}"); + let msg = format!("Successfully installed service {APP_NAME}").green(); + println!("{msg}"); Ok(DaemonStatus::NotRunning) } @@ -106,7 +108,8 @@ impl Cli { windows::uninstall_service()?; // Print success message - println!("Succssfully removed service {APP_NAME}"); + let msg = format!("Successfully removed service {APP_NAME}").green(); + println!("{msg}"); Ok(DaemonStatus::NotRunning) } @@ -141,7 +144,12 @@ impl Cli { create_api_key(&pool, &key).await.change_context(AppError)?; // print API key secret to console - println!("Created API Key: {}.{key_secret}", key.id); + println!( + "{}: {}.{}", + "Created API Key".green().bold(), + key.id.bold(), + key_secret.bold() + ); Ok(DaemonStatus::NotRunning) }