I added this above, adding as a separate answer as well so that it can
be evaluated on its own.
Try out cliqr. It is a lightweight yet a powerful framework that comes with a bunch of features pre-built (including a shell for your command). Take a look at the examples in the git repository.