> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cosmosid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install and Setup

> These details are written for Terminal on Mac. Please adjust for Windows use.

<Tabs>
  <Tab title="MacOS">
    ## 1. Register with the Cosmos-Hub and obtain API key

    To access the pipelines within the Cosmos-Hub CLI, you need an active account on the Cosmos-Hub. Please contact your Business Development representative to obtain an account if you do not have one yet. Once you have an account credentials:

    Login to [https://app.cosmosid.com/](https://app.cosmosid.com/).

    Open [Account Details page](/docs/setting-up-your-account) and click Generate New API-Key.

    Copy the generated API key and use it in the subsequent CLI commands.

    ### Saving your API Key to local credential file

    To automatically authenticate your local environment, you can create credential file *\~/.cosmosid* and store your API Key into it in the following format:

    ```bash theme={null}
    >  {
    >    "api_key": "<YOUR API KEY STRING>"
    >  }
    ```

    If you chose not to store your API key in a credential file, you must directly input your API Key in each command. To use command-based API Key authentication, pass your key as an argument to the *cosmosid* command:

    ```bash theme={null}
      cosmosid --api_key=YOUR_API_KEY <command>
    ```

    <Warning>
      Please secure your API key when sharing code, as it will give any user access to your account, data, and credits.
    </Warning>

    ## 2. Prepare the environment and install CLI

    The CLI tool requires a Python environment. We recommend using a virtual environment with Python versions 3.7-3.11. If you need more details about the virtual environment, you can review the pyenv documentation and the python venv module documentation.

    CosmosID CLI version 2.1.17 can be installed using either of the following commands in the command line:

    **PIP3**:

    ```bash theme={null}
     sudo pip3 install cosmosid_cli
    ```

    **CONDA**:

    ```bash theme={null}
     conda install -c cosmosid -c conda-forge cosmosid-cli
    ```

    ## 3. Test your install

    To test your install, type:

    ```bash theme={null}
      cosmosid
    ```

    <Frame>
      <img src="https://mintcdn.com/cmbio/1_URKzklO7hYjRsk/images/docs/c4d13d8c76a66a2a8ec2337c25e219c4fd6720fe7b1b3af77199892477f8a824-Screenshot_2024-12-04_at_3.10.51_PM.png?fit=max&auto=format&n=1_URKzklO7hYjRsk&q=85&s=64ff129fbdf8d92a494df68e95642f5b" alt="CosmosID CLI" width="2132" height="1222" data-path="images/docs/c4d13d8c76a66a2a8ec2337c25e219c4fd6720fe7b1b3af77199892477f8a824-Screenshot_2024-12-04_at_3.10.51_PM.png" />
    </Frame>
  </Tab>

  <Tab title="Windows" />
</Tabs>
