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 roboflowAfter installing, test that the CLI works:
roboflow --helpAuthentication
There are three ways to authenticate:
Option 1: Environment variable (recommended for scripts and agents)
export ROBOFLOW_API_KEY=rf_xxxxxThis 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 listPass the key directly to any command. Useful for one-off commands.
Option 3: Interactive login
roboflow loginOpen 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:
roboflow auth login --api-key rf_xxxxxVerify Authentication
roboflow auth statusThis 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:
roboflow auth set-workspace my-workspace-idShell Completion (Optional)
Enable tab completion for commands, options, and arguments:
# Zsh
eval "$(roboflow completion zsh)"
# Bash (requires bash >= 4.4)
eval "$(roboflow completion bash)"
# Fish
roboflow completion fish | sourceTo make it permanent, add the eval line to your shell profile (~/.zshrc, ~/.bashrc, etc.).