> ## Documentation Index
> Fetch the complete documentation index at: https://platform.atlan.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on Atlan objects, use the Atlan MCP server at https://api.atlan.com/mcp or the atlanai CLI; `atlanai --map json` prints its command map. Run a read-only identity check before any write.
> The docs MCP server at /mcp searches these docs only. It cannot read or change Atlan objects.
> SDK packages: Python `atlanai` (PyPI) and TypeScript `@atlanai/sdk` (npm). Show Python first, then TypeScript.

# Download files

> Download the current or a specific version of a file artifact from the terminal.

Download writes the stored binary to a local file or to stdout. Binary content is not printed to an interactive terminal — use `--output` to write to a local file, or pipe stdout to another command. Downloads stop at 64 MiB.

## Before you start

* Confirm the CLI is installed and `atlanai doctor` passes. See [Install atlanai CLI](/tools/cli/how-tos/install).
* Confirm `atlanai auth status` shows the expected account.
* Confirm an active workspace context is set by running `atlanai context show`.
* Confirm the file ID with `atlanai file list` or `atlanai file get`. Use version numbers from `atlanai file versions file_123` when downloading a specific version.

## Download current version

Writes the latest published version to a local file.

```bash theme={null}
atlanai file download file_123 --output ./report.pdf
```

## Download specific version

Writes the specified version to a local file. Get the version number from `atlanai file versions file_123`.

```bash theme={null}
atlanai file download file_123 --version 2 --output ./report-v2.pdf
```

## Troubleshooting

For output errors, size limit issues, or missing versions, see [File operation errors](/tools/cli/troubleshooting/file-operation-errors).

## Next steps

* [Archive files](/tools/cli/how-tos/files-archive): Remove a file from default discovery when it is no longer needed.

## See also

* [Find and inspect files](/tools/cli/how-tos/files-inspect): Confirm the file ID and available versions before downloading.
* [Upload files](/tools/cli/how-tos/files): Upload a new version of the file.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.