Skip to content

Add json input support for script arguments#20

Draft
BlakeASmith wants to merge 1 commit intomainfrom
cursor/add-json-input-support-for-script-arguments-0a93
Draft

Add json input support for script arguments#20
BlakeASmith wants to merge 1 commit intomainfrom
cursor/add-json-input-support-for-script-arguments-0a93

Conversation

@BlakeASmith
Copy link
Contributor

Add JSON input support via --json-input option and stdin to provide an alternative, structured way to pass arguments to Argorator scripts.


Open in Cursor Open in Web

Co-authored-by: blakeinvictoria <blakeinvictoria@gmail.com>
@cursor
Copy link

cursor bot commented Aug 26, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bugbot free trial expires on September 9, 2025
Learn more in the Cursor dashboard.

else:
# If provided as a single scalar, still accept
argv.append(str(value))
return argv
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: JSON to CLI Argument Conversion Errors

The _json_obj_to_argv function has two issues converting JSON input to CLI arguments. It fails to retrieve varargs (e.g., ARGS) if their JSON key uses mixed casing. Additionally, when JSON omits some positional arguments, the generated CLI arguments become misaligned, causing argparse to assign values incorrectly or report missing arguments.

Fix in Cursor Fix in Web

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.

2 participants