Open eschwartz opened 4 years ago
By default, all CLI commands should output JSON to stdout.
Currently, we have some commands that don't output valid json, eg:
$ dce leases create ... Lease created: { "accountId": "123456789012", ... }
Other commands print valid JSON, but to stderr, for example, dce leases list
dce leases list
I would like to see some standardization around CLI output formatting.
Ideally, we'd have support for both JSON (computer-readable) and column/text (human-readable) formats.
Users could configure the output format via a --output=json CLI flag, or with a output: json config value in dce.yml
--output=json
output: json
See how AWS controls CLI output formatting: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-output.html
Resolved in v0.5.0
We do not yet have custom formatters, but all commands should be printing valid JSON to stdout
By default, all CLI commands should output JSON to stdout.
Currently, we have some commands that don't output valid json, eg:
Other commands print valid JSON, but to stderr, for example,
dce leases list
I would like to see some standardization around CLI output formatting.
Ideally, we'd have support for both JSON (computer-readable) and column/text (human-readable) formats.
Users could configure the output format via a
--output=json
CLI flag, or with aoutput: json
config value in dce.ymlSee how AWS controls CLI output formatting: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-output.html