=================
Command Reference
=================

#. :ref:`cli-anaconda`
#. `API Reference <https://api.anaconda.org/docs>`_

Anaconda client is the command line interface (CLI) to Anaconda Cloud,
and 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.


.. _cli-anaconda:

anaconda
--------

Anaconda Cloud command line manager

.. command-json-output:: anaconda --json-help

Authentication
~~~~~~~~~~~~~~

auth
^^^^

Manage Authorization Tokens

.. command-json-output:: anaconda auth --json-help

Manage Authentication tokens

See also:

-  :ref:`Using Anaconda Cloud Tokens <cloud-accounts-tokens>`


login
^^^^^

Authenticate a user

.. command-json-output:: anaconda login --json-help

whoami
^^^^^^

Print the information of the current user

.. command-json-output:: anaconda whoami --json-help

Informational
~~~~~~~~~~~~~

show
^^^^

Show information about an object

.. command-json-output:: anaconda show --json-help

Show information about an object

Examples:

In your Terminal window or an Anaconda Prompt, run::

    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 Anaconda Cloud

.. command-json-output:: anaconda search --json-help

Search Anaconda Cloud for packages

config
^^^^^^

Anaconda Cloud configuration

.. command-json-output:: anaconda config --json-help

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 Cloud instances. This can be used with the on-site `Anaconda
Enterprise <https://www.anaconda.com/enterprise/>`_.

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

       anaconda -s site_name whoami

-  Set a site as the default::

       anaconda config --set default_site site_name
       anaconda whoami

Add a anaconda-client site


After installing `Anaconda
Enterprise <https://www.anaconda.com/enterprise/>`_ you can add a site
named site\_name like this from the Terminal or an Anaconda Prompt::

    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 be ``True``, ``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 Cloud package utilities

.. command-json-output:: anaconda package --json-help

.. _cli-upload:

upload
^^^^^^

Upload packages to Anaconda Cloud

.. command-json-output:: anaconda upload --json-help

::

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

See Also
''''''''

-  :ref:`Uploading a Conda Package <cloud-uploading-conda-packages>`
-  :ref:`Uploading a PyPI Package <uploading-pypi-packages>`


label
^^^^^

Manage your Anaconda Cloud channels

.. command-json-output:: anaconda label --json-help

copy
^^^^

Copy packages from one account to another

.. command-json-output:: anaconda copy --json-help
