IntersectMBO / IntersectMBO/cardano-cli
[FR] - Make output of CLI commands consistent.
- Dominant language
- Haskell
- Stars
- 71
- Forks
- 24
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 14
Description
**Internal/External**
*Internal* if an IOHK staff member.
**Area**
*Other* Any other topic (Delegation, Ranking, ...).
**Describe the feature you'd like**
Currently the output format of the CLI commands may depend on multiple things and sometimes is not deterministic. This may surprise the users and lead to a poor user experience (like in https://github.com/IntersectMBO/cardano-cli/pull/537 ).
An example is `cardano-cli conway query ledger-state`: https://github.com/IntersectMBO/cardano-cli/blob/17355f3e86dba264ca85389c491e561b2a07cafe/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs#L903
where the output format depends on where you would like to send it (binary CBOR for file, json for stdout) and if there was and error when decoding it (plain CBOR when error occurred during CBOR deserialization into JSON).
A one way to make it consistent across the whole CLI is to use similar output flags to `transaction-view` like in https://github.com/IntersectMBO/cardano-cli/pull/523.
Contributor guide
Assessment
This issue has not been assessed yet.