feat: add --json output flag to all commands#18
Open
redwing509 wants to merge 1 commit intoApexOpsStudio:mainfrom
Open
feat: add --json output flag to all commands#18redwing509 wants to merge 1 commit intoApexOpsStudio:mainfrom
redwing509 wants to merge 1 commit intoApexOpsStudio:mainfrom
Conversation
Add --json flag support to add, list, and done commands for machine-readable output. Each command outputs valid, parseable JSON when the flag is present. Changes: - task.py: Add --json argument to all subparsers - commands/add.py: json_output param with structured response - commands/list.py: json_output param with tasks array - commands/done.py: json_output param with task status - test_task.py: 7 new tests for JSON output behavior - README.md: Document --json usage with examples Closes ApexOpsStudio#1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
--jsonflag support to all CLI commands (add,list,done) for machine-readable output, enabling scripting and automation use cases.Changes
--jsonargument to all subparsers, pass through to command functionsjson_outputparam, return structured JSON with success status and task objectjson_outputparam, return tasks array as JSONjson_outputparam, return completion status as JSON--jsonflag usage with examples for all commandsJSON Response Format
All JSON responses follow a consistent envelope:
{"success": true, "message": "...", "task": {...}} {"success": true, "tasks": [...]}Testing
Closes #1