Skip to content

feat: Add opt-in pretty formatting for jq output - #116

Open
Aditya030207 wants to merge 2 commits into
Flagsmith:mainfrom
Aditya030207:fix/jq-pretty-output
Open

Aditya030207 wants to merge 2 commits into
Flagsmith:mainfrom
Aditya030207:fix/jq-pretty-output

Conversation

@Aditya030207

Copy link
Copy Markdown
Contributor

Closes #78.

Add --jq-pretty for reading or saving structured results from --jq, for example:

flagsmith api api/v1/organisations/ --jq '.results' --jq-pretty

The option indents each structured result by two spaces. The existing compact output remains the default, and string results still print raw. The shared renderer covers regular output, the raw API command, and environment documents.

Verified with go test -race ./... and the docs generator. Added tests for multiple jq results and for flag propagation through the API command.

This contribution was prepared with AI coding assistance.

@Aditya030207
Aditya030207 requested a review from a team as a code owner November 24, 2026 05:35
@Aditya030207
Aditya030207 requested review from khvn26 and a balanced review from Copilot and removed request for a team November 24, 2026 05:35

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 insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Aditya030207 Aditya030207 changed the title Add opt-in pretty formatting for jq output feat: add opt-in pretty formatting for jq output Nov 24, 2026

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 7 files

Reply to a comment to ask cubic a question or push back. It learns from your replies.

Re-trigger cubic

Comment thread internal/cmd/cmd_test.go Resolved
Comment thread internal/output/output_test.go Resolved

@cubic-dev-ai cubic-dev-ai Bot 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.

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval skipped because this PR is from an external contributor.

Re-trigger cubic

@Aditya030207 Aditya030207 changed the title feat: add opt-in pretty formatting for jq output feat: Add opt-in pretty formatting for jq output Nov 25, 2026

This branch has not been deployed

No deployments
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.

--jq doesn't pretty-print the results

2 participants