From cafd4802b7104f4b74a551fa8bf14f00e6a8f421 Mon Sep 17 00:00:00 2001 From: Andrew Ittner Date: Mon, 12 Jun 2017 08:12:41 -0700 Subject: [PATCH] Add more useful usage instructions for all subcommands (#4710) * Add more useful usage instructions for all subcommands Fixes #3875. * Update usage instructions Address PR comments. Fixes #3875. * Fix line length * Suffix usage lines with two empty lines Per review, this brackets all usage text in 2 newlines to match existing text. --- certbot/cli.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/certbot/cli.py b/certbot/cli.py index a74b50636..533acb4b2 100644 --- a/certbot/cli.py +++ b/certbot/cli.py @@ -357,7 +357,8 @@ VERB_HELP = [ }), ("delete", { "short": "Clean up all files related to a certificate", - "opts": "Options for deleting a certificate" + "opts": "Options for deleting a certificate", + "usage": "\n\n certbot delete --cert-name CERTNAME\n\n" }), ("revoke", { "short": "Revoke a certificate specified with --cert-path", @@ -366,33 +367,41 @@ VERB_HELP = [ }), ("register", { "short": "Register for account with Let's Encrypt / other ACME server", - "opts": "Options for account registration & modification" + "opts": "Options for account registration & modification", + "usage": "\n\n certbot register --email user@example.com [options]\n\n" }), ("unregister", { "short": "Irrevocably deactivate your account", - "opts": "Options for account deactivation." + "opts": "Options for account deactivation.", + "usage": "\n\n certbot unregister [options]\n\n" }), ("install", { "short": "Install an arbitrary certificate in a server", - "opts": "Options for modifying how a certificate is deployed" + "opts": "Options for modifying how a certificate is deployed", + "usage": "\n\n certbot install --cert-path /path/to/fullchain.pem " + " --key-path /path/to/private-key [options]\n\n" }), ("config_changes", { "short": "Show changes that Certbot has made to server configurations", - "opts": "Options for controlling which changes are displayed" + "opts": "Options for controlling which changes are displayed", + "usage": "\n\n certbot config_changes --num NUM [options]\n\n" }), ("rollback", { "short": "Roll back server conf changes made during certificate installation", - "opts": "Options for rolling back server configuration changes" + "opts": "Options for rolling back server configuration changes", + "usage": "\n\n certbot rollback --checkpoints 3 [options]\n\n" }), ("plugins", { "short": "List plugins that are installed and available on your system", - "opts": 'Options for for the "plugins" subcommand' + "opts": 'Options for for the "plugins" subcommand', + "usage": "\n\n certbot plugins [options]\n\n" }), ("update_symlinks", { "short": "Recreate symlinks in your /etc/letsencrypt/live/ directory", "opts": ("Recreates certificate and key symlinks in {0}, if you changed them by hand " "or edited a renewal configuration file".format( - os.path.join(flag_default("config_dir"), "live"))) + os.path.join(flag_default("config_dir"), "live"))), + "usage": "\n\n certbot update_symlinks [options]\n\n" }), ]