Command Line Interface (Experimental)

*The command line interface is an under-development feature that is not supported in the 3.0.0 release

The command line interface (CLI) is a text-based interface used to interact with the ServiceX backend. The client provides a new command in your shell, servicex. This command uses a series of subcommands to work with various functions of serviceX. It is installed automatically when you install the servicex frontend package.

Common command line arguments:

F lag

Long Flag

What it does

-b

–backend

Named backend from the .servicex file endpoints list

If no backend is specified then the client will attempt to use the default_endpoint value to determine who to talk to.

deliver

This command is used to submit a yaml configuration file to the serviceX backend. It will print the paths to the resulting files.

Provide the path to the configuration file as an argument to the command.

codegens

This command will list the code generators deployed.

transforms

These commands interact with transforms that have been run

list

List transforms associated with the current user. Add the --complete flag to only show transforms that have completed.

files

List the files along with their size generated by a transform. Specify the transform request id as an argument to this command.

download

Download the files from a transform to a local directory. Specify the transform request id as an argument to the command and the directory to download to with -d. Defaults to downloading files to the current working directory.

delete

Delete a transform and its associated result files. Provide the transform request ID as an argument.

cancel

Cancel a running transform. Provide the transform request ID as an argument.

cache

These commands allow you to work with the query cache maintained by the serviceX client.

list

Show all of the cached transforms along with the run time, code generator, and number of resulting files

delete

Delete a specific transform from the cache. Provide the transform request ID with the -t or --transform-id arg.

clear

Clear all of the transforms from the cache. Add -y to force the operation without confirming with the console.

datasets

These commands interact with datasets cached on the server

list

List all of the datasets cached on the server. Accepts a command line argument of --did-finder to filter the list of datasets by a specific DID finder such as rucio or user. By default this will filter out deleted datasets. They are still in the cache, but marked as stale. To see deleted datasets, use the --show-deleted flag.

get

Get details about a specific dataset. Provide the dataset ID as a parameter. This Will list the physical file paths found for each file in the dataset.

delete

Delete a specific dataset from the cache. Provide the dataset ID as a parameter. This will force the service to re-query the dataset for the next request.