Extract CLI class

This pulls the CLI functionality out of Launchpad, which cleans up that
class nicely.