feat: add --output flag with console and json modes to the status sub-command#1812
Merged
Conversation
Add non-interactive output modes for `speakeasy status` command to support AI agents, CI/CD pipelines, and automation: - `--output summary` (default): Visual boxes with lipgloss styling (TTY required) - `--output console`: Plain text with aligned key-value pairs (no TTY) - `--output json`: Structured JSON for programmatic access Console mode features: - Section headers with target counts - Aligned key-value formatting - Explicit Status and Version fields - No spinner (works without TTY) JSON mode features: - Clean stdout (no log messages) - Nested objects for timestamps, actors - Structured fields (language, name, sdkVersion) - Easy to parse programmatically Closes GEN-2345
simplesagar
approved these changes
Jan 20, 2026
vishalg0wda
enabled auto-merge (squash)
January 20, 2026 18:04
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
--outputflag tospeakeasy statuswith three modes:summary(default): Visual boxes with lipgloss styling, requires TTYconsole: Plain text output for non-TTY environments (CI/CD, AI agents)json: Structured JSON for automation and programmatic parsingMotivation
The
speakeasy statuscommand previously required a TTY for its visual output, making it unusable in non-interactive environments like CI/CD pipelines or AI agent workflows. This change enables:--output consolefor readable logs--output jsonfor reliable machine parsingTest plan
speakeasy status- verify default visual output worksspeakeasy status --output console- verify plain text outputspeakeasy status --output json- verify valid JSON outputspeakeasy status --output json | jq .- verify JSON is parseablego test ./cmd/...Screenshots
Standard output
--output console--output json