File, metadata, and tag commands

These commands manage files, their metadata, and tags through the REST API and Upload API.

Tip: Global flags like --json, --jq, -v, and --quiet are available on every command. See Configuration for the full list.

file list

List files in the current project.

uploadcare file list [flags]

Flags:

FlagDefaultDescription
--orderingdatetime_uploadedSort order. Prefix with - for descending
--limit100Files per page
--starting-pointStarting point (RFC 3339 datetime)
--storedFilter by stored status (true or false)
--removedfalseInclude removed files
--page-allfalseStream all pages as NDJSON
--include-appdatafalseInclude application data

JSON fields: uuid, size, filename, mime_type, is_image, is_stored, is_ready, datetime_uploaded, datetime_stored, datetime_removed, original_file_url, metadata, appdata

Examples:

uploadcare file list --json all
uploadcare file list --stored true --ordering -datetime_uploaded --json uuid,size,filename
uploadcare file list --page-all --json uuid
uploadcare file list --page-all --stored false --json uuid | uploadcare file delete --from-stdin

file info

Get details for a single file.

uploadcare file info <uuid> [flags]

Flags:

FlagDefaultDescription
--include-appdatafalseInclude application data (add-on results)

JSON fields: uuid, size, filename, mime_type, is_image, is_stored, is_ready, datetime_uploaded, datetime_stored, datetime_removed, original_file_url, metadata, appdata

Examples:

uploadcare file info 740e1b8c-1ad8-4324-b7ec-112345678900
uploadcare file info 740e1b8c-1ad8-4324-b7ec-112345678900 --json original_file_url,size
uploadcare file info 740e1b8c-1ad8-4324-b7ec-112345678900 --include-appdata --json all

file upload

Upload files from your local filesystem.

uploadcare file upload <path>... [flags]

Files smaller than 10 MB use direct upload; larger files use multipart upload automatically.

Flags:

FlagDefaultDescription
--storeautoStorage behavior: auto, true, or false
--metadataKey-value pair (repeatable): --metadata key=value
--multipart-threshold10485760Size threshold for multipart upload (bytes)
--force-multipartfalseForce multipart upload
--force-directfalseForce direct upload
--progressfalseShow upload progress on stderr
--dry-runfalseValidate without uploading
--from-stdinfalseRead file paths from stdin

JSON fields: uuid, size, filename, mime_type, is_image, is_stored, is_ready, datetime_uploaded, original_file_url, metadata

Examples:

uploadcare file upload photo.jpg
uploadcare file upload photo.jpg --store true
uploadcare file upload photo.jpg --metadata source=camera --metadata project=vacation
uploadcare file upload *.jpg --json uuid,filename,size
uploadcare file upload photo.jpg --dry-run --json all
find ./images -name '*.png' | uploadcare file upload --from-stdin --json uuid

file upload-from-url

Upload a file from a URL. The CLI polls until the upload completes.

uploadcare file upload-from-url <url>... [flags]

Flags:

FlagDefaultDescription
--storeautoStorage behavior: auto, true, or false
--metadataKey-value pair (repeatable): --metadata key=value
--timeout5mMax wait time for upload
--check-duplicatesfalseCheck for duplicate URLs
--save-duplicatesfalseSave duplicate URL information
--dry-runfalseValidate URLs without uploading
--from-stdinfalseRead URLs from stdin

JSON fields: uuid, size, filename, mime_type, is_image, is_stored, is_ready, datetime_uploaded, original_file_url, metadata

Examples:

uploadcare file upload-from-url https://example.com/photo.jpg
uploadcare file upload-from-url https://example.com/photo.jpg --store true
uploadcare file upload-from-url https://example.com/a.jpg https://example.com/b.jpg --json uuid
uploadcare file upload-from-url https://example.com/photo.jpg --dry-run --json all

file store

Store files permanently. Accepts one or more UUIDs.

uploadcare file store <uuid>... [flags]

Flags:

FlagDefaultDescription
--from-stdinfalseRead UUIDs from stdin
--dry-runfalseValidate without storing

Returns exit code 1 for partial failures. The problems field in JSON output contains per-file errors.

JSON fields: files, problems

Examples:

uploadcare file store 740e1b8c-1ad8-4324-b7ec-112345678900
uploadcare file store UUID1 UUID2 UUID3
uploadcare file list --page-all --stored false --json uuid | uploadcare file store --from-stdin
uploadcare file store UUID1 UUID2 --dry-run --json all

file delete

Delete files permanently. Accepts one or more UUIDs.

uploadcare file delete <uuid>... [flags]

Warning: Deletion is permanent and cannot be undone. Use --dry-run to preview.

Flags:

FlagDefaultDescription
--from-stdinfalseRead UUIDs from stdin
--dry-runfalseValidate without deleting

Returns exit code 1 for partial failures.

JSON fields: files, problems

Examples:

uploadcare file delete 740e1b8c-1ad8-4324-b7ec-112345678900
uploadcare file delete UUID1 UUID2 UUID3
uploadcare file list --page-all --stored false --json uuid | uploadcare file delete --from-stdin
uploadcare file delete UUID1 UUID2 --dry-run --json all

file local-copy

Create a copy of a file within Uploadcare storage. The copy gets a new UUID.

uploadcare file local-copy <uuid> [flags]

Flags:

FlagDefaultDescription
--storefalseStore the copied file
--dry-runfalseValidate without copying

JSON fields: uuid, size, filename, mime_type, is_image, is_stored, is_ready, datetime_uploaded, original_file_url

Examples:

uploadcare file local-copy 740e1b8c-1ad8-4324-b7ec-112345678900
uploadcare file local-copy 740e1b8c-1ad8-4324-b7ec-112345678900 --store

file download

Download files from the Uploadcare CDN to the local filesystem.

uploadcare file download <uuid>... [flags]

Accepts UUIDs as positional arguments, from stdin (--from-stdin), or both. Single-UUID mode writes to --output <path> (use - to stream to stdout), or to ./<filename> when omitted. Batch mode (multiple UUIDs or --from-stdin) requires --output-dir and expands --name-template per file.

Flags:

FlagDefaultDescription
--outputOutput path for a single file (use - for stdout)
--output-dirOutput directory for batch downloads
--name-template${uuid}${ext}Filename template for batch mode. Placeholders: ${uuid}, ${filename}, ${ext}, ${effects}
--effectsCDN effects path to apply to images (e.g. resize/200x/). Silently ignored for non-image files
--replacefalseOverwrite existing files; without it, existing paths are skipped
--parallel1Number of concurrent downloads (max 32)
--progressfalseShow download progress on stderr
--from-stdinfalseRead UUIDs from stdin
--dry-runfalseResolve paths without downloading

JSON fields: uuid, path, size, source_url, status (downloaded, skipped, or dry-run)

Examples:

# Download one file to ./<filename>
uploadcare file download 740e1b8c-1ad8-4324-b7ec-112345678900
# Download to a specific path
uploadcare file download <uuid> --output ./photo.jpg
# Stream to stdout
uploadcare file download <uuid> --output - > photo.jpg
# Mirror all stored files into ./backup, 8 concurrent workers
uploadcare file list --page-all --stored true --json uuid \
| uploadcare file download --from-stdin --output-dir ./backup --parallel 8
# Apply a CDN transformation while downloading (resize to 200px wide)
uploadcare file download <uuid> --output thumb.jpg --effects resize/200x/
# Dry run: show what would be downloaded
uploadcare file download <uuid1> <uuid2> --output-dir ./out --dry-run --json all

file remote-copy

Copy a file to an external storage target (e.g., Amazon S3). See Copy files to S3 for setup instructions.

uploadcare file remote-copy <uuid> [flags]

Flags:

FlagDefaultDescription
--targetRemote storage name (required)
--make-publicfalseMake file public on remote storage
--patternFilename pattern (e.g., ${uuid}/${filename})
--dry-runfalseValidate without copying

JSON fields: result, already_exists

Examples:

uploadcare file remote-copy 740e1b8c-1ad8-4324-b7ec-112345678900 --target my-s3-bucket
uploadcare file remote-copy UUID --target my-s3-bucket --make-public
uploadcare file remote-copy UUID --target my-s3-bucket --pattern "${uuid}/${filename}"

Search files by text, fields, ranges, and tags.

uploadcare file search [query] [flags]

At least one query or filter is required. The optional query and each --phrase value must be at least four characters; --exact only requires a non-empty value. The API returns at most the first 1000 matches: --offset plus --limit cannot exceed 1000, and --page-all stops after the first 1000. The search index updates asynchronously, so very recent file, metadata, or tag changes may not appear immediately. Removed files are excluded.

Pages are filled by following the API’s next cursor, so offset-stepped pages may occasionally overlap. Prefer --page-all when completeness matters.

Flags:

FlagDefaultDescription
--exactExact match as field=value (repeatable)
--phrasePhrase match as field=value (one per field; repeatable across different fields)
--fuzzinessfalseEnable fuzzy text and phrase matching
--tag-allMatch every tag listed (repeatable)
--tag-anyMatch at least one tag listed (repeatable)
--tag-noneExclude files matching any tag listed (repeatable)
--is-imageFilter by image status (true or false)
--size-gt0File size greater than, in bytes
--size-gte0File size greater than or equal to, in bytes
--size-lt0File size less than, in bytes
--size-lte0File size less than or equal to, in bytes
--uploaded-gtUploaded after this RFC 3339 timestamp
--uploaded-gteUploaded at or after this RFC 3339 timestamp
--uploaded-ltUploaded before this RFC 3339 timestamp
--uploaded-lteUploaded at or before this RFC 3339 timestamp
--sortSort field, optionally prefixed with - for descending (repeatable, max 4)
--limit20Matches per page (1-100)
--offset0Result offset (offset + limit cannot exceed 1000)
--page-allfalseStream all result pages (up to the first 1000 matches)
--include-appdatafalseInclude application data

JSON fields: uuid, size, filename, mime_type, is_image, is_stored, is_ready, datetime_uploaded, datetime_stored, datetime_removed, url, original_file_url, metadata, tags, appdata, highlight

Examples:

uploadcare file search invoice --exact detected_mime_type=application/pdf --tag-all approved --tag-none archived --sort score --sort=-datetime_uploaded
uploadcare file search --exact 'metadata[camera]=Canon' --json uuid,filename,tags,highlight

metadata list

List all metadata key-value pairs for a file.

uploadcare metadata list <file-uuid>

Examples:

uploadcare metadata list 740e1b8c-1ad8-4324-b7ec-112345678900
uploadcare metadata list 740e1b8c-1ad8-4324-b7ec-112345678900 --json all

metadata get

Get a single metadata value.

uploadcare metadata get <file-uuid> <key>

Examples:

uploadcare metadata get 740e1b8c-1ad8-4324-b7ec-112345678900 source

metadata set

Set a metadata key-value pair.

uploadcare metadata set <file-uuid> <key> <value> [flags]

Flags:

FlagDefaultDescription
--dry-runfalseShow what would change without applying

JSON fields: key, value (normal); key, current_value, new_value, status (dry-run)

Examples:

uploadcare metadata set 740e1b8c-1ad8-4324-b7ec-112345678900 source camera
uploadcare metadata set 740e1b8c-1ad8-4324-b7ec-112345678900 source camera --dry-run --json all

metadata delete

Delete a metadata key.

uploadcare metadata delete <file-uuid> <key> [flags]

Flags:

FlagDefaultDescription
--dry-runfalseVerify key exists without deleting

Examples:

uploadcare metadata delete 740e1b8c-1ad8-4324-b7ec-112345678900 source
uploadcare metadata delete 740e1b8c-1ad8-4324-b7ec-112345678900 source --dry-run

tag list

List a file’s tags.

uploadcare tag list <file-uuid>

JSON fields: tags

Examples:

uploadcare tag list 740e1b8c-1ad8-4324-b7ec-112345678900

tag replace

Replace a file’s complete tag set. At least one tag is required; to remove every tag, use tag clear instead.

uploadcare tag replace <file-uuid> <tag>... [flags]

Flags:

FlagDefaultDescription
--dry-runfalseShow what would change without applying

JSON fields: tags, added, deleted (status also included with --dry-run)

Examples:

uploadcare tag replace 740e1b8c-1ad8-4324-b7ec-112345678900 cat animal cute
uploadcare tag replace 740e1b8c-1ad8-4324-b7ec-112345678900 cat --dry-run --json all

tag update

Atomically add and delete tags on a file.

uploadcare tag update <file-uuid> [flags]

Flags:

FlagDefaultDescription
--addTag to add (repeatable)
--deleteTag to delete (repeatable)
--dry-runfalseShow what would change without applying

JSON fields: tags, added, deleted (status also included with --dry-run)

Examples:

uploadcare tag update 740e1b8c-1ad8-4324-b7ec-112345678900 --add cat --add animal --delete draft

tag clear

Remove all tags from a file.

uploadcare tag clear <file-uuid> [flags]

Flags:

FlagDefaultDescription
--dry-runfalseShow what would change without applying

JSON fields: tags, added, deleted (status also included with --dry-run)

Examples:

uploadcare tag clear 740e1b8c-1ad8-4324-b7ec-112345678900
uploadcare tag clear 740e1b8c-1ad8-4324-b7ec-112345678900 --dry-run