Skip to main content
Documentation

Configuration

Configure the Embedl Hub CLI.

In this guide, you will learn different ways to configure the Embedl Hub CLI. Read this if you’d like have a better understanding of the ins and outs of configuring the CLI or if the recommended configuration methods in the getting started guides aren’t ideal for your workflow.

Configuring an API key

The Embedl Hub Python library requires an API key for authentication. To start, create one under Personal API keys on your profile page.

You can configure the API key using the embedl-hub CLI or by storing the key as an environment variable. A key provided as an environment variable takes precedence over a key provided using the CLI.

Using the CLI

Run the following command to configure your key using the CLI:

embedl-hub auth --api-key <your-key>

Your key will be stored in the plaintext configuration file at ~/.config/embedl-hub/config.yaml, and any existing key in the file will be overwritten.

If you prefer, you can set your API key by manually editing the configuration file:

api_key: 'eh_...'

Be sure to specify your full API key, including the eh_ prefix.

You can review the context of the configuration file with the following command:

embedl-hub show

Using an environment variable

Run the following command to configure your key using an environment variable:

export EMBEDL_HUB_API_KEY=<your-key>

The API key stored in EMBEDL_HUB_API_KEY takes precedence over the key configured using the CLI. If you originally set up your API key using an environment variable and would now like to set up a key using the CLI, be sure to unassign the environment variable first:

unset EMBEDL_HUB_API_KEY

Configuring projects and experiments

You can configure a project and experiment using the embedl-hub CLI or by manually editing a configuration file. This sets the project and experiment as defaults for subsequent commands.

Run the following command to configure a project and experiment using the CLI:

embedl-hub init \
    --project "My Flower Detector App" \
    --experiment "MobileNet Flower Detector"

Alternatively, manually edit the configuration file at ~/.config/embedl-hub/config.yaml as follows:

project: 'My Flower Detector App'
experiment: 'MobileNet Flower Detector'

You can review the context of the configuration file with the following command:

embedl-hub show