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

# Work with files from the CLI

> List, upload, download, version, and archive file artifacts.

File commands use Registry identity and workspace permissions.

## Find and inspect files

```bash theme={null}
atlanai file list --workspace workspace_123 --limit 20
atlanai file get file_123
atlanai file versions file_123
```

## Upload a file

```bash theme={null}
atlanai file upload ./report.pdf \
  --workspace workspace_123 \
  --as reports/report.pdf \
  --media-type application/pdf
```

Use `--parent-kind` and `--parent-id` together to attach the file to another
artifact. A duplicate path in one workspace is rejected; choose another
`--as` path.

## Download content

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

Binary content is not printed directly to an interactive terminal. Use
`--output` or pipe stdout. Downloads stop at 64 MiB.

## Archive a file

```bash theme={null}
atlanai file delete file_123
```

The command asks for confirmation and archives the artifact without erasing its
version history.
