OS Manuals

gh-issue-artifact-create(1)

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

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

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

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

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.

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

Content for a single document

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

Name for a single artifact

Type for documents: {generic|plan|embedded_html}

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

gh issue artifact new

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.

# 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

gh-issue-artifact(1)

Oct 2026

gh 2.103.3-r0 · os · ingested 2026-10-28