# Command Line Interface The command line interface (CLI) provides text-based interaction with the ServiceX backend. Installing the ServiceX frontend package adds a `servicex` command to the shell, which accepts the subcommands described below. ## Global Options | Flag | Long Flag | Description | |------|---------------|---------------------------------------------------------------| | `-b` | `--backend` | Named backend from the `.servicex` file endpoints list | | `-d` | `--cache_dir` | Directory for downloaded files and the ServiceX cache database | When no backend is specified, the `default_endpoint` value from the configuration is used. When no cache directory is specified, the `cache_path` value from `servicex.yaml` is used; if that is also absent, the default path is `/tmp/servicex_${USER}`. ## deliver Submits a YAML configuration file to the ServiceX backend and prints the paths to the resulting files. Accepts the path to the configuration file as an argument. ## codegens Commands that interact with code generators deployed on a backend. ### list Lists the available code generators for the selected backend. ## transforms Commands that interact with transforms that have been run. ### list Lists transforms associated with the current user. The `--complete` flag limits output to completed transforms only. ### files Lists the files and their sizes generated by a transform. Accepts the transform request ID as an argument. ### download Downloads the files from a transform to a local directory. Accepts the transform request ID as an argument and the target directory via `-d`. Defaults to the current working directory. ### delete Deletes a transform and its associated result files. Accepts the transform request ID as an argument. ### cancel Cancels a running transform. Accepts the transform request ID as an argument. ## cache Commands for working with the query cache maintained by the ServiceX client. ### list Lists all cached transforms along with runtime, code generator, and number of resulting files. Submitted but incomplete transforms are listed with the run date and file count shown as `Submitted`. ### delete Deletes a specific transform from the cache. Accepts the transform request ID via `-t` or `--transform-id`. ### clear Clears all transforms from the cache. The `-y` flag skips the confirmation prompt. ## datasets Commands that interact with datasets cached on the server. ### list Lists all datasets cached on the server. The `--did-finder` flag filters results by a specific DID finder such as `rucio` or `user`. Deleted datasets are hidden by default; the `--show-deleted` flag includes them. ### get Returns details about a specific dataset, including the physical file paths for each file. Accepts the dataset ID as an argument. ### delete Deletes a specific dataset from the cache, forcing a re-query on the next request. Accepts the dataset ID as an argument.