aiken-lang / aiken

A modern smart contract platform for Cardano
https://aiken-lang.org
Apache License 2.0
454 stars 84 forks source link

(automatically) provide structured JSON outputs for commands when stdout isn't an ANSI-capable terminal #892

Closed KtorZ closed 4 months ago

KtorZ commented 5 months ago

What is your idea? Provide a use case.

Many (all?) commands return some fancy outputs which look (arguably) good in the terminal. While pretty, this isn't particularly useful for manipulating the output and building tools.

We could instead provide structured JSON outputs for a variety of commands (e.g. aiken check) ready for consumption.

Why is it a good idea?

This enables more tools to rely on the CLI, and open up use cases for automation down the line.

What is the current alternative and why is it not good enough?

Current alternative requires awkward parsing of the output, which may contains color codes and whatnot.