Skip to content

Conversation

@JoshuaBatty
Copy link
Collaborator

@JoshuaBatty JoshuaBatty commented Dec 18, 2025

Adds a --json-output flag to write structured, machine-readable JSON output to disk. Supported commands: deploy, upgrade, run, execute, test, query, and synthesize.

Usage

# Save JSON to default location (build/json-outputs/<command>.json)
leo deploy --json-output

# Save JSON to custom path
leo execute main --json-output=my-results.json

Default output location

JSON files are saved to build/json-outputs/ by default:

  • build/json-outputs/deploy.json
  • build/json-outputs/execute.json
  • build/json-outputs/run.json
  • etc.

Closes #29011

Related docs: ProvableHQ/leo-docs-source#558

@JoshuaBatty JoshuaBatty self-assigned this Dec 18, 2025
@JoshuaBatty JoshuaBatty added the 🖥️ CLI Anything related to the Leo CLI. label Dec 18, 2025
@JoshuaBatty JoshuaBatty marked this pull request as draft December 18, 2025 00:08
@JoshuaBatty JoshuaBatty force-pushed the josh/json-cli branch 2 times, most recently from da136fd to 561dba3 Compare December 18, 2025 00:14
@JoshuaBatty JoshuaBatty changed the title Add --json flag for machine-readable CLI output Add --json flag for machine-readable CLI output Dec 18, 2025
@JoshuaBatty JoshuaBatty force-pushed the josh/json-cli branch 2 times, most recently from 9e8fb4a to 5c67292 Compare December 19, 2025 01:06
@JoshuaBatty JoshuaBatty requested a review from a team December 19, 2025 01:30
@JoshuaBatty JoshuaBatty marked this pull request as ready for review December 19, 2025 01:30
Copy link
Collaborator

@mitchmindtree mitchmindtree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor optional changes, otherwise lgtm

Copy link
Collaborator

@mohammadfawaz mohammadfawaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! Just a few comments.

@JoshuaBatty JoshuaBatty marked this pull request as draft January 5, 2026 04:56
@JoshuaBatty JoshuaBatty force-pushed the josh/json-cli branch 3 times, most recently from 3b388e7 to f04f035 Compare January 7, 2026 03:38
@JoshuaBatty JoshuaBatty changed the title Add --json flag for machine-readable CLI output Add --json-output flag to save structured CLI output to disk Jan 7, 2026
@JoshuaBatty JoshuaBatty changed the title Add --json-output flag to save structured CLI output to disk Add --json-output flag to save structured CLI output to disk Jan 7, 2026
@JoshuaBatty JoshuaBatty force-pushed the josh/json-cli branch 2 times, most recently from 2ccaa66 to a71fd5b Compare January 8, 2026 22:21
@JoshuaBatty JoshuaBatty marked this pull request as ready for review January 8, 2026 22:22
Adds machine-readable JSON output for deploy, upgrade, run, execute, test, query, and synthesize commands. JSON files are saved to build/json-outputs/ by default.

Closes #29011
@JoshuaBatty
Copy link
Collaborator Author

Thanks for the feedback @mohammadfawaz! You can now see the json outputs for each CLI tool in the expectations.

Think I've captured everything, let me know if you're happy with this or if there is something I've missed. Thanks.

Copy link
Collaborator

@mohammadfawaz mohammadfawaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! This all looks reasonable. Thanks!

@JoshuaBatty JoshuaBatty merged commit 9cbe844 into master Jan 9, 2026
5 checks passed
@JoshuaBatty JoshuaBatty deleted the josh/json-cli branch January 9, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🖥️ CLI Anything related to the Leo CLI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] JSON output mode for Leo CLI commands

4 participants