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.
Flags:
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:
file info
Get details for a single file.
Flags:
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:
file upload
Upload files from your local filesystem.
Files smaller than 10 MB use direct upload; larger files use multipart upload automatically.
Flags:
JSON fields: uuid, size, filename, mime_type, is_image, is_stored, is_ready, datetime_uploaded, original_file_url, metadata
Examples:
file upload-from-url
Upload a file from a URL. The CLI polls until the upload completes.
Flags:
JSON fields: uuid, size, filename, mime_type, is_image, is_stored, is_ready, datetime_uploaded, original_file_url, metadata
Examples:
file store
Store files permanently. Accepts one or more UUIDs.
Flags:
Returns exit code 1 for partial failures. The problems field in JSON output contains per-file errors.
JSON fields: files, problems
Examples:
file delete
Delete files permanently. Accepts one or more UUIDs.
Warning: Deletion is permanent and cannot be undone. Use --dry-run to preview.
Flags:
Returns exit code 1 for partial failures.
JSON fields: files, problems
Examples:
file local-copy
Create a copy of a file within Uploadcare storage. The copy gets a new UUID.
Flags:
JSON fields: uuid, size, filename, mime_type, is_image, is_stored, is_ready, datetime_uploaded, original_file_url
Examples:
file download
Download files from the Uploadcare CDN to the local filesystem.
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:
JSON fields: uuid, path, size, source_url, status (downloaded, skipped, or dry-run)
Examples:
file remote-copy
Copy a file to an external storage target (e.g., Amazon S3). See Copy files to S3 for setup instructions.
Flags:
JSON fields: result, already_exists
Examples:
file search
Search files by text, fields, ranges, and tags.
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:
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:
metadata list
List all metadata key-value pairs for a file.
Examples:
metadata get
Get a single metadata value.
Examples:
metadata set
Set a metadata key-value pair.
Flags:
JSON fields: key, value (normal); key, current_value, new_value, status (dry-run)
Examples:
metadata delete
Delete a metadata key.
Flags:
Examples:
tag list
List a file’s tags.
JSON fields: tags
Examples:
tag replace
Replace a file’s complete tag set. At least one tag is required; to remove every tag, use tag clear instead.
Flags:
JSON fields: tags, added, deleted (status also included with --dry-run)
Examples:
tag update
Atomically add and delete tags on a file.
Flags:
JSON fields: tags, added, deleted (status also included with --dry-run)
Examples:
tag clear
Remove all tags from a file.
Flags:
JSON fields: tags, added, deleted (status also included with --dry-run)
Examples: