Skip to content

feat(cli): add structured output to list commands - #3067

Merged
mrunalp merged 1 commit into
NVIDIA:mainfrom
mrunalp:3066-structured-list-output/mrunalp
Sep 1, 2026
Merged

feat(cli): add structured output to list commands#3067
mrunalp merged 1 commit into
NVIDIA:mainfrom
mrunalp:3066-structured-list-output/mrunalp

Conversation

@mrunalp

@mrunalp mrunalp commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add consistent table, json, and yaml output to forward list and the remaining literal list commands so automation can consume typed records without parsing human-oriented tables. Existing table output remains the default and retains its current behavior.

Related Issue

Closes #3066

Changes

  • Add -o/--output <table|json|yaml> to service, policy, attached-provider, workspace-member, and forward lists.
  • Return typed, empty structured collections without ANSI styling or prose; preserve full policy metadata and normalized service URLs.
  • Keep attached-provider output secret-safe by exposing only sorted credential and config key names.
  • Add CLI parsing, serializer, secret-safety, table-compatibility, empty-collection, and forward integration coverage.
  • Update published CLI documentation and the openshell-cli skill reference.

Testing

  • mise run pre-commit passes
  • cargo test -p openshell-cli passes after rebase (446 passed, 2 existing ignored tests, 0 failed)
  • Unit tests added/updated
  • CLI integration tests added/updated
  • mise run docs passes (0 errors)
  • E2E tests not applicable; this changes client-side rendering only and does not change gateway or sandbox behavior

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs not applicable; command behavior is documented in the published CLI pages and skill reference

@mrunalp
mrunalp requested review from a team, derekwaynecarr and sjenning as code owners August 31, 2026 23:12
@mrunalp mrunalp added the area:cli CLI-related work label Aug 31, 2026
@copy-pr-bot

copy-pr-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
@mrunalp
mrunalp force-pushed the 3066-structured-list-output/mrunalp branch from c04cfb2 to 440e90b Compare September 1, 2026 01:31
@mrunalp

mrunalp commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 440e90b

@mrunalp
mrunalp added this pull request to the merge queue Sep 1, 2026
Merged via the queue into NVIDIA:main with commit d5742e0 Sep 1, 2026
56 checks passed
@mrunalp
mrunalp deleted the 3066-structured-list-output/mrunalp branch September 1, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli CLI-related work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): add structured output to remaining list commands

2 participants