Command Reference¶
Anaconda client is the command line interface (CLI) to Anaconda Repository. It can be used for logging in, logging out, managing your account, uploading files, generating access tokens, viewing tokens, and other tasks as shown by running
anaconda -h
The full command reference is shown below.
anaconda¶
Anaconda Repository command line manager
- -h / --help
- show this help message and exit
- -V / --version
- show program's version number and exit
- --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
- -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
- 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
- -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)
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
- -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
Manage Authentication tokens
See also:
login¶
Authenticate a user
- -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
- -h / --help
- show this help message and exit
Informational¶
show¶
Show information about an object
- Package written as USER[/PACKAGE[/VERSION[/FILE]]]
- -h / --help
- show this help message and exit
Show information about an object
Examples:
anaconda show continuumio
anaconda show continuumio/python
anaconda show continuumio/python/2.7.5
anaconda show sean/meta/1.2.0/meta.tar.gz
search¶
Search Anaconda Repository
- Search string
- -h / --help
- show this help message and exit
- -t / --package-type
- only search for packages of this type
Search Anaconda Repository for packages
config¶
Binstar configuration
- -h / --help
- show this help message and exit
- --type
- The type of the values in the set commands
- --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
- -u / --user
- set a variable for this user
- -s / --system / --site
- set a variable for all users on this machine
anaconda-client configuration
Get, Set, Remove or Show the anaconda-client configuration.
anaconda-client sites
anaconda-client sites are a mechanism to allow users to quickly switch between Anaconda Repository instances. This is primarily used for testing the anaconda alpha site. But also has applications for the on-site Anaconda Enterprise.
anaconda-client comes with two pre-configured sites alpha
and
binstar
you may use these in one of two ways:
Invoke the anaconda command with the
-s/--site
option like this to use the alpha testing site:anaconda -s alpha whoami
Set a site as the default:
anaconda config --set default_site alpha anaconda whoami
Add a anaconda-client site
After installing Anaconda Enterprise you can add a site named site_name like this:
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 - affecting all sites, or site options - affecting only one site
By default options are set globally like this:
anaconda config --set OPTION VALUE
If you want the option to be limited to a single site, prefix the option
with sites.site_name
like this:
anaconda config --set sites.site_name.OPTION VALUE
Common anaconda-client configuration options
url
: Set the anaconda api url (default: https://api.anaconda.org)verify_ssl
: Perform ssl validation on the https requests. verify_ssl may beTrue
,False
or a path to a root CA pem file.
Toggle auto_register when doing anaconda upload
The default is yes, automatically create a new package when uploading. If no, then an upload will fail if the package name does not already exist on the server.
anaconda config --set auto_register yes|no
Managing Packages¶
package¶
Anaconda Repository package utilities
- Package to operate on
- -h / --help
- show this help message and exit
- --add-collaborator
- username of the collaborator you want to add
- --list-collaborators
- list all of the collaborators in a package
- --create
- Create a package
- --summary
- Set the package short summary
- --license
- Set the package license
- --license-url
- Set the package license url
- --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 Anaconda Repository
- Distributions to upload
- -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
- -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
label¶
Manage your Anaconda Repository channels
- -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
- Package - written as user/package/version[/filename] If filename is not given, copy all files in the version
- -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