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

# Installing the Anaconda Enterprise CLI

export const Danger = ({children}) => {
  return <div class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border danger-admonition dark:danger-admonition" data-callout-type="danger">
      <div class="mt-0.5 w-4">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="rgb(239, 68, 68)" xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-sky-500" aria-label="Danger">
          <path fill-rule="evenodd" clip-rule="evenodd" d="M7 1.3C10.14 1.3 12.7 3.86 12.7 7C12.7 10.14 10.14 12.7 7 12.7C5.48908 12.6974 4.0408 12.096 2.97241 11.0276C1.90403 9.9592 1.30264 8.51092 1.3 7C1.3 3.86 3.86 1.3 7 1.3ZM7 0C3.14 0 0 3.14 0 7C0 10.86 3.14 14 7 14C10.86 14 14 10.86 14 7C14 3.14 10.86 0 7 0ZM8 3H6V8H8V3ZM8 9H6V11H8V9Z"></path>
        </svg>
      </div>
      <div class="text-sm prose min-w-0 w-full">
        {children}
      </div>
    </div>;
};

<Danger>
  The following process for installing the Anaconda Enterprise CLI results in a broken conda env. Follow [the workaround described here](../reference/known-issues) instead, until the issue is addressed in a future release of Anaconda Enterprise.
</Danger>

If you want to be able to [create and share channels and packages](../admin/chan-pkg/manage) from your Anaconda Enterprise Repository using `conda` commands, you need to download and install the Anaconda Enterprise CLI. If you [updated the platform’s TLS/SSL certificate](./certs), you can also use the AE CLI to [configure the TLS/SSL certs for the repository](#configuring-the-anaconda-enterprise-cli).

**Prerequisites:**

* [Install Anaconda Enterprise](./on-prem)
* Complete the [post-install configuration](./config)
* [Install conda](./conda)

1. To install the CLI, run the following command, replacing `anaconda.example.com` with the fully qualified domain name (FQDN) of your Anaconda Enterprise instance:

   ```
   conda install -kc https://anaconda.example.com/repository/conda/anaconda-enterprise anaconda-enterprise-cli cas-mirror git
   ```

<Note>
  You’ll notice that running this command also installs `cas-mirror`, the package mirroring tool. For more information on package mirroring, see [Configuring channels and packages](../admin/chan-pkg/main).
</Note>

2. After the list of package dependencies has been resolved, type `y` to proceed with the installation.

## Configuring the Anaconda Enterprise CLI

1. To add the url of the Anaconda Enterprise Repository to the set of available sites, run the following command with the fully qualified domain name (FQDN) of your Anaconda Enterprise instance:

   ```
   anaconda-enterprise-cli config set sites.master.url https://<your.domain.com>/repository/api
   ```

2. Run the following command to configure the instance of Anaconda Enterprise Repository you will be using as the default site:

   ```
   anaconda-enterprise-cli config set default_site master
   ```

3. To see a consolidated view of the configuration, run the following command:

   ```
   anaconda-enterprise-cli config view
   ```

The Anaconda Enterprise CLI reads configuration information from the following places:

**System-level configuration:** `/etc/anaconda-platform/cli.yml`

**User-level configuration:** `$INSTALL_PREFIX/anaconda-platform/cli.yml` and `$HOME/.anaconda/anaconda-platform/cli.yml`

To change how it’s configured, modify the appropriate `cli.yml` file(s), based on your needs.

<Note>
  Changing configuration settings at the user level overrides any system-level configuration.
</Note>

If you [updated the platform’s TLS/SSL certificate](./certs), you can use the AE CLI to configure the certificates for the repository using the following commands:

```
$ anaconda-enterprise-cli config set ssl_verify true

$ anaconda-enterprise-cli config set sites.master.ssl_verify /etc/ssl/certs/ca-certificates.crt

$ anaconda-enterprise-cli config set sites.master.ssl_verify /etc/pki/tls/certs/ca-bundle.crt
```

## Logging in to the Anaconda Enterprise CLI

1. Run this command to access the CLI:

   ```
   anaconda-enterprise-cli login
   ```

2. Log in to the CLI using the same username and password that you use to log in the Anaconda Enterprise web interface:

   ```
   Username: <your-username>
   Password: <your-password>
   ```

**Next Steps:**
You can now [configure access](../admin/chan-pkg/config-repo-access) to the source of the packages to be mirrored, whether an online repository or a tarball (if an air-gapped installation). Then you’ll be ready to begin [mirroring channels and packages](../admin/chan-pkg/mirror).
