Shopify/brigade — pull request #14 by aybabtme (2014-07-29 16:48:59+00:00)
Title: Add command entry to CLI. Cleanup CLI.

This PR adds a CLI entry for the `backup` command.

Doing so, I figured using a `mustArgType` pattern for flag arguments would make the code much cleaner, and refactored the other commands to use that.

* The AWS credentials are now read as command flags instead of environment variables.
* Different credentials can be used for different buckets (source, destination, backup history).

I went with flags since that's how most other apps are given arguments. Also using flags for everything makes it easy to use the tool.

Possible problem of using flags is that they show up in the process name (`top` will show `brigade --a --bunch --of --flags`), and in the `expvar` under the `cmdline` array. Since the flags contain the AWS access key/secret key, this could potentially be a problem.

Alternatives:

* in env vars, 12 factor app way.
* a config file.

Thoughts?

r: @camilo @shuhaowu @fbogsany
cc: @Shopify/webscale