Support `--format` for all commands
- default is human readable (
--format=human) - This is the one with tables, colors, indentation...
-
--format=jsonfor most commands -
--format=[FOO]for specific formats- example
clever addon env --format=bash
- example
For our JSON keys we currently use a lowerCamelCase
remaining commands:
- [ ]
activity - [ ]
config - [ ]
diag - [ ]
drain - [ ]
env - [ ]
notify-email - [ ]
profile - [ ]
published-configs - [ ]
service - [ ]
status - [ ]
tcp-redirs - [ ]
webhooks
some commands support the --json/-j option. For them, we should make a smooth transition to --format/-F option. We may support both, but one day, we will remove the --json/-j option:
- [ ]
applications - [ ]
ng/networkgroups
About json format and follow behavior.
In some commands, we can follow. for instance in log command when no since is specified. or in activity command.
In log command, there is json-stream format.
In activity command, the json format is not yet supported.
I propose to get rid of json-stream format and simplify into:
command doesn't imply follow, format is human:
output line 1
output line 2
command doesn't imply follow, format is json:
[
{"output": "line 1"},
{"output": "line 2"}
]
command implies follow, format is human:
output line 1
output line 2
...
command implies follow, format is json:
{"output": "line 1"}
{"output": "line 2"}
...