1
0
mirror of https://github.com/smallstep/cli.git synced 2025-08-07 16:02:54 +03:00

Make sure all the short help uses the first person

Fixes #37
This commit is contained in:
Mariano Cano
2018-11-28 12:41:55 -08:00
parent 477cf26a66
commit e3e5cc1b62
23 changed files with 31 additions and 31 deletions

View File

@@ -21,7 +21,7 @@ func bootstrapCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "bootstrap", Name: "bootstrap",
Action: command.ActionFunc(bootstrapAction), Action: command.ActionFunc(bootstrapAction),
Usage: "initializes the environment to use the CA commands", Usage: "initialize the environment to use the CA commands",
UsageText: "**step ca bootstrap** [**--ca-url**=<uri>] [**--fingerprint**=<fingerprint>]", UsageText: "**step ca bootstrap** [**--ca-url**=<uri>] [**--fingerprint**=<fingerprint>]",
Description: `**step ca bootstrap** downloads the root certificate from the certificate Description: `**step ca bootstrap** downloads the root certificate from the certificate
authority and sets up the current environment to use it. authority and sets up the current environment to use it.

View File

@@ -29,7 +29,7 @@ func newCertificateCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "certificate", Name: "certificate",
Action: command.ActionFunc(newCertificateAction), Action: command.ActionFunc(newCertificateAction),
Usage: "generates a new certificate pair signed by the root certificate", Usage: "generate a new certificate pair signed by the root certificate",
UsageText: `**step ca certificate** <hostname> <crt-file> <key-file> UsageText: `**step ca certificate** <hostname> <crt-file> <key-file>
[**--token**=<token>] [**--ca-url**=<uri>] [**--root**=<file>] [**--token**=<token>] [**--ca-url**=<uri>] [**--root**=<file>]
[**--not-before**=<time|duration>] [**--not-after**=<time|duration>]`, [**--not-before**=<time|duration>] [**--not-after**=<time|duration>]`,
@@ -74,7 +74,7 @@ func signCertificateCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "sign", Name: "sign",
Action: command.ActionFunc(signCertificateAction), Action: command.ActionFunc(signCertificateAction),
Usage: "generates a new certificate signing a certificate request", Usage: "generate a new certificate signing a certificate request",
UsageText: `**step ca sign** <csr-file> <crt-file> UsageText: `**step ca sign** <csr-file> <crt-file>
[**--token**=<token>] [**--ca-url**=<uri>] [**--root**=<file>] [**--token**=<token>] [**--ca-url**=<uri>] [**--root**=<file>]
[**--not-before**=<time|duration>] [**--not-after**=<time|duration>]`, [**--not-before**=<time|duration>] [**--not-after**=<time|duration>]`,

View File

@@ -20,7 +20,7 @@ func initCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "init", Name: "init",
Action: cli.ActionFunc(initAction), Action: cli.ActionFunc(initAction),
Usage: "initializes the CA PKI", Usage: "initialize the CA PKI",
UsageText: `**step ca init** UsageText: `**step ca init**
[**--root**=<file>] [**--key**=<file>] [**--pki**]`, [**--root**=<file>] [**--key**=<file>] [**--pki**]`,
Description: `**step ca init** command initializes a public key infrastructure (PKI) to be Description: `**step ca init** command initializes a public key infrastructure (PKI) to be

View File

@@ -13,7 +13,7 @@ func getEncryptedKeyCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "jwe-key", Name: "jwe-key",
Action: cli.ActionFunc(getEncryptedKeyAction), Action: cli.ActionFunc(getEncryptedKeyAction),
Usage: "retrieves and prints a provisioning key in the CA", Usage: "retrieve and print a provisioning key in the CA",
UsageText: `**step ca provisioner jwe-key** <kid> [**--ca-url**=<uri>] UsageText: `**step ca provisioner jwe-key** <kid> [**--ca-url**=<uri>]
[**--root**=<file>]`, [**--root**=<file>]`,
Description: `**step ca provisioner jwe-key** returns the encrypted Description: `**step ca provisioner jwe-key** returns the encrypted

View File

@@ -18,7 +18,7 @@ func rootComand() cli.Command {
return cli.Command{ return cli.Command{
Name: "root", Name: "root",
Action: command.ActionFunc(rootAction), Action: command.ActionFunc(rootAction),
Usage: "downloads and validates the root certificate", Usage: "download and validate the root certificate",
UsageText: `**step ca root** <root-file> UsageText: `**step ca root** <root-file>
[**--ca-url**=<uri>] [**--fingerprint**=<fingerprint>]`, [**--ca-url**=<uri>] [**--fingerprint**=<fingerprint>]`,
Description: `**step ca root** downloads and validates the root certificate from the Description: `**step ca root** downloads and validates the root certificate from the

View File

@@ -33,7 +33,7 @@ func newTokenCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "token", Name: "token",
Action: command.ActionFunc(newTokenAction), Action: command.ActionFunc(newTokenAction),
Usage: "generates an OTT granting access to the CA", Usage: "generate an OTT granting access to the CA",
UsageText: `**step ca token** <hostname> UsageText: `**step ca token** <hostname>
[--**kid**=<kid>] [--**issuer**=<issuer>] [**--ca-url**=<uri>] [**--root**=<file>] [--**kid**=<kid>] [--**issuer**=<issuer>] [**--ca-url**=<uri>] [**--root**=<file>]
[**--not-before**=<time|duration>] [**--not-after**=<time|duration>] [**--not-before**=<time|duration>] [**--not-after**=<time|duration>]

View File

@@ -16,7 +16,7 @@ func bundleCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "bundle", Name: "bundle",
Action: command.ActionFunc(bundleAction), Action: command.ActionFunc(bundleAction),
Usage: `bundle a certificate with intermediate certificate(s) needed for certificate path validation.`, Usage: `bundle a certificate with intermediate certificate(s) needed for certificate path validation`,
UsageText: `**step certificate bundle** <crt_file> <ca> <bundle_file>`, UsageText: `**step certificate bundle** <crt_file> <ca> <bundle_file>`,
Description: `**step certificate bundle** bundles a certificate Description: `**step certificate bundle** bundles a certificate
with any intermediates necessary to validate the certificate. with any intermediates necessary to validate the certificate.

View File

@@ -9,7 +9,7 @@ import (
func init() { func init() {
cmd := cli.Command{ cmd := cli.Command{
Name: "certificate", Name: "certificate",
Usage: "create, revoke, validate, bundle, and otherwise manage certificates.", Usage: "create, revoke, validate, bundle, and otherwise manage certificates",
UsageText: "step certificate SUBCOMMAND [ARGUMENTS] [GLOBAL_FLAGS] [SUBCOMMAND_FLAGS]", UsageText: "step certificate SUBCOMMAND [ARGUMENTS] [GLOBAL_FLAGS] [SUBCOMMAND_FLAGS]",
Description: `**step certificate** command group provides facilities for creating Description: `**step certificate** command group provides facilities for creating
certificate signing requests (CSRs), creating self-signed certificates certificate signing requests (CSRs), creating self-signed certificates

View File

@@ -21,7 +21,7 @@ func lintCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "lint", Name: "lint",
Action: cli.ActionFunc(lintAction), Action: cli.ActionFunc(lintAction),
Usage: `lint certificate details.`, Usage: `lint certificate details`,
UsageText: `**step certificate lint** <crt_file> [**--roots**=<root-bundle>]`, UsageText: `**step certificate lint** <crt_file> [**--roots**=<root-bundle>]`,
Description: `**step certificate lint** checks a certificate for common Description: `**step certificate lint** checks a certificate for common
errors and outputs the result in JSON format. errors and outputs the result in JSON format.

View File

@@ -15,7 +15,7 @@ func signCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "sign", Name: "sign",
Action: cli.ActionFunc(signAction), Action: cli.ActionFunc(signAction),
Usage: "sign a certificate signing request (CSR).", Usage: "sign a certificate signing request (CSR)",
UsageText: `**step certificate sign** <csr_file> <crt_file> <key_file>`, UsageText: `**step certificate sign** <csr_file> <crt_file> <key_file>`,
Description: `**step certificate sign** generates a signed Description: `**step certificate sign** generates a signed
certificate from a certificate signing request (CSR). certificate from a certificate signing request (CSR).

View File

@@ -16,7 +16,7 @@ func verifyCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "verify", Name: "verify",
Action: cli.ActionFunc(verifyAction), Action: cli.ActionFunc(verifyAction),
Usage: `verify a certificate.`, Usage: `verify a certificate`,
UsageText: `**step certificate verify** <crt_file> [**--host**=<host>] UsageText: `**step certificate verify** <crt_file> [**--host**=<host>]
[**--roots**=<root-bundle>]`, [**--roots**=<root-bundle>]`,
Description: `**step certificate verify** executes the certificate path Description: `**step certificate verify** executes the certificate path

View File

@@ -21,7 +21,7 @@ func changePassCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "change-pass", Name: "change-pass",
Action: command.ActionFunc(changePassAction), Action: command.ActionFunc(changePassAction),
Usage: "Change password of an encrypted private key (PEM or JWK format)", Usage: "change password of an encrypted private key (PEM or JWK format)",
UsageText: `**step crypto change-pass** <key-file> [**--out**=<file>]`, UsageText: `**step crypto change-pass** <key-file> [**--out**=<file>]`,
Description: `**step crypto change-pass** extracts the private key from Description: `**step crypto change-pass** extracts the private key from
a file and encrypts disk using a new password by either overwriting the original a file and encrypts disk using a new password by either overwriting the original

View File

@@ -27,7 +27,7 @@ type hashConstructor func() hash.Hash
func Command() cli.Command { func Command() cli.Command {
return cli.Command{ return cli.Command{
Name: "hash", Name: "hash",
Usage: "generates and checks hashes of files and directories", Usage: "generate and check hashes of files and directories",
UsageText: "step crypto hash <subcommand> [arguments] [global-flags] [subcommand-flags]", UsageText: "step crypto hash <subcommand> [arguments] [global-flags] [subcommand-flags]",
Description: `**step crypto hash** command group provides facilities for generating and Description: `**step crypto hash** command group provides facilities for generating and
checking hashes of files and directories. checking hashes of files and directories.

View File

@@ -22,7 +22,7 @@ func formatCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "format", Name: "format",
Action: command.ActionFunc(formatAction), Action: command.ActionFunc(formatAction),
Usage: `reformat certificate.`, Usage: `reformat certificate`,
UsageText: `**step crypto key format** <key_file> [**--out**=<path>]`, UsageText: `**step crypto key format** <key_file> [**--out**=<path>]`,
Description: `**step crypto key format** prints the key in Description: `**step crypto key format** prints the key in
a different format. a different format.

View File

@@ -8,7 +8,7 @@ import (
func Command() cli.Command { func Command() cli.Command {
return cli.Command{ return cli.Command{
Name: "key", Name: "key",
Usage: "manage keys.", Usage: "manage keys",
UsageText: "step crypto key SUBCOMMAND [ARGUMENTS] [GLOBAL_FLAGS] [SUBCOMMAND_FLAGS]", UsageText: "step crypto key SUBCOMMAND [ARGUMENTS] [GLOBAL_FLAGS] [SUBCOMMAND_FLAGS]",
Description: `**step crypto key** command group provides facilities for Description: `**step crypto key** command group provides facilities for
managing cryptographic keys. managing cryptographic keys.

View File

@@ -19,7 +19,7 @@ func createKeyPairCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "keypair", Name: "keypair",
Action: command.ActionFunc(createAction), Action: command.ActionFunc(createAction),
Usage: "generate a public / private keypair in PEM format.", Usage: "generate a public / private keypair in PEM format",
UsageText: `**step crypto keypair** <pub_file> <priv_file> UsageText: `**step crypto keypair** <pub_file> <priv_file>
[**--curve**=<curve>] [**--no-password**] [**--size**=<size>] [**--curve**=<curve>] [**--no-password**] [**--size**=<size>]
[**--kty**=<key-type>]`, [**--kty**=<key-type>]`,

View File

@@ -15,7 +15,7 @@ import (
func authCommand() cli.Command { func authCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "auth", Name: "auth",
Usage: "authenticates a message using a secret key", Usage: "authenticate a message using a secret key",
UsageText: "step crypto nacl auth <subcommand> [arguments] [global-flags] [subcommand-flags]", UsageText: "step crypto nacl auth <subcommand> [arguments] [global-flags] [subcommand-flags]",
Description: `**step crypto nacl auth** command group uses secret key cryptography to Description: `**step crypto nacl auth** command group uses secret key cryptography to
authenticate and verify messages using a secret key. The implementation is based on NaCl's authenticate and verify messages using a secret key. The implementation is based on NaCl's
@@ -74,7 +74,7 @@ func authDigestCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "digest", Name: "digest",
Action: cli.ActionFunc(authDigestAction), Action: cli.ActionFunc(authDigestAction),
Usage: "generates a 32-byte digest for a message", Usage: "generate a 32-byte digest for a message",
UsageText: "**step crypto nacl auth digest** <key-file>", UsageText: "**step crypto nacl auth digest** <key-file>",
Description: `**step crypto nacl auth digest** creates a digest to authenticate the message Description: `**step crypto nacl auth digest** creates a digest to authenticate the message
is read from STDIN using the given secret key. is read from STDIN using the given secret key.
@@ -89,7 +89,7 @@ func authVerifyCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "verify", Name: "verify",
Action: cli.ActionFunc(authVerifyAction), Action: cli.ActionFunc(authVerifyAction),
Usage: "checks digest is a valid for a message", Usage: "validate a digest for a message",
UsageText: "**step crypto nacl auth verify** <key-file> <digest>", UsageText: "**step crypto nacl auth verify** <key-file> <digest>",
Description: `**step crypto nacl auth verify** checks that the digest is a valid authenticator Description: `**step crypto nacl auth verify** checks that the digest is a valid authenticator
of the message is read from STDIN under the given secret key file. of the message is read from STDIN under the given secret key file.

View File

@@ -15,7 +15,7 @@ import (
func secretboxCommand() cli.Command { func secretboxCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "secretbox", Name: "secretbox",
Usage: "encrypts and authenticates small messages using secret-key cryptography", Usage: "encrypt and authenticate small messages using secret-key cryptography",
UsageText: "step crypto nacl secretbox <subcommand> [arguments] [global-flags] [subcommand-flags]", UsageText: "step crypto nacl secretbox <subcommand> [arguments] [global-flags] [subcommand-flags]",
Description: `**step crypto nacl secretbox** command group uses secret-key cryptography to Description: `**step crypto nacl secretbox** command group uses secret-key cryptography to
encrypt, decrypt and authenticate messages. The implementation is based on NaCl's encrypt, decrypt and authenticate messages. The implementation is based on NaCl's
@@ -68,7 +68,7 @@ func secretboxOpenCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "open", Name: "open",
Action: cli.ActionFunc(secretboxOpenAction), Action: cli.ActionFunc(secretboxOpenAction),
Usage: "authenticates and decrypts a box produced by seal", Usage: "authenticate and decrypt a box produced by seal",
UsageText: `**step crypto nacl secretbox open** <nonce> <key-file> UsageText: `**step crypto nacl secretbox open** <nonce> <key-file>
[--raw]`, [--raw]`,
Description: `**step crypto nacl secretbox open** verifies and decrypts a ciphertext using a Description: `**step crypto nacl secretbox open** verifies and decrypts a ciphertext using a
@@ -90,7 +90,7 @@ func secretboxSealCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "seal", Name: "seal",
Action: cli.ActionFunc(secretboxSealAction), Action: cli.ActionFunc(secretboxSealAction),
Usage: "produces an encrypted ciphertext", Usage: "produce an encrypted ciphertext",
UsageText: `**step crypto nacl secretbox seal** <nonce> <key-file> UsageText: `**step crypto nacl secretbox seal** <nonce> <key-file>
[--raw]`, [--raw]`,
Description: `**step crypto nacl secretbox seal** encrypts and authenticates a message using Description: `**step crypto nacl secretbox seal** encrypts and authenticates a message using

View File

@@ -18,7 +18,7 @@ import (
func signCommand() cli.Command { func signCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "sign", Name: "sign",
Usage: "signs small messages using public-key cryptography", Usage: "sign small messages using public-key cryptography",
UsageText: "step crypto nacl sign <subcommand> [arguments] [global-flags] [subcommand-flags]", UsageText: "step crypto nacl sign <subcommand> [arguments] [global-flags] [subcommand-flags]",
Description: `**step crypto nacl sign** command group uses public-key cryptography to sign and Description: `**step crypto nacl sign** command group uses public-key cryptography to sign and
verify messages. The implementation is based on NaCl's crypto_sign function. verify messages. The implementation is based on NaCl's crypto_sign function.
@@ -68,7 +68,7 @@ func signKeypairCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "keypair", Name: "keypair",
Action: command.ActionFunc(signKeypairAction), Action: command.ActionFunc(signKeypairAction),
Usage: "generates a pair for use with sign and open", Usage: "generate a pair for use with sign and open",
UsageText: "**step crypto nacl sign keypair** <pub-file> <priv-file>", UsageText: "**step crypto nacl sign keypair** <pub-file> <priv-file>",
Description: `**step crypto nacl sign keypair** generates a secret key and a corresponding Description: `**step crypto nacl sign keypair** generates a secret key and a corresponding
public key valid for verifying and signing messages. public key valid for verifying and signing messages.
@@ -84,7 +84,7 @@ func signOpenCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "open", Name: "open",
Action: cli.ActionFunc(signOpenAction), Action: cli.ActionFunc(signOpenAction),
Usage: "verifies a signed message produced by sign", Usage: "verify a signed message produced by sign",
UsageText: "**step crypto nacl sign open** <pub-file>", UsageText: "**step crypto nacl sign open** <pub-file>",
Description: `**step crypto nacl sign open** verifies the signature of a message using the Description: `**step crypto nacl sign open** verifies the signature of a message using the
signer's public key. signer's public key.
@@ -105,7 +105,7 @@ func signSignCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "sign", Name: "sign",
Action: cli.ActionFunc(signSignAction), Action: cli.ActionFunc(signSignAction),
Usage: "signs a message using Ed25519", Usage: "sign a message using Ed25519",
UsageText: "**step crypto nacl sign sign** <priv-file>", UsageText: "**step crypto nacl sign sign** <priv-file>",
Description: `**step crypto nacl sign sign** signs a message m using the signer's private Description: `**step crypto nacl sign sign** signs a message m using the signer's private
key. key.

View File

@@ -19,7 +19,7 @@ func generateCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "generate", Name: "generate",
Action: command.ActionFunc(generateAction), Action: command.ActionFunc(generateAction),
Usage: "one-time password", Usage: "generate a one-time password",
UsageText: `**step crypto otp generate**`, UsageText: `**step crypto otp generate**`,
Description: `**step crypto otp generate** does TOTP and HTOP`, Description: `**step crypto otp generate** does TOTP and HTOP`,
Flags: []cli.Flag{ Flags: []cli.Flag{

View File

@@ -17,7 +17,7 @@ func verifyCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "verify", Name: "verify",
Action: cli.ActionFunc(verifyAction), Action: cli.ActionFunc(verifyAction),
Usage: "one-time password", Usage: "verify a one-time password",
UsageText: `**step crypto otp verify**`, UsageText: `**step crypto otp verify**`,
Description: `**step crypto otp verify** does TOTP and HTOP`, Description: `**step crypto otp verify** does TOTP and HTOP`,
Flags: []cli.Flag{ Flags: []cli.Flag{

View File

@@ -12,7 +12,7 @@ import (
func init() { func init() {
cmd := cli.Command{ cmd := cli.Command{
Name: "version", Name: "version",
Usage: "Displays the current version of the cli", Usage: "display the current version of the cli",
Action: Command, Action: Command,
} }

View File

@@ -21,7 +21,7 @@ func HelpCommand() cli.Command {
return cli.Command{ return cli.Command{
Name: "help", Name: "help",
Aliases: []string{"h"}, Aliases: []string{"h"},
Usage: "displays help for the specified command or command group", Usage: "display help for the specified command or command group",
ArgsUsage: "[command]", ArgsUsage: "[command]",
Action: HelpCommandAction, Action: HelpCommandAction,
Flags: []cli.Flag{ Flags: []cli.Flag{