Skip to content

Configuring the CLI

The CLI requires both the domain to be set as well as an access token. CLI configuration is performed via the mdai config commands.

Usage: mdai config [options] [command]

  -h, --help            display help for command

  list                  List current configuration
  domain [domain]       Configure domain (e.g., [view current if no argument supplied]
  token [token]         Configure access token [view current if no argument supplied]
  auto-upgrade [value]  Configure auto-upgrade (y/n, yes or no)
  reset                 Resets current configuration
  help [command]        display help for command

Set your domain, for example: mdai config domain Note that domains will always be in the form *

The mdai CLI also requires an access token, which authenticates you as the user. To create a new token or select an existing token, navigate to the "Personal Access Tokens" tab on your user settings page at the specified domain (e.g., Then, set your access token, for example: mdai config token 6b0c9063d8ff2fd7e710981065248f5f.

Required Configuration

  mdai config domain
  mdai config token MY_ACCESS_TOKEN

Automatic Update

By default, auto-upgrade for CLI is disabled. If you would like to keep up with the latest version, you can enable auto-upgrade through configuration. If enabled, commands that require the latest version will fetch the latest package and rerun the command using the updated version. If disabled, commands that require the latest version will simply output a text notification.

To enable:

mdai config auto-upgrade yes

To disable:

mdai config auto-upgrade no

Custom CA Certificates

If you are running the CLI in an environment that requires a custom root CA certificate (e.g., Zscaler), then you can supply the path to the custom root CA certificate via the NODE_EXTRA_CA_CERTS environment variable.

On MacOS, for example:

echo "export NODE_EXTRA_CA_CERTS=<Path to Certificate>\bundle.pem" >> $HOME/.bashrc

On Windows, for example:

[System.Environment]::SetEnvironmentVariable("NODE_EXTRA_CA_CERTS", "C:\<Path to Certificate>\ca-bundle.pem", "Machine")

# Depending on your permissions level, you may need to run one the following instead.
# If the environment variable is set at the process level, then need to set on every session.
[System.Environment]::SetEnvironmentVariable("NODE_EXTRA_CA_CERTS", "C:\<Path to Certificate>\ca-bundle.pem", "User")
[System.Environment]::SetEnvironmentVariable("NODE_EXTRA_CA_CERTS", "C:\<Path to Certificate>\ca-bundle.pem", "Process")

Then, restart your command line shell environment.