Skip to main content
anaconda-repo-cli is the command-line interface for managing channels, packages, and artifacts on Anaconda Platform (Self-hosted). Use it to script repository operations, integrate with CI/CD pipelines, or work with your repository directly from a shell application.
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.
1

Install the CLI

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:
conda remove conda-repo-cli
  1. Install the anaconda-repo-cli package by opening Anaconda Prompt (Terminal on macOS/Linux) and running the following command:
    conda install anaconda-repo-cli
    
  2. Verify your installation was successful and view which version you’ve installed:
    anaconda repo --version
    
2

Configure the CLI

Configuring the CLI tells anaconda-repo-cli which Anaconda Platform domain to use for channels, mirrors, and authentication.
By default, the CLI connects to anaconda.com. You can register additional domains (for Anaconda Platform (Self-hosted)) and set any registered domain as the default.
Use anaconda sites add to register your deployment’s domain. Include --default to set the domain as the default:
anaconda sites add --domain <FQDN> --default
This writes the site configuration to ~/.anaconda/config.toml and sets it as the default site. You can verify the result with:
anaconda sites list
You can also inspect the full configuration for sites:
anaconda sites show
For the full list of anaconda sites subcommands, see the sites command reference.
If you prefer to edit the configuration file directly, add the following to ~/.anaconda/config.toml:
default_site = "anaconda-platform"

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

Log in to Anaconda Platform with the CLI

To log in to Anaconda Platform using the CLI, run the following command:
anaconda login
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.
4

Configure conda to use Anaconda Platform

The CLI comes with a configuration wizard that adds channels from your Anaconda Platform organization to your .condarc.
Before running the wizard, run:
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.
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.
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 —offsetand—limit` flags to paginate through your channels.
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.
Your output will look something like this:
Example command workflow
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
If configuring your .condarc with the wizard creates problems, you can revert the changes by running:
anaconda repo wizard --restore

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.
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.
anaconda repo whoami

List your channels

List all channels available to your account.
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 self-hosted/legacy setups, the repo client config file.

Common configuration options

Parameter
Environment Variable
Description
Default
default_site
Default Anaconda Platform site to use
url
Repository base URL (self-hosted)
domain
ANACONDA_AUTH_DOMAIN
Authentication domain (when using anaconda-auth)
anaconda.com

Example configuration (self-hosted)

For self-hosted Anaconda or PSM, you can set a default site in ~/.anaconda/config.toml:
default_site = "self-hosted"

[sites."self-hosted"]
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.
The config command is not available through anaconda repo. Use anaconda sites to manage site configuration instead.
For Package Security Manager (on-premises) workflows, see PSM user documentation.