Extra context: API + CLI

Fixes #12
Synthesizes parts of: #75, #100, #116, #161 and #199.
Thanks @fcurella, @aventurella, @emonty, @schacki, @ryanolson!
I think it may be easier to fix in a subsequent patch- tests are green?
And also, merge conflicts are not a sufficient reason for a revert?
(I had to do this, and read @audreyr comment essay to get my tests to work)