Skip to content

Add JSON output mode#92

Open
darshan-Jahagirdar wants to merge 1 commit into
ApexOpsStudio:mainfrom
darshan-Jahagirdar:codex/json-output-format
Open

Add JSON output mode#92
darshan-Jahagirdar wants to merge 1 commit into
ApexOpsStudio:mainfrom
darshan-Jahagirdar:codex/json-output-format

Conversation

@darshan-Jahagirdar
Copy link
Copy Markdown

@darshan-Jahagirdar darshan-Jahagirdar commented May 13, 2026

Fixes #1.

Changes

  • Added --json to add, list, and done commands.
  • add --json prints the created task object.
  • list --json prints an array of tasks, or [] when empty.
  • done --json prints the updated task object, or an error object when no tasks exist.
  • Added README examples for JSON output.

Verification

  • python -m pytest test_task.py -> 4 passed
  • CLI smoke test with a temporary home directory:
    • python task.py add "Buy groceries" --json
    • python task.py list --json
    • python task.py done 1 --json

/claim #1

@darshan-Jahagirdar
Copy link
Copy Markdown
Author

Validation update for this PR:

ext py -3.11 -B -m pytest test_task.py git diff --check

Result: 4 tests passed and the diff whitespace check passed. I installed pytest into a temporary test-only directory for this run and removed it afterward.

@darshan-Jahagirdar darshan-Jahagirdar mentioned this pull request May 13, 2026
4 tasks
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