.. _mongocli-config:

===============
mongocli config
===============

.. default-domain:: mongodb

.. contents:: On this page
   :local:
   :backlinks: none
   :depth: 1
   :class: singlecol

Configure and manage your user profiles.

You can define the settings that the MongoDB CLI uses to interact with MongoDB services.
All settings are optional. You can specify settings individually by running: 
$ mongocli config set --help 
You can also use environment variables (MCLI_*) when running the tool.
To find out more, see the documentation: https://docs.mongodb.com/mongocli/stable/configure/environment-variables/.

Syntax
------

.. code-block::
   :caption: Command Syntax

   mongocli config [options]

.. Code end marker, please don't delete this comment

Options
-------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - -h, --help
     - 
     - false
     - help for config
   * - --service
     - string
     - false
     - Type of MongoDB service. Valid values are cloud-manager or ops-manager. This value defaults to "cloud-manager".

Inherited Options
-----------------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - -P, --profile
     - string
     - false
     - Name of the profile to use from your configuration file. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.

Examples
--------

.. code-block::
   :copyable: false

   #
   
.. code-block::
   :copyable: false

   # Configure a profile to interact with Atlas:
   mongocli config
   
.. code-block::
   :copyable: false

   # Configure a profile to interact with Atlas for Government:
   mongocli config --service cloudgov
   
   
.. code-block::
   :copyable: false

   # Configure a profile to interact with Cloud Manager:
   mongocli config --service cloud-manager
   
.. code-block::
   :copyable: false

   # Configure a profile to interact with Ops Manager:
   mongocli config --service ops-manager

Related Commands
----------------

* :ref:`mongocli-config-delete` - Delete a profile.
* :ref:`mongocli-config-describe` - Return the profile you specify.
* :ref:`mongocli-config-edit` - Opens the config file with the default text editor.
* :ref:`mongocli-config-list` - Return a list of available profiles by name.
* :ref:`mongocli-config-rename` - Rename a profile.
* :ref:`mongocli-config-set` - Configure specific properties of a profile.


.. toctree::
   :titlesonly:

   delete </command/mongocli-config-delete>
   describe </command/mongocli-config-describe>
   edit </command/mongocli-config-edit>
   list </command/mongocli-config-list>
   rename </command/mongocli-config-rename>
   set </command/mongocli-config-set>

