thegreenwebfoundation / green-cost-explorer

See how much of your cloud bill is spent on fossil fuels ,so you can do the right thing and switch. We're in a climate crisis, remember?
Apache License 2.0
171 stars 18 forks source link

Add nicer CLI flags and output #1

Closed mrchrisadams closed 5 years ago

mrchrisadams commented 5 years ago

Right now, we just dump a bunch of javascript objects to the command line.

This isn't very helpful.

What would be a nice start, would be to get a lighthouse ci style breakdown like so:

lighthouse-ci-cli-ui

What would be really nice would be to have a flag to output json in a format that works nicely with vega-lite.

This would make it straightforward to talk about analysis using observable, or if you understandably aren't crazy about sharing AWS API keys onto thirty platforms, run the checks locally.

https://beta.observablehq.com/@mbostock/exploring-data-with-vega-lite

mrchrisadams commented 5 years ago

It looks like we can use cli table give us a nice table quickly:

https://www.npmjs.com/package/cli-table -

We can also use the same spinner to account for the call taking a while to return

https://www.npmjs.com/package/cli-spinner

mrchrisadams commented 5 years ago

The vega output now is in #3 , so I think @vsmart's PR can resolve this one.