cli / cli

GitHub’s official command line tool

Home Page:https://cli.github.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`gh api` raw data parameter

mtfurlan opened this issue · comments

Describe the feature or problem you’d like to solve

I would like to pass a raw json body to gh api because the -f/-F interface feels very clunky to me

I'm not interested in converting it from json to some custom format, I would like to take the json from a query so I have the format, modify it, and send it back

It's frustrating and feels wrong that when looking at the github api documentation the curl examples are much easier to understand than the gh api examples

Process substitution(gh api ... --input <(echo "$data") or stdin(echo "$data" | gh api ... --input -) work, but they're annoying

Proposed solution

Add -d, --data <data>, like curl, for a normal json string body

Additional context

other people feel the same that json is easier