A module used by me to manage outputs in various CLI tools. This uses a mix of external packages and ones I've written. Feel free to use it, but if you only need part of the functionality you might be better of using those modules directly. Functionality and any external tools it uses are documented below.
This supports various output types: