GH-ISSUE-ARTIFACT-EDIT(1)

πŸ“¦ version 2.103.3, in nixos 26.05, nixpkgs unstable

πŸ’… GH-ISSUE-ARTIFACT-EDIT(1) β€” the GitHub CLI manual, bestie edition πŸŽ€

okay so real talk: this is the manual page for gh-issue-artifact-edit from the GitHub CLI manual. yes it's a preview thing. yes it's iconic. let's go πŸ’–


✨ NAME ✨

gh-issue-artifact-edit β€” edit an issue artifact (preview) πŸ¦‹


🌸 SYNOPSIS 🌸

gh issue artifact edit {<issue> <artifact-number> | <artifact-url>}
[flags]

πŸ’œ DESCRIPTION πŸ’œ

So what does it do? Two jobs, both slay: rename an issue artifact, or replace its content. That's it, that's the whole vibe. 🫢

But here's the thing β€” the type never changes. Not ever. So if you're editing a link, the new content has to be an http(s) URL or a .url Internet Shortcut file. No cap, that's the rule. 😭

You name the artifact one of two ways:

  • by its issue and number, or
  • by its URL.

And <issue> itself? That can be an issue number or an issue URL. Flexible queen behavior tbh πŸ‘‘

More deets:

  • If you use only --attach, the attachments get appended to the current content (not replacing it, bestie β€” appending πŸ’…).
  • With --restore-version, an earlier version's name and content are saved as a new version. And if you wanna see the edit history, that's what gh issue artifact view is for. ⭐

πŸ”₯ OPTIONS πŸ”₯

  • --attach <file> β€” attach an image or video file, in '#' format. drop that media, king πŸŽ€
  • -b, --body <string> β€” new content; and for a link, a URL. so like, the actual new stuff ✨
  • -F, --body-file <file> β€” read new content from a file. and yes, use "-" to read from standard input, iykyk πŸ¦‹
  • --name <string> β€” new name. rebrand yourself πŸ’«
  • --restore-version <number> (default 0) β€” restore the version with this number from the edit history. time travel but make it version control βͺ

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format. yes you can hop repos, main character energy 🌈

🚦 EXIT CODES 🚦

  • 0 β€” successful execution, we ate and left no crumbs πŸ”₯
  • 1 β€” error 😭
  • 2 β€” command canceled πŸ’€
  • 4 β€” authentication required πŸ™ˆ
NOTE: specific commands may have additional exit codes. refer to the command's help for more information. fr fr, go check πŸ‘€

🌟 EXAMPLE 🌟

# Rename an artifact
$ gh issue artifact edit 142 2 --name 'OAuth callback plan v2'

# Replace a document's content with a file
$ gh issue artifact edit 142 2 --body-file 2-OAuth-callback-plan.md

# Point a link at a new URL
$ gh issue artifact edit 142 3 --body https://github.com/monalisa/monas-cafe/wiki/OAuth-runbook-v2

# Append an image to a document
$ gh issue artifact edit 142 2 --attach ./signin-flow.png

# Restore an earlier version
$ gh issue artifact edit 142 2 --restore-version 5

literally just copy these, they work πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹


okay that's the whole page!! mwah πŸ’– this was GitHub CLI 2.103.3, dated Oct 2026 β€” catch you on the next man page, bestie! πŸŽ€βœ¨

πŸ“¦ where this page comes from