Initial implementation of the command-line interface.

@swankjesse @danrice-square @adriancole @loganj