Skip to content

Enable output to both JSON and CLI #931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zyrxvo
Copy link

@zyrxvo zyrxvo commented Aug 8, 2025

Context:
The CLI output, especially with the --reduced-profile flag, provides concise, actionable, and human readable information for improving and optimizing code. Additionally, the JSON output provides verbose details, perfect to use for machine-automated interpretation and analysis of the results.

Changes:
This PR enables the ability to save both the CLI output and the JSON output from the same profile when both the --cli and --json flags are used in conjunction with --outfile.

Drawbacks:
If both the --cli and --json are used and --outfile is not used, then both the JSON and the CLI output are printed to STDOUT. This is clunky, but would be the expected behaviour if --outfile is not used and --cli is specified.

Comments:
I understand that the default behaviour is to produce a JSON file and a human readable HTML file. The change in this PR reflects the desire to provide the option of having the human readable profile as a text file, rather than an HTML.

Signed-off-by: Garett Brown <garett.brown@xanadu.ai>
@emeryberger
Copy link
Member

Please address the CI issues above, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants