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

# [NAME](#NAME)

gh-issue-artifact-create - Create issue artifacts (preview)

# [SYNOPSIS](#SYNOPSIS)

**gh issue artifact create {&lt;issue-number&gt; | &lt;issue-url&gt;} \[&lt;file&gt;\[#&lt;name&gt;] | &lt;url&gt;]... \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Create one artifact for each file or URL. A text file becomes a document named after the file; add **#&lt;name&gt;** to choose a different name. A **.html** or **.htm** file becomes an HTML document. A URL, or a **.url** Internet Shortcut file, becomes a link; a URL is named after its host.

Artifact names can't contain some characters, such as parentheses. When a file's name has them, they're removed: **[plan (1)](/man/os/gh/plan.1).md** is named **plan 1.md**.

Use **--body** to create a single document from text, or **--body-file** to create one artifact from a file (**-** reads standard input). **--name** sets its name.

Documents are saved as **generic**, and HTML documents as **embedded\_html**. Use **--type** to set the type of every document instead, whatever the file extension. A plan currently behaves the same as a generic document.

# [OPTIONS](#OPTIONS)

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

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

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

Content for a single document

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

Read content for a single artifact from file (use "-" to read from standard input)

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

Name for a single artifact

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

Type for documents: {generic|plan|embedded\_html}

# [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

# [ALIASES](#ALIASES)

gh issue artifact new

# [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)

```
# Create a document from a file
$ gh issue artifact create 142 signin-plan.md
# Create documents from two files, naming the first
$ gh issue artifact create 142 'docs/signin-plan.md#Sign-in plan' oauth-research.md
# Create an HTML document from a file
$ gh issue artifact create 142 menu-prototype.html
# Create a link with a name
$ gh issue artifact create 142 https://github.com/monalisa/monas-cafe/wiki/OAuth-runbook --name 'Staging OAuth runbook'
# Create a document from standard input
$ cat order-sync.log | gh issue artifact create 142 --body-file - --name 'Order sync log'
# Upload an image that the document references
$ gh issue artifact create 142 signin-plan.md --attach ./signin-flow.png
```

# [SEE ALSO](#SEE_ALSO)

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

Oct 2026

---

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