> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://uploadcare.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://uploadcare.com/docs/_mcp/server.

# CLI

> Manage files, projects, and workflows from the terminal with the Uploadcare CLI.

The Uploadcare CLI is a non-interactive interface to the Uploadcare platform, designed for automation, scripting, and agent-based workflows.

Use it when you need to:

* run file operations in CI/CD pipelines
* process files in bulk without writing integration code
* integrate Uploadcare into AI agent workflows
* automate repetitive tasks without using the dashboard or SDKs

Every command is scriptable, outputs structured data, and supports piping, making it suitable for both developers and automated systems.

## When to use CLI

Use the CLI when:

* you need quick automation without building an integration
* you are working inside a terminal, script, or CI/CD pipeline
* you want to chain operations using piping and structured output
* you are building AI agents that need a predictable interface

For application-level integrations, SDKs or direct API usage may be more appropriate.

> **Info**
>
> See the [GitHub repository](https://github.com/uploadcare/uploadcare-cli) for source code and contributions.

## Install

Install on Linux or macOS with a single command:

```bash
curl -fsSL https://raw.githubusercontent.com/uploadcare/uploadcare-cli/main/scripts/install.sh | sh
```

The install script supports the following environment variables:

| Variable      | Description                                                               | Default          |
| ------------- | ------------------------------------------------------------------------- | ---------------- |
| `VERSION`     | Install a specific version (e.g., `0.1.0`)                                | latest           |
| `INSTALL_DIR` | Installation directory                                                    | `/usr/local/bin` |
| `UNINSTALL`   | Set to `1` to remove the installed binary (configuration is not affected) |                  |

```bash
# Install a specific version
curl -fsSL https://raw.githubusercontent.com/uploadcare/uploadcare-cli/main/scripts/install.sh | VERSION=0.1.0 sh

# Install to a custom directory
curl -fsSL https://raw.githubusercontent.com/uploadcare/uploadcare-cli/main/scripts/install.sh | INSTALL_DIR=~/.local/bin sh

# Uninstall
curl -fsSL https://raw.githubusercontent.com/uploadcare/uploadcare-cli/main/scripts/install.sh | UNINSTALL=1 sh
```

Pre-built binaries for all platforms (Linux, macOS, Windows) are available on the
[GitHub Releases page](https://github.com/uploadcare/uploadcare-cli/releases).

## First steps

### Authenticate

Set your API keys as environment variables:

```bash
export UPLOADCARE_PUBLIC_KEY="your_public_key"
export UPLOADCARE_SECRET_KEY="your_secret_key"
```

Get your keys from the [API keys page](https://app.uploadcare.com/projects/-/api-keys/)
in the dashboard. For persistent configuration, see the [Configuration](/docs/cli/configuration/) page.

### Upload a file

```bash
uploadcare file upload photo.jpg
```

```
UUID                                  SIZE      FILENAME    STORED
a1b2c3d4-e5f6-7890-abcd-ef1234567890  2.4 MB   photo.jpg   true
```

### List your files

```bash
uploadcare file list
```

### Explore available commands

```bash
uploadcare --help
uploadcare file --help
```

## AI agent usage

The CLI exposes its full command surface via:

```bash
uploadcare api-schema
```

This allows AI agents to:

* discover available commands, flags, and arguments
* understand available JSON fields for each command
* generate valid commands without parsing `--help` output

The command returns a machine-readable schema describing all available operations, making the CLI suitable for agent-based workflows.

## Example: delete files from a list

```bash
cat file_ids.txt | uploadcare file delete --from-stdin --dry-run
```

Remove `--dry-run` to execute the deletion.

## What's next

#### [Configuration](/docs/cli/configuration/)

Set up authentication, config files, and multi-project workflows

#### [File operations](/docs/cli/guides/file-operations/)

Upload, list, inspect, and manage files

#### [CI/CD and automation](/docs/cli/guides/ci-cd/)

Use the CLI in pipelines and scripts

#### [Command reference](/docs/cli/reference/file/)

Look up syntax, flags, and examples for every command