Skip to content

feat(cli): add --format option for YAML/CSV output across all commands#39

Merged
kaincenteno merged 1 commit into
mainfrom
yaml-fun
Jul 13, 2026
Merged

feat(cli): add --format option for YAML/CSV output across all commands#39
kaincenteno merged 1 commit into
mainfrom
yaml-fun

Conversation

@kaincenteno

Copy link
Copy Markdown
Owner

Replace the previous hardcoded CSV-only output with a configurable --format option (default: yaml) on every CLI command. Extract the repetitive output logic into a shared _output() helper.

Changes:

  • Add _output() helper function that handles both YAML and CSV output
  • Add --format option (yaml|csv) to all 12 commands: devices, device, apple-care-coverage, mdm-servers, mdm-server, mdm-server-assigned, assign-device, unassign-device, audit-events, users, user
  • Replace direct pd.DataFrame.to_csv() calls with _output() throughout
  • Add pyyaml to dependencies in pyproject.toml and requirements.txt

Replace the previous hardcoded CSV-only output with a configurable
--format option (default: yaml) on every CLI command. Extract the
repetitive output logic into a shared _output() helper.

Changes:
- Add _output() helper function that handles both YAML and CSV output
- Add --format option (yaml|csv) to all 12 commands: devices, device,
  apple-care-coverage, mdm-servers, mdm-server, mdm-server-assigned,
  assign-device, unassign-device, audit-events, users, user
- Replace direct pd.DataFrame.to_csv() calls with _output() throughout
- Add pyyaml to dependencies in pyproject.toml and requirements.txt
@kaincenteno
kaincenteno merged commit 5225a5d into main Jul 13, 2026
1 check passed
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.

1 participant