Skip to content

Add --json output format to all CLI commands#106

Open
lout33 wants to merge 2 commits into
ApexOpsStudio:mainfrom
lout33:add-json-output
Open

Add --json output format to all CLI commands#106
lout33 wants to merge 2 commits into
ApexOpsStudio:mainfrom
lout33:add-json-output

Conversation

@lout33
Copy link
Copy Markdown

@lout33 lout33 commented May 16, 2026

Summary

Add --json flag to add, list, and done commands for scripting and automation.

Changes

  • Add --json argument to all three subcommands in task.py
  • add --json task: outputs JSON with id, description, done
  • list --json: outputs JSON with tasks array
  • done --json 1: outputs JSON with updated task
  • All JSON output is valid and parseable
  • Add tests for JSON output on all three commands

Testing

pytest test_task.py -v
# 11 passed

Closes #1

Make Studio added 2 commits May 16, 2026 01:31
- Create utils/validation.py with shared validate_description, validate_task_id, validate_task_file
- Create utils/paths.py with shared get_tasks_file and get_config_path
- Remove duplicated get_tasks_file and validation logic from add.py, list.py, done.py
- Update commands to import from utils modules
- Update tests to cover utils modules and verify refactoring

Closes ApexOpsStudio#3
- Add --json flag to add, list, and done commands
- JSON output is valid and parseable for all operations
- Add tests for JSON output on all three commands
- Update README with JSON examples

Closes ApexOpsStudio#1
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.

Add --json output format

1 participant