GH-PROJECT-ITEM-ADD(1)

πŸ’– gh-project-item-add(1) β€” the GitHub CLI manual, bestie edition πŸŽ€

okay so real talk: this is the gh project item-add page from the GitHub CLI manual, and it's genuinely one of the most useful little gremlins in the whole toolkit. it does exactly one thing and it does it iconically ✨


✨ NAME ✨

gh-project-item-add β€” add a pull request or an issue to a project 🫢

like, you got a PR or an issue just sitting there, not on any project board, looking real lonely? this command is the matchmaker. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

gh project item-add [<number>] [flags]

so it's gh project item-add, then optionally a <number> β€” that's the project number, and it's in square brackets so it's optional, bestie, don't come for me β€” and then whatever [flags] you feel like sprinkling in πŸ’…


🌸 OPTIONS 🌸

okay here's the whole menu, and yes every single one is important, we do not skip flags in this house πŸ’œ

  • --format <string> β€” sets the output format. the only documented value here is {json}, so if you're a machine-readable kinda girlie, this is your moment ✨
  • -q, --jq <expression> β€” filters the JSON output using a jq expression`. very main character, very "i only want three fields out of this". you know the vibes 🧚
  • --owner <string> β€” the login of the owner. and ooh, cute detail: use "@me" for the current user πŸŽ€ (yes, @me is literally the string, keep the quotes, slay)
  • -t, --template <string> β€” formats the JSON output using a Go template. check "gh help formatting" for the deets, iykyk πŸ”₯
  • --url <string> β€” the URL of the issue or pull request you want to add to the project. this is the actual thing you're adding, so like... don't skip it πŸ™ˆ

πŸ’€ EXIT CODES πŸ’€

vibe check on how it went, in number form:

  • 0 β€” successful execution πŸ‘‘ we ate, no crumbs
  • 1 β€” error 😭 it's giving "something went wrong"
  • 2 β€” command canceled πŸ«₯ you (or something) hit stop
  • 4 β€” authentication required πŸ” go log in, bestie
NOTE: specific commands may have additional exit codes. refer to the command's help for more information. so like, always read your own command's help, fr fr πŸ’…

🌈 EXAMPLE 🌈

here's a real one, copy it, love it, run it:

# Add an item to monalisa's project "1"
$ gh project item-add 1 --owner monalisa --url https://github.com/monalisa/myproject/issues/23

see? project number 1, owner monalisa, and boom β€” issue 23 is on the board. iconic behavior, honestly πŸ’–


πŸ“ SEE ALSO πŸ“

  • gh-project(1) β€” the whole gh project family, go say hi to its siblings πŸ¦‹

and that's the whole page!! soooo much love to the fine folks behind this β€” this page is from the GitHub CLI, version v2.102.0, dated Oct 2026 πŸ’œ go forth and add items to projects, you absolute legend 🌟

πŸ“¦ where this page comes from