feat: --json output for rp flash deploy and dev - #557
Open
lukepiette wants to merge 1 commit into
Open
Conversation
Agents and CI need a stable machine-readable contract from the flash lifecycle commands instead of scraping rich-rendered text. With --json, human-facing output moves to stderr and the final line of stdout is a JSON summary: deployed endpoints with ids/urls per app, built artifact paths, or the dev --once resource table and entrypoint verdict. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
Capy auto-review is paused for this organization because the usage-cycle auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--jsonflag torp flash deployandrp flash devso agents and CI can consume a stable machine-readable contract instead of scraping rich-rendered text--json, human-facing rich output moves to stderr and the final line of stdout is a JSON summary:deploy→{"ok": true, "command": "deploy", "apps": [{"app", "env", "elapsed_s", "endpoints": {name: {"id", "url"}}}]}deploy --build-only→{"ok": true, "command": "build", "artifacts": [{"app", "path", "size_bytes"}]}dev --once→{"ok", "command": "dev", "module", "apps", "resources": [{"name", "kind", "hardware", "endpoint_id"}], "entrypoint": {"name", "ok", "elapsed_s", "error?"}}{"ok": false, "error": "..."}on stdout with the existing non-zero exit codedev --jsonrequires--once(an interactive loop has no single summary to emit)Test plan
tests/test_cli/test_deploy_command.py— 10 new tests covering deploy/build/dev success, engine errors, discovery errors, multi-app, and the--json-requires---onceguardtests/test_cli+tests/test_appssuites pass (606 passed)🤖 Generated with Claude Code