Conversation
Three tests in root_test.go still asserted the old `name (key)` bullet format, but the toggle-on command now passes ResourceName: "flags" which triggers key-value output. Update to match the actual output shape. Made-with: Cursor
Remove the standalone `fields []string` positional parameter from CmdOutput and pass fields exclusively through CmdOutputOpts.Fields. This eliminates the dual-path API and simplifies every call site. Also emit a stderr warning when --fields is used with plaintext output, since the flag is silently ignored in that mode. Made-with: Cursor
…ELOG Add entries for the error JSON shape change (new statusCode/suggestion fields, message casing) and the plaintext table format change. Both are breaking changes that should be called out for v3.0. Made-with: Cursor
The API already supports dryRun as a query parameter on PATCH /api/v2/flags. The auto-generated `flags update` command exposes it, but the hand-rolled toggle and archive commands passed nil for query params. This wires --dry-run through to MakeRequest on all three. Also adds a Query field to MockClient so tests can verify query params. Made-with: Cursor
Copy-paste error had both dry-run subtests invoking toggle-on instead of toggle-off, so toggle-off's --dry-run path was never exercised. Made-with: Cursor
Add "markdown" alongside "json" and "plaintext" as accepted values for the --output flag. Update validation, help text, and related tests. Made-with: Cursor
Implement markdown formatting for singular and list responses: - Flags get a rich view with environment status table and metadata - Known resources use GFM tables for lists, key-value bullets for detail - Unknown resources fall back to headings / bullet lists - Extract paginationSuffix helper to share between plaintext and markdown Made-with: Cursor
Cover --output markdown through archive, toggle-on, and toggle-off command tests to verify end-to-end markdown rendering. Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 454b585. Configure here.
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: nieblara <17378597+nieblara@users.noreply.github.com>
ari-launchdarkly
left a comment
There was a problem hiding this comment.
Did we add markdown as an output? We should test that too if we can. It looks like it was added to the description but I'm not sure if that's just a change to align it to reality
Resolved in 36e0576. The conflicts were in |
ah @ari-launchdarkly seems like we had a few conflicts that i needed to resolve before the updated diff showed up for you - so i think its good for you to check out again! the changes here should include the markdown output |
|
@copilot would you mind reviewing this PR? |
| var sb strings.Builder | ||
| sb.WriteString("| ") | ||
| sb.WriteString(strings.Join(headers, " | ")) | ||
| sb.WriteString(" |\n| ") | ||
| sb.WriteString(strings.Join(separators, " | ")) | ||
| sb.WriteString(" |") |
There was a problem hiding this comment.
is there any value to us having a utility to build this out? Just curious, not asking for a change
There was a problem hiding this comment.
right now, just dont see the need for a dependency for something im not sure will change often yet - but ill keep an eye out for something suitable!
| for _, item := range items { | ||
| vals := make([]string, len(cols)) | ||
| for i, col := range cols { | ||
| vals[i] = escapeMDPipe(colValue(item, col)) |
There was a problem hiding this comment.
do we need error handling here?
There was a problem hiding this comment.
a good idea - deferring to a future pr

Summary
markdownas a valid--outputkind alongsidejsonandplaintextpaginationSuffixhelper to share between plaintext and markdown pathsTest plan
internal/outputtests passmarkdown_test.go)CmdOutputfor singular, list, pagination, empty, and unknown resource cases (resource_output_test.go)archive,toggle-on,toggle-offwith--output markdownMade with Cursor
Note
Medium Risk
Adds a new output mode that changes user-visible formatting paths across many commands; risk is mainly in rendering/edge cases (pagination, empty lists) rather than data or auth logic.
Overview
Adds
markdownas a supported--outputkind (alongsidejson/plaintext) and updates CLI/config help + validation error messages accordingly.Implements GitHub-flavored markdown rendering for resource output: tables for lists, bullet key/value blocks for singular resources, and a richer flag view with an environments status table and extra metadata. Refactors pagination formatting into a shared
paginationSuffixhelper and extends command/unit tests to cover markdown output and edge cases (empty results, unknown resources, pagination,--fieldsignored outside JSON).Reviewed by Cursor Bugbot for commit 36e0576. Bugbot is set up for automated code reviews on this repo. Configure here.