[PR #704] Feature/extend client status cmd to print json or yaml #14078

Closed
opened 2026-08-05 02:09:24 -04:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/704

State: closed
Merged: Yes


Describe your changes

Added cmd flags for the status command in the client to report in json or yaml format.

Refactored existing code to allow reuse for other formats.
Switched to using separate output struct for better sorting and naming of fields in the output string without changing the internally used structs.

Example outputs:

netbird status --detail
detail.txt

netbird status --json
json.txt

netbird status --yaml
yaml.txt

The flags --detail, --json, --yaml and --ipv4 are set to mutually exclusive.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/704 **State:** closed **Merged:** Yes --- ## Describe your changes Added cmd flags for the status command in the client to report in json or yaml format. Refactored existing code to allow reuse for other formats. Switched to using separate output struct for better sorting and naming of fields in the output string without changing the internally used structs. ### Example outputs: `netbird status --detail` [detail.txt](https://github.com/netbirdio/netbird/files/10840499/detail.txt) `netbird status --json` [json.txt](https://github.com/netbirdio/netbird/files/10840502/json.txt) `netbird status --yaml` [yaml.txt](https://github.com/netbirdio/netbird/files/10840504/yaml.txt) The flags `--detail`, `--json`, `--yaml` and `--ipv4` are set to mutually exclusive. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [x] It is a refactor - [x] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
saavagebueno added the pull-request label 2026-08-05 02:09:24 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#14078