GH-ISSUE-ARTIFACT-EDIT(1)
π 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 whatgh issue artifact viewis 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>(default0) β 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/REPOformat. 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 π¦
gh-issue-artifact(1)β the parent command, go say hi π«Ά
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
- nixos 26.05: gh 2.103.3
- nixpkgs unstable: gh 2.103.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms