diff --git a/CHANGELOG.md b/CHANGELOG.md index 60dd1ee..e9751e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Added +- Add improved CLI styling by @daimond113 + ## [0.5.0-rc.14] - 2024-11-30 ### Fixed - Fix `includes` not supporting root files by @daimond113 diff --git a/src/main.rs b/src/main.rs index 0a3e592..e686093 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ use crate::cli::version::{check_for_updates, get_or_download_version}; use crate::cli::{auth::get_tokens, display_err, home_dir, HOME_DIR}; use anyhow::Context; -use clap::Parser; +use clap::{builder::styling::AnsiColor, Parser}; use fs_err::tokio as fs; use indicatif::MultiProgress; use indicatif_log_bridge::LogWrapper; @@ -16,12 +16,19 @@ use tempfile::NamedTempFile; mod cli; pub mod util; +const STYLES: clap::builder::Styles = clap::builder::Styles::styled() + .header(AnsiColor::Yellow.on_default().underline()) + .usage(AnsiColor::Yellow.on_default().underline()) + .literal(AnsiColor::Green.on_default().bold()) + .placeholder(AnsiColor::Cyan.on_default()); + #[derive(Parser, Debug)] #[clap( version, - about = "A package manager for the Luau programming language, supporting multiple runtimes including Roblox and Lune" + about = "A package manager for the Luau programming language", + long_about = "A package manager for the Luau programming language, supporting multiple runtimes including Roblox and Lune" )] -#[command(disable_version_flag = true)] +#[command(disable_version_flag = true, styles = STYLES)] struct Cli { /// Print version #[arg(short = 'v', short_alias = 'V', long, action = clap::builder::ArgAction::Version)]