> ## 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.

# Getting started

export const GCell = ({children, className}) => <div className={`grid-table-cell ${className || ""}`} role="cell">
    {children}
  </div>;

export const GTH = ({children, className}) => <div className={`grid-table-th ${className || ""}`} role="columnheader">
    {children}
  </div>;

export const GRow = ({children}) => <div className="grid-table-row" role="row">{children}</div>;

export const GBody = ({children}) => <div className="grid-table-body" role="rowgroup">{children}</div>;

export const GHead = ({children}) => <div className="grid-table-head" role="rowgroup">{children}</div>;

export const GTable = ({children, className, cols}) => <div className={`grid-table not-prose overflow-hidden rounded-2xl ${className || ""}`} style={{
  "--grid-table-cols": cols
}} role="table">
    {children}
  </div>;

`anaconda-repo-cli` is the command-line interface for managing channels, packages, and artifacts on Package Security Manager (On-prem). Use it to script repository operations, integrate with CI/CD pipelines, or work with your repository directly from a shell application.

<Note>
  `anaconda repo` provides a modern replacement for the legacy `conda repo` entrypoint, which is considered deprecated. It uses Anaconda's unified authentication (`anaconda-auth`), to eliminate separate credential configurations and provide a consistent experience across Anaconda Platform tools.
</Note>

<Steps>
  <Step title="Install the CLI">
    <Warning>
      `anaconda-repo-cli` is designed as a backwards-compatible replacement for the legacy `conda-repo-cli` package. While the two can be installed simultaneously, installing `anaconda-repo-cli` makes the `conda-repo-cli` package unnecessary. If you have `conda-repo-cli` installed, consider uninstalling it before proceeding:

      ```sh theme={null}
      conda remove conda-repo-cli
      ```
    </Warning>

    1. Install the `anaconda-repo-cli` package by opening Anaconda Prompt (Terminal on macOS/Linux) and running the following command:

       ```sh theme={null}
       conda install anaconda-repo-cli
       ```
    2. Verify your installation was successful and view which version you've installed:

       ```sh theme={null}
       anaconda repo --version
       ```
  </Step>

  <Step title="Configure the CLI">
    Configuring the CLI tells `anaconda-repo-cli` which Anaconda Platform domain to use for channels, mirrors, and authentication.

    <Note>
      By default, the CLI connects to `anaconda.com`. You can register additional domains (for Package Security Manager (On-prem)) and set any registered domain as the default.
    </Note>

    Use `anaconda sites add` to register your deployment's domain. Include `--default` to set the domain as the default:

    ```sh theme={null}
    anaconda sites add --domain <FQDN> --default
    ```

    <Comments>
      Replace \<FQDN> with your Package Security Manager (On-prem) deployment's fully qualified domain name.
    </Comments>

    This writes the site configuration to `~/.anaconda/config.toml` and sets it as the default site. You can verify the result with:

    ```sh theme={null}
    anaconda sites list
    ```

    <Tip>
      You can also inspect the full configuration for sites:

      ```sh theme={null}
      anaconda sites show
      ```

      For the full list of `anaconda sites` subcommands, see the [sites command reference](/cli-reference/anaconda-auth/commands/sites).
    </Tip>

    <Accordion title="Manual configuration (alternative)">
      If you prefer to edit the configuration file directly, add the following to `~/.anaconda/config.toml`:

      ```toml theme={null}
      default_site = "anaconda-platform"

      [sites."anaconda-platform"]
      domain = "<FQDN>"
      ```

      <Comments>
        Replace \<FQDN> with your Package Security Manager (On-prem) deployment's fully qualified domain name.
      </Comments>
    </Accordion>
  </Step>

  <Step title="Log in to Anaconda Platform with the CLI">
    To log in to Anaconda Platform using the CLI, run the following command:

    ```sh theme={null}
    anaconda login
    ```

    <Note>
      Running `anaconda login` opens a browser tab to log you in to Anaconda Platform CLI. Once signed in, close your browser tab and return to your terminal.

      ***

      If you are using SSO, you will be prompted to log in to your SSO service.
    </Note>
  </Step>

  <Step title="Configure conda to use Anaconda Platform">
    The CLI comes with a configuration wizard that adds channels from your Anaconda Platform organization to your `.condarc`.

    <Tip>
      Before running the wizard, run:

      ```sh theme={null}
      anaconda repo channel --list
      ```

      This returns a list of channels you own or that have been shared with you through group membership. Consider adding these channels as defaults while running the wizard.
    </Tip>

    ```sh theme={null}
    anaconda repo wizard
    ```

    The wizard guides you through adding channels to your `.condarc` file. It shows you channels from your Anaconda Platform organization that are available for you to add to your `.condarc`. You *must* set at least one default channel for the wizard to continue.

    <Note>
      `anaconda repo wizard only shows the first 100 channels in your organization by default. If you have more than 100 channels, you can use the `--offset`and`--limit\` flags to paginate through your channels.
    </Note>

    <Warning>
      Misspelled channel names are not accepted. If you enter a channel name that does not match an existing channel, a warning appears and no channel is added.
    </Warning>

    Your output will look something like this:

    ```text Example command workflow expandable theme={null}
    Conda configuration wizard.
    This wizard will configure your CondaRC file using channels from https://<FQDN>.com

    The CondaRC path is /Users/<USER>/.condarc

    The following channels are available:
    Name                           | Mirror | Privacy         | Owners
    ---------------------------------------------------------------------------
    anaconda                       |  ︎ ✔    | public          | anaconda
    web_devs                       |  ︎ ✔    | public          | anaconda
    snakes                         |  ︎ ✔    | public          | anaconda
    data_sci                       |  ︎ ✔    | public          | anaconda

    Provide a space-separated list of channels to set as default_channels
    It is common to add mirror channels here.
    : web_devs snakes data_science 

    If you wish to add channels to the "channels" list
    provide a space-separated list. You may leave this blank.
    : anaconda  
    The following Conda configuration will be applied
    channel_alias: https://<FQDN>/api/repo
    default_channels:
      - web_devs
      - snakes
      - data_sci
    channels:
      - defaults
      - anaconda
    Confirm changes to /Users/<USER>/.condarc
    (The current condarc file will be archived) [Y, n]: y
    Backing up your current condarc file to /Users/<USER>/.condarc.backup
    ```

    <Tip>
      If configuring your `.condarc` with the wizard creates problems, you can revert the changes by running:

      ```sh theme={null}
      anaconda repo wizard --restore
      ```
    </Tip>
  </Step>
</Steps>

## Basic usage

### Log in to Anaconda

The Anaconda Repo CLI uses the same credentials as the Anaconda CLI. Authenticate once with the Anaconda CLI; the repo commands will then use your stored credentials.

```bash theme={null}
anaconda login
```

After authentication, `anaconda repo` commands use your credentials automatically.

### Check who is logged in

Display information about the currently signed-in user and default channel.

```bash theme={null}
anaconda repo whoami
```

### List your channels

List all channels available to your account.

```bash theme={null}
anaconda repo channel --list
```

## Configuration

Configure the repo CLI using either the `plugin.auth` and site settings in `~/.anaconda/config.toml` (via `anaconda-auth`) or, for legacy setups, the repo client config file.

### Common configuration options

<GTable cols="20% 30% 35% 15%">
  <GHead>
    <GRow>
      <GTH>Parameter</GTH>
      <GTH>Environment Variable</GTH>
      <GTH>Description</GTH>
      <GTH>Default</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`default_site`</GCell>
      <GCell>—</GCell>
      <GCell>Default Anaconda Platform site to use</GCell>
      <GCell>—</GCell>
    </GRow>

    <GRow>
      <GCell>`url`</GCell>
      <GCell>—</GCell>
      <GCell>Repository base URL for Package Security Manager (On-prem)</GCell>
      <GCell>—</GCell>
    </GRow>

    <GRow>
      <GCell>`domain`</GCell>
      <GCell>`ANACONDA_AUTH_DOMAIN`</GCell>
      <GCell>Authentication domain (when using anaconda-auth)</GCell>
      <GCell>`anaconda.com`</GCell>
    </GRow>
  </GBody>
</GTable>

### Example configuration for Package Security Manager (On-prem)

For Package Security Manager (On-prem), you can set a default site in `~/.anaconda/config.toml`:

```toml theme={null}
default_site = "psm-on-prem"

[sites."psm-on-prem"]
domain = "your-psm.example.com"
```

### Legacy repo config

When using the legacy `conda repo` entry point, configuration is stored in `~/.conda/repo-cli-config.yaml`. Use `conda repo config` to view or set values.

<Note>
  The `config` command is not available through `anaconda repo`. Use `anaconda sites` to manage site configuration instead.

  ***

  For Package Security Manager (On-prem) workflows, see [PSM user documentation](/psm-on-prem/6.8.0/user/cli).
</Note>
