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.

See the GitHub repository for source code and contributions.

Install

Install on Linux or macOS with a single command:

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

Pre-built binaries for all platforms (Linux, macOS, Windows) are available on the GitHub Releases page.

First steps

1

Authenticate

Set your API keys as environment variables:

$export UPLOADCARE_PUBLIC_KEY="your_public_key"
$export UPLOADCARE_SECRET_KEY="your_secret_key"

Get your keys from the API keys page in the dashboard. For persistent configuration, see the Configuration page.

2

Upload a file

$uploadcare file upload photo.jpg
UUID SIZE FILENAME STORED
a1b2c3d4-e5f6-7890-abcd-ef1234567890 2.4 MB photo.jpg true
3

List your files

$uploadcare file list
4

Explore available commands

$uploadcare --help
$uploadcare file --help

AI agent usage

The CLI exposes its full command surface via:

$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

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

Remove --dry-run to execute the deletion.

What’s next