CCD command-line interface (CLI)
The command-line interface (CLI) is the recommended method of interacting with Cloud Content Delivery (CCD). With this tool, you can use the command line to control every aspect of your project, from file management to organizing your release pipeline..
You can perform many similar functions in the Dashboard, but you need to use the CLI to copy files to your bucket, or synchronize entire folders.
To set up CCD for CLI:
If you already have a project, go to the next step. Otherwise, if you are using Unity services for the first time:
Go to cloud.unity.com, and select Products > Cloud Content Delivery.
Click Download CLI on the left.
To download the CLI, locate the version of your operating system, then select the download icon.
In the left-side navigation bar, go to the API Key section.
Copy your API key.
Run the CLI on the machine from which you are uploading content.
Log into the CLI using your API key via the
CCD is now ready for you to use.
The basic form of a CCD command in the CLI is as follows:
$ ucd [command]
To see the version of the CLI you are currently using, add the
$ ucd --version
You can add the following global flags after any command:
--apikey string: User-specified API key for accessing Content Delivery.
--help: Displays any further parameters and flags for a given command.
--quiet: Disables the display of operations performed by the specified command.
--verbose: Displays error information.
The available commands are:
Authenticates with CCD.
ucd auth [command]
info: Display current user info.
login [apikey]: Log in to access project data and content delivery services.
logout: Log out of current account.
Manages badges for a release.
ucd badges [command]
add [badge_name] [release_id]: Add a badge to a release.
list: List badges in the current bucket.
remove [badge_name]: Remove a badge.
Manages buckets for a project.
ucd buckets [command]
create [project_guid] [bucket name]: Create bucket for a project.
delete [bucket_id]: Delete bucket.
info [bucket_id]: Get bucket information.
list [project_guid]: List buckets for a project.
Manages options for setting and identifying the current bucket.
ucd config [command]
clear: Clear all local configuration options.
set environment [environment_id] --project=[project_id]: Set environment as current.
set bucket [bucket_id] [flags]: Set the specified bucket as the current (active) bucket.
show: Show current local configuration.
Manages entries for the current bucket.
ucd entries [command]
copy [local_path] [entry file name]: Create entry for current bucket from a local file.
delete [entry file name]: Delete entry from the current bucket.
download [entry file name]: Download entry content from current bucket.
info [entry file name]: Get entry info from current bucket.
list: List entries for current bucket.
sync [local_dir_path]: Sync entries from local directory for current bucket.
update [entry file name]: Update entry for current bucket.
Manages the releases for the current bucket.
ucd releases [command]
create: Create release from latest version of current bucket.
info [release_id]: Get release info for specific release.
list: List releases for current bucket.
promote [release_id] --target_bucket [bucket_id]: Promote specified release to another bucket. An optional
--notesflag adds a note string.
update [release_id]: Update an existing release. An optional
--notesflag adds a note string.
Bucket and entry names are case-sensitive.
- To create a bucket:
$ ucd buckets create [project_id] [bucket_name]
- To delete a bucket:
$ ucd buckets delete [bucket_id]
- To list all buckets for a project, including their
$ ucd buckets list [project_id]
- To set the current bucket as the active bucket:
$ ucd config set bucket [bucket_id]
- To synchronize a local folder with the current bucket:
$ ucd entries sync [local_dir_path]
- To view a list of all entries in the current bucket:
$ ucd entries list
For a sequential example of how to use the command-line interface, see Using CCD via the CLI.