Install and Set Up the CLI

You will need Python >=3.10 to use the Roboflow Python package.

After you have Python installed, run the following command to install:

pip install roboflow

After installing, test that the CLI works:

roboflow --help

Authentication

There are three ways to authenticate:

export ROBOFLOW_API_KEY=rf_xxxxx

This is the recommended approach for CI/CD, automation, and AI coding agents. No interactive prompts required.

Option 2: API key flag

roboflow --api-key rf_xxxxx project list

Pass the key directly to any command. Useful for one-off commands.

Option 3: Interactive login

roboflow login

Open the link in your browser, get the token, and paste it in the terminal. Credentials are saved to ~/.config/roboflow/config.json so you only need to do this once.

You can also log in non-interactively with:

Verify Authentication

This shows your current workspace and a masked API key.

Set Default Workspace

If you have access to multiple workspaces, set which one is used by default:

Shell Completion (Optional)

Enable tab completion for commands, options, and arguments:

To make it permanent, add the eval line to your shell profile (~/.zshrc, ~/.bashrc, etc.).

Last updated

Was this helpful?