Asset Management Commands
Upload, download, list, sync, and delete assets using the Nomad Media CLI.
Asset Management Commands
The asset management commands allow you to list, upload, download, sync, and delete assets in your Nomad Media environment.
Asset Identification
All asset commands accept assets by ID, URL, or object-key:
- --id: Asset ID — takes precedence over all other identifiers.
- --url: Full Nomad Media URL — bucket-name::object-key. Case-sensitive; folders must end with /.
- --object-key: Object-key only — requires the default bucket to be set first with set-default-bucket.
Bucket Commands
list-buckets
Lists all buckets registered in the Nomad Media instance.
set-default-bucket
Sets the default bucket used by commands that accept the --object-key option. Must be set before using --object-key in other commands.
Options:
- --bucket (required): Name of the bucket to set as default.
Asset Commands
delete-asset
Deletes an asset (file or folder).
Options:
- --id: Asset ID.
- --url: Nomad Media URL (bucket::object-key).
- --object-key: Object-key (requires default bucket to be set).
download-assets
Downloads assets to the local filesystem.
Options:
- --id: Asset ID.
- --url: Nomad Media URL (bucket::object-key).
- --object-key: Object-key (requires default bucket to be set).
- --destination: Local destination folder. Defaults to the current directory.
- --threads (optional): Number of simultaneous downloads. Default: 3.
- --include-empty-folders (optional, flag): Include empty folders in the download.
- --download-proxy (optional, flag): Download the proxy version of the file(s). The file extension will match the proxy format.
- -r, --recursive (optional, flag): Download assets recursively.
get-asset-details
Gets the full details of an asset.
Options:
- --id: Asset ID.
- --url: Nomad Media URL (bucket::object-key).
- --object-key: Object-key (requires default bucket to be set).
list-assets
Lists assets by ID, Nomad Media URL, or object-key.
Options:
- --id: Asset ID, collection ID, or saved search ID.
- --url: Nomad Media URL (bucket::object_key).
- --object-key: Object-key (requires default bucket to be set).
- --page-size (optional): Number of items per page. Default: 100.
- --page-offset (optional): Page offset. Default: 0. Prefer --page-token over this option.
- --page-token (optional): Token for the next page of results (returned by a previous list-assets call). Cannot be used with --page-offset.
- --order-by (optional): Field to sort by. Default: Asset Title.
- --order-by-type (optional): Sort order — asc, desc, ascending, or descending. Default: ascending.
- -r, --recursive (optional): List assets recursively.
sync-assets
Synchronizes assets between Nomad Media and local storage in either direction.
Options:
- --id: Asset folder ID.
- --url: Nomad Media URL (bucket::object-key).
- --object-key: Object-key (requires default bucket to be set).
- --sync-direction (required): Direction of sync:
- local-to-nomad: Sync from local storage to Nomad Media.
- nomad-to-local: Sync from Nomad Media to local storage.
- --source (required): Local directory path for the sync source.
- --threads (optional): Number of concurrent threads. Default: 4.
- --include-empty-folders (optional, flag): Include empty folders in the sync.
upload-assets
Uploads files or folders from the local filesystem to Nomad Media asset storage.
Options:
- --id: Nomad Media ID of the destination folder.
- --url: Nomad Media URL of the destination folder (bucket::object_key).
- --object-key: Object-key of the destination folder (requires default bucket to be set).
- --source (required): Local file or folder path to upload (e.g. file.jpg, folderName/file.jpg, or folderName).
- -r, --recursive (optional, flag): Upload recursively.
- --num_files (optional): Number of concurrent file uploads. Default: 3.
