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

# [NAME](#NAME)

gh-issue-artifact-download - Download issue artifacts (preview)

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

Download issue artifacts to files. Without artifact numbers, every artifact on the issue is downloaded. Artifacts can also be named by their URLs, which must all be on one issue. **&lt;issue&gt;** is an issue number or URL.

Each file is named **&lt;number&gt;-&lt;name&gt;**. Markdown documents end in **.md**, HTML documents in **.html**, and links are saved as **.url** Internet Shortcut files. If a file already exists, that artifact fails unless you use **--clobber** to overwrite it or **--skip-existing** to skip it.

Use **--dir** to choose the directory to download files into, **--output** to choose the path for a single artifact, or **--output -** to print its content. Use **--version** with a single artifact to download an earlier version from its edit history.

# [OPTIONS](#OPTIONS)

[**--clobber**](#clobber)

Overwrite existing files of the same name

[**-D**, **--dir** **&lt;directory&gt; (default ".")**](#D)

The directory to download files into

[**-O**, **--output** **&lt;file&gt;**](#O)

The file to write a single artifact to (use "-" to write to standard output)

[**--skip-existing**](#skip_existing)

Skip downloading when files of the same name exist

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

Download 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)

```
# Download every artifact on issue 142
$ gh issue artifact download 142
# Download two artifacts into a folder
$ gh issue artifact download 142 2 5 --dir notes
# Print one artifact's content
$ gh issue artifact download 142 2 --output -
# Download an earlier version of one artifact
$ gh issue artifact download 142 2 --version 5
```

# [SEE ALSO](#SEE_ALSO)

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

Oct 2026

---

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