# Download Files with CLI

Using the SDK command-line interface, you can download files from a <ProductShortName /> workspace to your local machine.

***

## Prerequisites

<SdkInstallationSteps />

## Download Files

1. Pass your API key and the name of the <ProductShortName /> workspace where you want to upload the files. (You can also skip this step and just pass your API key and workspace in the `download` command.)
   ```shell
   # This command prompts you to pass the deepset API key and workspace name
   deepset-cloud login
   ```
2. Run the following command to download the files. This command downloads all files from the workspace to a folder you specify: 
   ```shell
    deepset-cloud download --file-dir <path_to_download_folder>
   ```

The files are downloaded to the folder you specified, including all metadata. Metadata are downloaded as separate JSON files with the `meta.json` suffix.

## Examples

- This command uses an odata filter to narrow down the files downloaded. In this case, it downloads files with the following metadata: `{"Hotel_Address": "Amsterdam Netherlands"}` to the `hotels` directory:
  ```shell
  deepset-cloud download --file-dir "./hotels" --odata-filter "Hotel_Address eq 'Amsterdam Netherlands'"
  ```
- This command downloads files whose names contain the string `westcord_art_hotel_amsterdam_4_stars` from the "hotels" workspace. It also includes the API key to connect to <ProductName />:

  ```shell
  deepset-cloud download --file-dir "./hotels" --api-key <API_KEY> --workspace-name hotels --name "westcord_art_hotel_amsterdam_4_stars"
  ```
- This command downloads files to the current directory without their metadata: 
  ```shell
  deepset-cloud download ---no-include-meta
  ```
