diff --git a/FULL_HELP_DOCS.md b/FULL_HELP_DOCS.md index cf44ff796..68852dd53 100644 --- a/FULL_HELP_DOCS.md +++ b/FULL_HELP_DOCS.md @@ -2343,7 +2343,11 @@ Print version information Show dependency licenses -**Usage:** `stellar licenses` +**Usage:** `stellar licenses [OPTIONS]` + +###### **Options:** + +* `-v`, `--verbose` — Display the license text diff --git a/cmd/soroban-cli/src/commands/licenses.rs b/cmd/soroban-cli/src/commands/licenses.rs index b34c15c09..8e60073af 100644 --- a/cmd/soroban-cli/src/commands/licenses.rs +++ b/cmd/soroban-cli/src/commands/licenses.rs @@ -5,7 +5,11 @@ use license_fetcher::get_package_list_macro; #[derive(Parser, Debug, Clone)] #[group(skip)] -pub struct Cmd; +pub struct Cmd { + /// Display the license text. + #[arg(long, short)] + pub verbose: bool, +} impl Cmd { #[allow(clippy::unused_self)] @@ -31,6 +35,13 @@ impl Cmd { println!("URL: {url}"); } + if self.verbose { + if let Some(text) = pkg.license_text.clone() { + println!("{text}"); + println!("———"); + } + } + println!(); }); }