cli test

This is ugly, but working. I want to clean it before merging, but I'm not sure how to get rid of the case analysis.
This case analysis was cleaner than I expected, but maybe we can break things up into a few variables.