Extra context: API + CLI

Fixes #12
Synthesizes parts of: #75, #100, #116, #161 and #199.
Thanks @fcurella, @aventurella, @emonty, @schacki, @ryanolson!
This seems like a good change (more flexibility) but (a) could you explain the implications, and (b) it doesn't seem related to the rest of the patch. Maybe split it out to a separate PR, and add some explanation in the changelog?