Skip to main content

CLI Overview

The vfrog CLI provides fast, scriptable access to the vfrog platform from the command line. Use it to manage projects, upload datasets, run SSAT workflows, train models, run inference, and export data — all without the web UI.

Installation

Download the binary for your platform:

# macOS (Apple Silicon)
curl -L https://github.com/vfrog-ai/vfrog-cli/releases/latest/download/vfrog-darwin-arm64 -o vfrog
chmod +x vfrog && sudo mv vfrog /usr/local/bin/

# macOS (Intel)
curl -L https://github.com/vfrog-ai/vfrog-cli/releases/latest/download/vfrog-darwin-amd64 -o vfrog
chmod +x vfrog && sudo mv vfrog /usr/local/bin/

# Linux (AMD64)
curl -L https://github.com/vfrog-ai/vfrog-cli/releases/latest/download/vfrog-linux-amd64 -o vfrog
chmod +x vfrog && sudo mv vfrog /usr/local/bin/

Windows: Download vfrog-windows-amd64.exe from the latest release, rename it to vfrog.exe, and add its directory to your PATH.

Verify the installation:

vfrog version

Environment Binaries

Each release includes binaries preconfigured for different environments:

BinaryEnvironmentAPI URL
vfrogProductionhttps://api.vfrog.ai
vfrog-stagingStaginghttps://api-staging.vfrog.ai
vfrog-devDevelopmenthttps://api-dev.vfrog.ai

Credentials are baked into each binary at build time. You can run multiple environment binaries side-by-side without conflicts.

Authentication

Log in with your vfrog platform credentials:

# Interactive login (prompts for email and password)
vfrog login

# Non-interactive login (for scripts and CI/CD)
vfrog login --email user@example.com --password "$VFROG_PASSWORD"

Authentication tokens are stored locally and refresh automatically when expired.

note

The CLI uses email/password authentication, which is separate from the API key authentication used by the REST API. See the API authentication guide for API key setup.

Configuration

The CLI uses a hierarchical context system. Most commands require an active organisation and project:

Organisation → Project → Object

Set your context after logging in:

# List and set organisation
vfrog organisations list
vfrog config set organisation --organisation_id <org_id>

# List and set project
vfrog projects list
vfrog config set project --project_id <project_id>

# List and set object (needed for iteration commands)
vfrog objects list
vfrog config set object --object_id <object_id>

View the current configuration:

vfrog config show
warning

Changing the active organisation automatically clears the active project. Changing the active project automatically clears the active object.

Context Requirements

CommandsRequires
projectsorganisation_id
dataset_images, objects, iterations, exportorganisation_id + project_id
iterations list, iteration number lookupsobject_id

Config File Locations

Each environment binary uses a separate config file:

BinaryConfig File
vfrog (production)~/.vfrog/config-production.json
vfrog-staging~/.vfrog/config-staging.json
vfrog-dev~/.vfrog/config-dev.json

On Windows, config files are stored in %USERPROFILE%\.vfrog\.

API Key Precedence

For inference commands, API keys are resolved in this order:

  1. --api-key flag
  2. VFROG_API_KEY environment variable
  3. api_key in the config file

Global Flags

FlagTypeDescription
--jsonbooleanOutput in JSON format (supported by all commands)
--configstringCustom config file path
-h, --helpbooleanHelp for any command

Shell Autocompletion

The CLI supports autocompletion for bash, zsh, fish, and PowerShell:

# Zsh (add to ~/.zshrc)
source <(vfrog completion zsh)

# Bash (add to ~/.bashrc)
source <(vfrog completion bash)

# Fish
vfrog completion fish > ~/.config/fish/completions/vfrog.fish

# PowerShell
vfrog completion powershell | Out-String | Invoke-Expression

Next Steps