> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cli.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> How to install the CData CLI on Windows, macOS, and Linux.

## Before you begin

The CData CLI requires Java 17 or later. On Windows, the installer can automatically install [Adoptium JRE 17](https://adoptium.net/) via `winget` if no compatible JRE is detected.

***

## Windows

Run the following command in PowerShell:

```powershell theme={null}
irm https://downloads.cdata.com/cdatabuilds/builds/free/cdatacli/install-cdatacli-windows.ps1 | iex
```

The installer:

1. Checks for a compatible JRE. If none is found, installs Adoptium JRE 17 using `winget`.
2. Installs the CData CLI to `%APPDATA%\Programs\CData\CData CLI tool\`.
3. Adds the install directory to your `PATH`.

After installation, open a new terminal and run:

```powershell theme={null}
cdatacli --version
```

***

## macOS

Run the following command in your terminal:

```bash theme={null}
curl -fsSL https://downloads.cdata.com/cdatabuilds/builds/free/cdatacli/install-cdatacli-macos.sh | bash
```

After installation, open a new terminal and run:

```bash theme={null}
cdatacli --version
```

***

## Linux

Run the following command in your terminal:

```bash theme={null}
curl -fsSL https://downloads.cdata.com/cdatabuilds/builds/free/cdatacli/install-cdatacli-linux.sh | bash
```

After installation, open a new terminal and run:

```bash theme={null}
cdatacli --version
```

***

## Adding drivers

### Driver library directory

The CData CLI stores drivers in a single driver library directory and reads drivers only from that directory. By default, this is a per-user location, so you can reuse a driver in any project without downloading and activating it again:

| Platform | Default location |
| - | - |
| Windows | `%APPDATA%\CData\lib\` |
| macOS and Linux | `~/.config/CData/lib/` |

To use a different directory, use either of the following. The CLI checks them in this order:

1. The `-l, --lib <directory>` option on a command. For example, `cdatacli drivers list -l ./lib`.
2. The `CDATACLI_HOME` environment variable. If the variable is set to a valid directory path, the CLI uses that directory. If it is empty or not a valid path, the CLI uses the default location.

### Download a driver

The easiest way to add a driver is to download it with the CLI. First, search CData's published driver catalog to find a driver's artifact ID:

```bash theme={null}
cdatacli drivers search --driver salesforce
```

Then download the driver by its artifact ID. The jar is saved to the [driver library directory](#driver-library-directory) by default — the same location the CLI reads drivers from:

```bash theme={null}
cdatacli drivers download --artifact-id salesforce-jdbc
```

Use `--output <dir>` to save the jar to a different directory, or `--url <jar-url>` to download from a direct URL instead.

### Add a driver manually

You can also place driver JAR files yourself. Copy your CData JDBC driver JAR files to the [driver library directory](#driver-library-directory). To verify a driver is available:

```bash theme={null}
cdatacli drivers list
```

To use a driver in a different directory, such as a project folder, pass that directory with `-l`:

```bash theme={null}
cdatacli drivers list -l ./lib
```

### Third-party dependencies

Some CData drivers require third-party libraries that CData cannot bundle because of licensing restrictions. These dependencies may include a JAR file and, in some cases, a native library for your platform.

Place these files in the [driver library directory](#driver-library-directory) alongside the driver. The CData CLI automatically adds any non-CData JAR in that directory to the driver's classpath and adds the directory to the Java native library path, so the driver can load both the JAR and its native library at runtime.

***

## Next steps

* [Quick start](https://docs.cli.cdata.com/quickstart.md)
* [Activate a driver](https://docs.cli.cdata.com/commands/drivers.md#drivers-activate)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.