From 3270cad29b19dca23816805f41cde1fc6f4e7efb Mon Sep 17 00:00:00 2001 From: Patrick Dwyer Date: Fri, 6 Mar 2026 23:26:04 +1000 Subject: [PATCH] Add required feature Signed-off-by: Patrick Dwyer --- src/CoderPatros.Jss.Cli/Program.cs | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/CoderPatros.Jss.Cli/Program.cs b/src/CoderPatros.Jss.Cli/Program.cs index 8c3d9ad..2ed991d 100644 --- a/src/CoderPatros.Jss.Cli/Program.cs +++ b/src/CoderPatros.Jss.Cli/Program.cs @@ -416,10 +416,36 @@ // --- Root command --- +const string banner = """ + +┌──────────────────────────────────────────────────────────────────────────────┐ +│ │ +│ ██╗██████╗██████╗ █████╗██╗ ██╗ ████████╗ █████╗ █████╗ ██╗ │ +│ ██║██╔═══╝██╔═══╝ ██╔═══╝██║ ██║ ╚══██╔══╝██╔══██╗██╔══██╗██║ │ +│ ██║██████╗██████╗ ██║ ██║ ██║ ██║ ██║ ██║██║ ██║██║ │ +│ ██ ██║╚═══██║╚═══██║ ██║ ██║ ██║ ██║ ██║ ██║██║ ██║██║ │ +│ ╚█████╔╝██████║██████║ ╚█████╗██████╗██║ ██║ ╚█████╔╝╚█████╔╝██████╗│ +│ ╚════╝╚══════╝╚═════╝ ╚════╝╚═════╝╚═╝ ╚═╝ ╚════╝ ╚════╝ ╚═════╝│ +│ │ +│ JSON Signature Scheme - ITU-T X.590 (10/2023) │ +│ │ +├──────────────────────────────────────────────────────────────────────────────┤ +│ │ +│ -=[ GREETiNGS GO OUT TO ]=- │ +│ │ +│ cyberphone ... IETF ... ITU-T ... ECMA ... OWASP ... CycloneDX │ +│ │ +└──────────────────────────────────────────────────────────────────────────────┘ + +"""; + var rootCommand = new RootCommand("JSS CLI - JSON Signature Scheme tool (ITU-T X.590)"); rootCommand.Subcommands.Add(generateKeyCommand); rootCommand.Subcommands.Add(signCommand); rootCommand.Subcommands.Add(verifyCommand); rootCommand.Subcommands.Add(countersignCommand); -return rootCommand.Parse(args).Invoke(); +if (args.Length == 0 || (args.Length == 1 && args[0] is "--help" or "-?" or "-h")) + Console.WriteLine(banner); + +return rootCommand.Parse(args.Length == 0 ? ["--help"] : args).Invoke();