diff --git a/readme.md b/readme.md index 32ca987..9fc2f27 100644 --- a/readme.md +++ b/readme.md @@ -7,17 +7,16 @@ A dotnet global tool for managing Git credentials using the Microsoft Git Credentials Manager Core. ``` -Usage: - gcm [options] [command] +USAGE: + dotnet gcm [OPTIONS] -Options: - --version Show version information - -?, -h, --help Show help and usage information +OPTIONS: + -h, --help Prints help information -Commands: - get Get a stored credential. - set Store a credential. - delete Delete a stored credential. +COMMANDS: + get Get a stored credential + delete Delete a stored credential + set Store a credential ``` Note that all commands can operate on a simplified syntax using a full URI, which can include `username:password` @@ -25,59 +24,69 @@ Note that all commands can operate on a simplified syntax using a full URI, whic value for required options that aren't provided. You can alternatively provide the individual options. -**get**: Get a stored credential. +### dotnet gcm get ``` -Usage: - gcm [options] get [] - -Arguments: - A URL used to populate options from a single value: [protocol]://[host]/[path?] - -Options: - -p, --protocol (REQUIRED) The protocol over which the credential will be used (e.g., https). - -h, --host (REQUIRED) The remote hostname for a network credential. This can include the port number. - --path The path with which the credential will be used. E.g., for accessing a remote - https repository, this will be the repository's path on the server. - -?, -h, --help Show help and usage information +DESCRIPTION: +Get a stored credential. + +USAGE: + dotnet gcm get [URL] [OPTIONS] + +ARGUMENTS: + [URL] A URL used to populate options from a single value: [protocol]://[user]:[password]@[host]/[path?] + +OPTIONS: + -h, --help Prints help information + -s, --scheme The protocol over which the credential will be used (e.g., https) + -h, --host The remote hostname for a network credential. This can include the port number + --path The path with which the credential will be used. E.g., for accessing a remote https repository, this will be the repository's + path on the server ``` -**set**: Store a credential. +### dotnet gcm set ``` -Usage: - gcm [options] set [] - -Arguments: - A URL used to populate options from a single value: [protocol]://[user]:[password]@[host]/[path?] - -Options: - -s, --protocol (REQUIRED) The protocol over which the credential will be used (e.g., https). - -h, --host (REQUIRED) The remote hostname for a network credential. This can include the port number. - -u, --username (REQUIRED) The credential's username. - -p, --password (REQUIRED) The credential's password. - --path The path with which the credential will be used. E.g., for accessing a remote https repository, this - will be the repository's path on the server. - -?, -h, --help Show help and usage information +DESCRIPTION: +Store a credential. + +USAGE: + dotnet gcm set [URL] [OPTIONS] + +ARGUMENTS: + [URL] A URL used to populate options from a single value: [protocol]://[user]:[password]@[host]/[path?] + +OPTIONS: + -h, --help Prints help information + -s, --scheme The protocol over which the credential will be used (e.g., https) + -h, --host The remote hostname for a network credential. This can include the port number + --path The path with which the credential will be used. E.g., for accessing a remote https repository, this will be the + repository's path on the server + -u, --username The credential's username + -p, --password The credential's password ``` -**delete**: Delete a stored credential. +### dotnet gcm delete ``` -Usage: - gcm [options] delete [] - -Arguments: - A URL used to populate options from a single value: [protocol]://[host]/[path?] - -Options: - -p, --protocol (REQUIRED) The protocol over which the credential will be used (e.g., https). - -h, --host (REQUIRED) The remote hostname for a network credential. This can include the port number. - --path The path with which the credential will be used. E.g., for accessing a remote https repository, this - will be the repository's path on the server. - -?, -h, --help Show help and usage information +DESCRIPTION: +Delete a stored credential. + +USAGE: + dotnet gcm delete [URL] [OPTIONS] + +ARGUMENTS: + [URL] A URL used to populate options from a single value: [protocol]://[user]:[password]@[host]/[path?] + +OPTIONS: + -h, --help Prints help information + -s, --scheme The protocol over which the credential will be used (e.g., https) + -h, --host The remote hostname for a network credential. This can include the port number + --path The path with which the credential will be used. E.g., for accessing a remote https repository, this will be the repository's + path on the server ``` + # Sponsors diff --git a/src/DeleteCommand.cs b/src/DeleteCommand.cs index a0f6979..f7d09cd 100644 --- a/src/DeleteCommand.cs +++ b/src/DeleteCommand.cs @@ -1,8 +1,10 @@ -using System.Threading.Tasks; +using System.ComponentModel; +using System.Threading.Tasks; using Spectre.Console.Cli; namespace Devlooped; +[Description("Delete a stored credential.")] public class DeleteCommand : AsyncCommand { public override async Task ExecuteAsync(CommandContext context, UrlSettings settings) diff --git a/src/GetCommand.cs b/src/GetCommand.cs index 88b8390..384a742 100644 --- a/src/GetCommand.cs +++ b/src/GetCommand.cs @@ -1,10 +1,12 @@ using System; +using System.ComponentModel; using System.Threading.Tasks; using Spectre.Console; using Spectre.Console.Cli; namespace Devlooped; +[Description("Get a stored credential.")] public class GetCommand : AsyncCommand { public override async Task ExecuteAsync(CommandContext context, UrlSettings settings) diff --git a/src/Program.cs b/src/Program.cs index e688af3..a027ed3 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -14,6 +14,10 @@ config.Settings.HelpProviderStyles = new Spectre.Console.Cli.Help.HelpProviderStyle { + Description = new Spectre.Console.Cli.Help.DescriptionStyle + { + Header = new Spectre.Console.Style(Spectre.Console.Color.Yellow, decoration: Spectre.Console.Decoration.Bold), + }, Usage = new Spectre.Console.Cli.Help.UsageStyle { Header = new Spectre.Console.Style(Spectre.Console.Color.Yellow, decoration: Spectre.Console.Decoration.Bold), diff --git a/src/SetCommand.cs b/src/SetCommand.cs index 0ffceea..1900f94 100644 --- a/src/SetCommand.cs +++ b/src/SetCommand.cs @@ -1,8 +1,10 @@ -using System.Threading.Tasks; +using System.ComponentModel; +using System.Threading.Tasks; using Spectre.Console.Cli; namespace Devlooped; +[Description("Store a credential.")] public class SetCommand : AsyncCommand { public override async Task ExecuteAsync(CommandContext context, CredentialUrlSettings settings) diff --git a/src/gcm.csproj b/src/gcm.csproj index bd0f571..8420fcd 100644 --- a/src/gcm.csproj +++ b/src/gcm.csproj @@ -22,7 +22,8 @@ - + + diff --git a/src/readme.md b/src/readme.md index 75bbf4e..75f2087 100644 --- a/src/readme.md +++ b/src/readme.md @@ -1,2 +1,3 @@ + \ No newline at end of file