Skip to content

feat: --json output for rp flash deploy and dev - #557

Open
lukepiette wants to merge 1 commit into
feat/apps-sdkfrom
feat/flash-json-output
Open

feat: --json output for rp flash deploy and dev#557
lukepiette wants to merge 1 commit into
feat/apps-sdkfrom
feat/flash-json-output

Conversation

@lukepiette

Copy link
Copy Markdown
Contributor

Summary

  • Adds a --json flag to rp flash deploy and rp flash dev so agents and CI can consume a stable machine-readable contract instead of scraping rich-rendered text
  • With --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?"}}
    • failures → {"ok": false, "error": "..."} on stdout with the existing non-zero exit code
  • dev --json requires --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---once guard
  • Full tests/test_cli + tests/test_apps suites pass (606 passed)

🤖 Generated with Claude Code

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-ai

capy-ai Bot commented Jul 28, 2026

Copy link
Copy Markdown

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.

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.

1 participant