For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
GuidesIntegrationsAPI ReferencesRelease notes
GuidesIntegrationsAPI ReferencesRelease notes
  • Introduction
    • Overview
    • Quick Start
    • Projects
    • Billing
  • Uploading
    • Overview
    • Uploading files with API
    • File analysis on upload
  • Optimization
    • Overview
  • Transformations
  • Delivery
    • Overview
    • On-the-fly operations
    • CDN settings
    • Proxy
  • Security
    • Overview
    • Validation and moderation
    • Signed uploads
    • Signed URLs
    • Unsafe content moderation
    • Malware protection
    • HIPAA workflows
  • Storage
    • Uploadcare storage
    • Cloudflare R2
    • Google Cloud Storage
    • Azure Blob Storage
  • File management
    • Overview
    • Managing files
    • File groups
    • Webhooks
    • Arbitrary file metadata
  • CLI
    • Overview
    • Configuration
  • Migration
    • Migration to Uploadcare
    • Migration from Filestack
Dashboard
LogoLogo
On this page
  • When to use CLI
  • Install
  • First steps
  • AI agent usage
  • Example: delete files from a list
  • What’s next
CLI

CLI

Was this page helpful?
Previous

CLI configuration

Next
Built with

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

The install script supports the following environment variables:

VariableDescriptionDefault
VERSIONInstall a specific version (e.g., 0.1.0)latest
INSTALL_DIRInstallation directory/usr/local/bin
UNINSTALLSet to 1 to remove the installed binary (configuration is not affected)
$# 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.

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

Configuration

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

File operations

Upload, list, inspect, and manage files

CI/CD and automation

Use the CLI in pipelines and scripts

Command reference

Look up syntax, flags, and examples for every command