Repository: certbot/certbot

Issue:
Provide custom help headers for important subcommands
Currently for instance if you do `certbot --help revoke` you get:

```
usage: 
  certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...

Certbot can obtain and install HTTPS/TLS/SSL certificates.  By default,
it will attempt to use a webserver both for obtaining and installing the
cert. 

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG_FILE, --config CONFIG_FILE
                        path to config file (default: /etc/letsencrypt/cli.ini
                        and ~/.config/letsencrypt/cli.ini)

revoke:
  Options for revocation of certs

  --cert-path CERT_PATH
                        Path to where cert is saved (with auth --csr),
                        installed from or revoked. (default: None)
  --key-path KEY_PATH   Path to private key for cert installation or
                        revocation (if account key is missing) (default: None)
```

The bottom of that output is good, but the top could be better.  We'd list a usage string like:
```
certbot revoke --cert-path CERT_PATH [--key-path KEY_PATH]
```
And a summary that was relevant.

We'd probably want to do this with a lookup table of usage headers.


Discussion:
The table wouldn't need to be complete to be useful -- we could just make it alongside the VERBS dict and keep adding things to it as we go.  Maybe that table should also contain the strings like `Options for revocation of certs` in the example above, and programmatically generate the calls that are made in `_add_all_groups` too.
To do this, just change the `opts` parameter in `VERB_HELP` in `certbot/cli.py`.

Resolving patch:
diff --git a/certbot/cli.py b/certbot/cli.py
--- a/certbot/cli.py
+++ b/certbot/cli.py
@@ -357,7 +357,8 @@ def _get_help_string(self, action):
     }),
     ("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 @@ def _get_help_string(self, action):
     }),
     ("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"
     }),
 
 ]


Test patch: