Open dcupp opened 1 year ago
We'd like to have a --json
flag for all CLI commands which should cover this by outputting content in parsable JSON. I'd prefer the implementation be reusable across all of our CLI commands somehow. This will require some refactoring but I'm not opposed to a community contribution if it's done well.
A --json
flag sounds like a great idea but doesn't really help my use case. I think filtering everything through jq
first would be more onerous than writing my own CLI client.
[EDIT]
If you did that, maybe a more generic --output-format json|yaml|hocon|csv
would be helpful
First check
Prefect Version
2.x
Describe the current behavior
The prefect command line interface outputs information in a way that makes it difficult to use with commands like
grep
,sed
andawk
.If I run a command like
prefect deployment ls
, the command outputs two columns of information, but:Describe the proposed behavior
It would be great if there was an ENV var, or preferably a command line flag, that would turn off all of the fancy output, color codes, graphical characters, header/divider rows, and line truncation.
Example Use
I think a short flag would be best, like
-b
for batch mode or-q
for quiet:Or an env var:
Additional context
I can provide an example use case: deleting deployments with a certain name, something like:
There may be a better way to delete deployments that start and end with a certain string; I just made that up as an example.