<@ULVA73B9P> I’m too lazy to google does the prefe...
# ask-marvin
s
@Marvin I’m too lazy to google does the prefect cli offer the option to output json instead of formatted text?
m
The provided excerpt does not include specific details on whether the Prefect CLI offers an option to output in JSON format instead of formatted text. It does mention various developer tooling commands but lacks information regarding the output formats of the CLI. If you're looking for an option to output JSON from the Prefect CLI, I can further search the Prefect documentation or issue tracker to find more detailed information. Would you like me to do that?
s
yes please
n
@Marvin yes please
m
The excerpts from the Prefect documentation did not provide any information on whether the Prefect CLI has an option to output in JSON format. The provided details discuss various configuration settings and how to use the
prefect config
CLI command to view, set, and unset these settings, but there is no mention of JSON output capabilities. To obtain a definitive answer, I will search the Prefect GitHub repository for any issues or discussions related to the CLI's ability to output JSON. Please hold on while I perform the search. I found a relevant issue on the Prefect GitHub repository where a user has requested a feature that would add a "batch mode" or "plain output feature" to the Prefect CLI to make it more compatible with command-line tools like
grep
,
sed
, and
awk
. However, they did not specifically ask for JSON output, but for a more easily parsable output in general. The issue is titled "Add a batch mode / plain output feature to the command line interface" and describes the problems with the current output format of the Prefect CLI, including the use of special characters for graphics, header lines, and terminal width detection causing truncation. The proposed feature would include a command-line flag or an environment variable to turn off all the fancy output and possibly allow for plain text output, which would make it easier to use in scripts. However, the acceptance and implementation status of this feature are not clear from the issue alone. There is no definitive evidence from this search that the Prefect CLI currently supports JSON output. If you need this feature for a specific use case or integration, it would be a good idea to follow up on this GitHub issue or create a new feature request in the Prefect repository to express your need for JSON output from the CLI.