Install and Setup
These details are written for Terminal on Mac. Please adjust for Windows use.
1. Register with the CosmosID-HUB and obtain API key
To access the pipelines within the CosmosID-HUB CLI, you need an active account on the CosmosID-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/.
Open Account Details page 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:
> {
> "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:
cosmosid --api_key=YOUR_API_KEY <command>
Please secure your API key when sharing code, as it will give any user access to your account, data, and credits.
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:
sudo pip3 install cosmosid_cli
CONDA:
conda install -c cosmosid -c conda-forge cosmosid-cli
3. Test your install
To test your install, type:
cosmosid
Updated 4 days ago