results
results copied to clipboard
[CLI] Feature: improve `tkn-results` user experience
Feature request
Currently, the tkn-results
responses (get result/record/log in particular) are just API responses printed to the terminal.
The response received is printed in JSON format and the important data is encoded. For list
commands, a tabular format is available but nothing for get
.
Instead of displaying the JSON and encoded data, the CLI should print the data in a human-readable form (with proper decoration) and we can have alternate formats as output options.
- For records it is essential that we can directly get the data and not the whole record JSON where user have to manually decode the data.
- For logs, it should be displayed in a plain text, human-readable format (with decoration if possible)
Use case
- When a user runs a
get
sub command to fetch result, record or logs the response is directly consumable by the user rather that requiring further processing - The critical data fields should be printed by default rather than the full JSON, i.e. in records and logs the important field is
data
. - The JSON/YAML output format should be provided as an alternative based on the type of data to be displayed.
Motivation
https://github.com/tektoncd/cli