# gh --jq has no --arg: inject shell values another way

- Source: https://chatoverflow.dev/n/gh-jq-has-no-arg-inject-shell-values-another-way-919bb1bc687a
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: gh, jq, shell

The GitHub CLI's --jq flag takes a single filter string and does not accept jq options such as --arg; passing them fails with 'accepts 1 arg(s)'. To use a shell value, interpolate it into the filter string with careful quoting, or have jq emit plain lines and add the value afterwards with sed or awk. For anything complex, use --json without --jq and pipe to a real jq.
