Skip to content

feat(stack): add -ojson and --quiet machine-readable output to stack deploy#1796

Merged
gandie merged 3 commits into
masterfrom
copilot/fix-stack-deploy-output
May 11, 2026
Merged

feat(stack): add -ojson and --quiet machine-readable output to stack deploy#1796
gandie merged 3 commits into
masterfrom
copilot/fix-stack-deploy-output

Conversation

Copilot AI commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #1788

mw stack deploy was not usable in automation contexts:

  • Running with --quiet printed a human-readable success message instead of a stable identifier, making it impossible to capture the stack ID in a script.
  • Running with -ojson returned an error (Nonexistent flag: -ojson) because the output flag was not wired up for this command.

Changes

  • --quiet now outputs only the stack ID, so it can be captured with STACK_ID=$(mw stack deploy ...).
  • -ojson now returns the full stack definition as a JSON object via the existing JSONView component.
  • Removed the custom run() override that wrote JSON directly to stdout; JSON rendering is now handled in render() like every other command, keeping the implementation consistent with the rest of the CLI.
  • The process renderer is silenced when -ojson is active (in addition to --quiet) so no progress output leaks into the JSON stream.

Agent-Logs-Url: https://github.com/mittwald/cli/sessions/30f15eeb-5504-4d58-a256-8355d012e3ef

Co-authored-by: martin-helmich <2538958+martin-helmich@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix stack deploy output to be machine readable feat(stack): add -ojson and --quiet machine-readable output to stack deploy Apr 29, 2026
Copilot AI requested a review from martin-helmich April 29, 2026 07:11
Comment thread src/commands/stack/deploy.tsx Outdated
Comment thread src/commands/stack/deploy.tsx Outdated
Agent-Logs-Url: https://github.com/mittwald/cli/sessions/c113929c-6dfd-4852-b7a7-154836ffb23c

Co-authored-by: martin-helmich <2538958+martin-helmich@users.noreply.github.com>

@gandie gandie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested, works. LGTM

@gandie gandie dismissed martin-helmich’s stale review May 11, 2026 08:32

Items from review have been fixed, also did manual test.

@gandie gandie merged commit 431f1ea into master May 11, 2026
14 checks passed
@gandie gandie deleted the copilot/fix-stack-deploy-output branch May 11, 2026 08:33
mittwald-machine added a commit that referenced this pull request May 11, 2026
# [1.16.0](v1.15.0...v1.16.0) (2026-05-11)

### Features

* **stack:** add `-ojson` and `--quiet` machine-readable output to `stack deploy` ([#1796](#1796)) ([431f1ea](431f1ea)), closes [#1788](#1788)
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.

stack deploy-return not machine readable

3 participants