Add a cmdliner configuration interface

Since this is a backwards-incompatible change, the old code is left alone.