Command reference — Anaconda Enterprise 4.4 documentation

Anaconda Enterprise: Documentation

# Command reference

Anaconda Client is the command line interface (CLI) to Anaconda Repository. You can use it to log in, log out, manage your account, upload files, generate access tokens, view tokens and other tasks.

The full Client command reference is shown below. You can also view this command reference in a terminal window with the command `anaconda --help` or `anaconda -h`.

See also: Anaconda Cloud API Reference.

- anaconda
- Authentication
  - auth
  - login
  - whoami
- Informational
  - show
  - search
  - config
- Package management
  - package
  - upload
  - label
  - copy

## anaconda

Repository command line manager.

optional arguments

-h / --help
  show this help message and exit
-V / --version
  show program's version number and exit

output

--show-traceback
  Show the full traceback for chalmers user errors (default: tty)
--hide-traceback
  Hide the full traceback for chalmers user errors
-v / --verbose
  print debug information ot the console
-q / --quiet
  Only show warnings or errors the console
--color
  always display with colors
--no-color
  never display with colors

anaconda-client options

-t / --token
  Authentication token to use. May be a token or a path to a file containing a token
-s / --site
  select the anaconda-client site to use

Commands

auth
  Manage Authorization Tokens
build
  Anaconda build client for continuous integration, testing and building packages
channel
  [DEPRECATED in favor of label] Manage your Anaconda Cloud channels
config
  Anaconda client configuration
copy
  Copy packages from one account to another
download
  Download notebooks from Anaconda Cloud
groups
  Manage Groups
label
  Manage your Anaconda Cloud labels
login
  Authenticate a user
logout
  Log out from Anaconda Cloud
notebook
  Interact with notebooks in anaconda.org
package
  Package utils
remove
  Remove an object from Anaconda Cloud. Must refer to the formal package name as it appears in the URL of the package. Also use anaconda show to see list of pacakge names. Example: anaconda remove continuumio/empty-example-notebook
search
  Search Anaconda Cloud
show
  Show information about an object
upload
  Upload packages to Anaconda Cloud
whoami
  Print the information of the current user
worker
  Anaconda build client for continuous integration, testing and building packages

## Authentication

### auth

Manage authorization tokens.

optional arguments

-h / --help
  show this help message and exit
-n / --name
  A unique name so you can identify this token later. View your tokens at anaconda.org/settings/access
-o / --org / --organization
  Set the token owner (must be an organization)

token creation arguments

These arguments are only valid with the `--create` action

--strength
  None
--strong
  Create a longer token (default)
-w / --weak
  Create a shorter token
--url
  The url of the application that will use this token
--max-age
  The maximum age in seconds that this token will be valid for
-s / --scopes
  Scopes for token. For example if you want to limit this token to conda downloads only you would use --scopes "repo conda:download"
--out
  None

actions

-x / --list-scopes
  list all authentication scopes
-l / --list
  list all user authentication tokens
-r / --remove
  remove authentication tokens
-c / --create
  Create an authentication token
-i / --info / --current-info
  Show information about the current authentication token

See also token.

### login

Authenticate a user.

optional arguments

-h / --help
  show this help message and exit
--hostname
  Specify the host name of this login, this should be unique (default: 0212-wwarner.local)
--username
  Specify your username. If this is not given, you will be prompted
--password
  Specify your password. If this is not given, you will be prompted

### whoami

Print the information of the current user.

optional arguments

-h / --help
  show this help message and exit

## Informational

### show

Show information about an object.

positional arguments

  Package written as USER[/PACKAGE[/VERSION[/FILE]]]

optional arguments

-h / --help
  show this help message and exit

EXAMPLE:

    anaconda show anaconda
    anaconda show anaconda/python
    anaconda show anaconda/python/2.7.5
    anaconda show anaconda/python/2.7.5/linux-64/python-2.7.5-0.tar.bz2

### search

Search Repository for packages.

positional arguments

  Search string

optional arguments

-h / --help
  show this help message and exit
-t / --package-type
  only search for packages of this type

### config

Binstar configuration.

optional arguments

-h / --help
  show this help message and exit
--type
  The type of the values in the set commands

actions

--set
  sets a new variable: name value
--get
  get value: name
--remove
  removes a variable
--show
  show all variables
-f / --files
  show the config file names
--show-sources
  Display all identified config sources

location

-u / --user
  set a variable for this user
-s / --system / --site
  set a variable for all users on this machine

#### Client configuration

Get, set, remove or show the Client configuration.

#### Client sites

Client sites are a mechanism to allow users to quickly switch between Repository instances. This can be used with the on-site Anaconda Enterprise.

- Invoke the anaconda command with the `-s/--site` option like this:

      anaconda -s site_name whoami

- Set a site as the default:

      anaconda config --set default_site site_name
      anaconda whoami

##### Add a Client site

After installing Anaconda Enterprise, you can add a site named “site_name” as follows:

    anaconda config --set sites.site_name.url
    "http://<anaconda-enterprise-ip>:<port>/api"
    anaconda config --set default_site site_name

##### Site options vs. global options

All options can be set as global options that affect all sites or site options that affect only one site.

By default, options are set globally:

    anaconda config --set OPTION VALUE

If you want the option to be limited to a single site, prefix the option with `sites.site_name`:

    anaconda config --set sites.site_name.OPTION VALUE

##### Common Client configuration options

- Url—Set the Anaconda API URL. Default is `https://api.anaconda.org`.
- Verify_ssl—Perform SSL validation on the https requests. Verify_ssl may be `True`, `False` or a path to a root CA pem file.

#### Toggle auto_register when doing anaconda upload

The default is `yes`, automatically creating a new package when uploading. If `no`, then an upload fails if the package name does not already exist on the server:

    anaconda config --set auto_register yes|no

## Package management

### package

Repository package utilities.

positional arguments

  Package to operate on

optional arguments

-h / --help
  show this help message and exit

actions

--add-collaborator
  username of the collaborator you want to add
--list-collaborators
  list all of the collaborators in a package
--create
  Create a package

metadata arguments

--summary
  Set the package short summary
--license
  Set the package license
--license-url
  Set the package license url

privacy

--personal
  Set the package access to personal This package will be available only on your personal registries
--private
  Set the package access to private This package will require authorized and authenticated access to install

### upload

Upload packages to Repository.

positional arguments

  Distributions to upload

optional arguments

-h / --help
  show this help message and exit
-c / --channel
  [DEPRECATED] Add this file to a specific channel. Warning: if the file channels do not include "main",the file will not show up in your user channel
-l / --label
  Add this file to a specific label. Warning: if the file labels do not include "main",the file will not show up in your user label
--no-progress
  Don't show upload progress
-u / --user
  User account or Organization, defaults to the current user
--no-register
  Don't create a new package namespace if it does not exist
--register
  Create a new package namespace if it does not exist
--build-id
  Anaconda Cloud Build ID (internal only)
-i / --interactive
  Run an interactive prompt if any packages are missing
-f / --fail
  Fail if a package or release does not exist (default)
--force
  Force a package upload regardless of errors

metadata options

-p / --package
  Defaults to the package name in the uploaded file
-v / --version
  Defaults to the package version in the uploaded file
-s / --summary
  Set the summary of the package
-t / --package-type
  Set the package type, defaults to autodetect
-d / --description
  description of the file(s)
--thumbnail
  Notebook's thumbnail image

    anaconda upload CONDA_PACKAGE_1.bz2
    anaconda upload notebook.ipynb
    anaconda upload environment.yml

See also:

- Uploading a conda package.
- Uploading PyPI packages.

### label

Manage your Repository channels.

optional arguments

-h / --help
  show this help message and exit
-o / --organization
  Manage an organizations labels
--copy
  None
--list
  list all labels for a user
--show
  Show all of the files in a label
--lock
  Lock a label
--unlock
  Unlock a label
--remove
  Remove a label

### copy

Copy packages from one account to another.

positional arguments

  Package - written as user/package/version[/filename] If filename is not given, copy all files in the version

optional arguments

-h / --help
  show this help message and exit
--to-owner
  User account to copy package to (default: your account)
--from-channel
  [DEPRECATED]Channel to copy packages from
--to-channel
  [DEPRECATED]Channel to put all packages into
--from-label
  Label to copy packages from
--to-label
  Label to put all packages into