gh-issue-artifact-create(1)

gh-issue-artifact-create1

Create issue artifacts (preview)

Usage

gh issue artifact create {<issue-number> | <issue-url>} [{<file> [#<name>] | <url>}] ... [flags]

Overview

Create one artifact for each file or URL. A text file becomes a document named after the file; add #<name> 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).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

--attach <file>

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

-b, --body <string>

Content for a single document

-F, --body-file <file>

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

--name <string>

Name for a single artifact

--type <string>

Type for documents: {generic|plan|embedded_html}

Options inherited from parent commands

-R, --repo <[HOST/]OWNER/REPO>

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

Aliases

gh issue artifact new

Exit status

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.

Examples

# 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

From github-cli 2.103.3-1 in Arch Linux 2026-11-07. Parsed by carta from the page's man source.