Skip to content

feat: Add --json output flag to all commands#25

Open
sofia-willow wants to merge 1 commit intoApexOpsStudio:mainfrom
sofia-willow:feat/json-output
Open

feat: Add --json output flag to all commands#25
sofia-willow wants to merge 1 commit intoApexOpsStudio:mainfrom
sofia-willow:feat/json-output

Conversation

@sofia-willow
Copy link

Summary

Implements the --json output flag requested in #1.

Changes

  • task.py — Added --json global argument
  • commands/add.py — JSON output: {"status": "added", "task": {...}}
  • commands/list.py — JSON output: {"tasks": [...], "count": N}
  • commands/done.py — JSON output: {"status": "done", "task": {...}}
  • test_task.py — Added tests for JSON output on all 3 commands
  • README.md — Updated with JSON examples and scripting usage

Acceptance Criteria

  • All commands support --json flag
  • JSON output is valid and parseable
  • Tests pass with new functionality
  • Documentation updated with examples

Closes #1

Adds a --json flag to add, list, and done commands for scripting
and automation support.

Changes:
- task.py: Added --json global argument, passed to all command functions
- commands/add.py: json_output kwarg, outputs {status, task} JSON
- commands/list.py: json_output kwarg, outputs {tasks, count} JSON
- commands/done.py: json_output kwarg, outputs {status, task} JSON
- test_task.py: Added tests for JSON output on all commands
- README.md: Updated with JSON output examples and scripting usage

All commands produce valid, parseable JSON when --json is passed.
Existing plain-text output is unchanged when flag is omitted.

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