GH-ISSUE-ARTIFACT-EDIT(1) GitHub CLI manual GH-ISSUE-ARTIFACT-EDIT(1)

# [NAME](#NAME)

gh-issue-artifact-edit - Edit an issue artifact (preview)

# [SYNOPSIS](#SYNOPSIS)

**gh issue artifact edit {&lt;issue&gt; &lt;artifact-number&gt; | &lt;artifact-url&gt;} \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Rename an issue artifact or replace its content. The type never changes, so a link's new content must be an http(s) URL or a **.url** Internet Shortcut file.

Name the artifact by its issue and number, or by its URL. **&lt;issue&gt;** is an issue number or URL.

With only **--attach**, the attachments are appended to the current content.

With **--restore-version**, an earlier version's name and content are saved as a new version. **gh issue artifact view** shows the edit history.

# [OPTIONS](#OPTIONS)

[**--attach** **&lt;file&gt;**](#attach)

Attach an image or video file, in '#' format

[**-b**, **--body** **&lt;string&gt;**](#b)

New content; for a link, a URL

[**-F**, **--body-file** **&lt;file&gt;**](#F)

Read new content from file (use "-" to read from standard input)

[**--name** **&lt;string&gt;**](#name)

New name

[**--restore-version** **&lt;number&gt; (default 0)**](#restore_version)

Restore the version with this number from the edit history

# [OPTIONS INHERITED FROM PARENT COMMANDS](#OPTIONS_INHERITED_FROM_PARENT_COMMANDS)

[**-R**, **--repo** **&lt;\[HOST/\]OWNER/REPO&gt;**](#R)

Select another repository using the \[HOST/]OWNER/REPO format

# [EXIT CODES](#EXIT_CODES)

0: Successful execution

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.

# [EXAMPLE](#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
```

# [SEE ALSO](#SEE_ALSO)

[**gh-issue-artifact(1)**](/man/os/gh/gh-issue-artifact.1)

Oct 2026

---

Document: gh-issue-artifact-edit(1) from gh 2.103.0-r0 (Chainguard OS)
Source: https://github.com/cli/cli
