Skip to content

feat(cmd): support --format json in mode show - #141

Merged
Tunechi28 merged 1 commit into
Pikopod:mainfrom
SShogun:fix/mode-show-format-json
Oct 14, 2026
Merged

Tunechi28 merged 1 commit into
Pikopod:mainfrom
SShogun:fix/mode-show-format-json

Conversation

@SShogun

@SShogun SShogun commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Hey maintainers, i'm new to open source - please be easy on me & guide me if i'm wrong

What this changes
Adds --format text|json (defaulting to text) to pikopod mode show <sandbox>. Resolves #84

Why
Previously, mode show only printed human-readable summaries, making it difficult for scripts and CI pipelines to inspect the active mode without directly querying the control plane API.

With --format json, users can now retrieve the structured mode specification directly from the CLI. Unsupported formats are rejected with an actionable error message.

No new test fixtures were needed; the regression test uses the repository's existing test infrastructure.

Testing

  • Verified RED → GREEN regression testing against upstream main.
  • Confirmed JSON output for armed and unarmed modes.
  • Verified invalid format handling.
  • CGO_ENABLED=0 go build ./cmd/pikopod passes.

Checklist

  • go test ./... -count=1 passes
  • gofmt -l cmd internal is empty and go vet ./... is clean
  • No new cgo dependency (the release artifact is a static binary on every platform)
  • Error message strings are unchanged, or the change is deliberate and called out above
  • New test fixtures have an entry in testdata/parity/importer/specs/SOURCES.md
  • No provider payloads, keys, tokens, or customer data in the diff or in test fixtures

Signed-off-by: SShogun <sohamcodes101@gmail.com>
@SShogun
SShogun marked this pull request as ready for review October 14, 2026 08:05
Copilot AI balanced review requested due to automatic review settings October 14, 2026 08:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Tunechi28
Tunechi28 merged commit 11b331b into Pikopod:main Oct 14, 2026
15 of 16 checks passed
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.

mode show --format json

3 participants