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/.Open Account Details page and click Generate New API-Key.Copy the generated API key and use it in the subsequent CLI commands.
To automatically authenticate your local environment, you can create credential file ~/.cosmosid and store your API Key into it in the following format:
Copy
Ask AI
> {> "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:
Copy
Ask AI
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.
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: