Comment on page
Roboflow CLI Documentation
Learn more details and examples behind the functionality for our command line interface
All of our command-line interface functionality are subcommands under our parent command
roboflow
.This command is used to authenticate the user. This is usually the first step before using any of our other commands.
roboflow auth
To authenticate, it will prompt you with a browser URL that it will open (or you can copy the URL into a browser) to get a CLI authentication token which you can paste into the command line, after which you can use the rest of the commands.

Authing the roboflow CLI to access your workspaces
The CLI will store this info in a local config file at
~/.config/roboflow/config.json
. You can also see where the config is stored and the configuration data by running roboflow config
and if you'd like to reset your CLI or delete the API keys from your system, you can use roboflow config reset
.After you enter the authentication key, if you selected to give the CLI access to multiple workspaces, you will be prompted to select one. You can change this later using
roboflow workspace select
.This command has two subcommands. If a subcommand isn't provided, it will default to the
roboflow config show
command. This command shows the current configuration of the Roboflow CLI.
roboflow config
roboflow config show
It returns information on your configuration data. Here's what an output might look like:
{
workspaces: {
'8aXOThHzC8XDd7z4QWh2pM3HASk2': {
id: '8aXOThHzC8XDd7z4QWh2pM3HASk2',
name: 'Workspace Name',
url: 'workspace-name',
apiKey: '*API Key Here*'
}
},
RF_WORKSPACE: 'workspace-name',
RF_APP_URL: 'https://app.roboflow.com',
RF_API_URL: 'https://api.roboflow.com',
RF_OBJECT_DETECTION_URL: 'https://detect.roboflow.com',
RF_CLASSIFICATION_URL: 'https://classify.roboflow.com',
RF_INSTANCE_SEGMENTATION_URL: 'https://outline.roboflow.com',
RF_SEMANTIC_SEGMENTATION_URL: 'https://segment.roboflow.com'
}
This command resets the current configuration of the Roboflow CLI
This command clears all the config information set and will require you to run
roboflow auth
again if you want to use any commands.roboflow config reset
This command will open a Robolfow workspace in your browser.
roboflow open
It accepts one option:
-w
or--workspace
: (string; defaults to selected default workspace) You can use this to specify a workspace. Use a workspace ID or URL string. Learn more about finding your workspace ID.
This command will not work on headless systems which don't have a browser.
This command has three primary subcommands related to workspace management. It does not have a default subcommand.
Use this command to select a default workspace. Many commands and actions in the Roboflow CLI will default to acting on the default workspace unless specified otherwise.
roboflow workspace select
? Pick a default workspace …
Workspace (workspace)
Workspace 2 (workspace-two)
▸ Workspace 3 (workspace-three)
Use this command to get detailed information about a workspace.
roboflow workspace get
It accepts one option:
-w
or--workspace
: (string; defaults to selected default workspace) You can use this to specify a workspace. Use a workspace ID or URL string. Learn more about finding your workspace ID.
It returns detailed information about the specified workspace, including information about projects in that workspace. Here's what that output might look like:
{
workspace: {
name: 'Workspace',
url: 'workspace',
members: 1,
projects: [
projects...
]
}
}
Use this command to get quick information about all the workspaces that the CLI has access to.
roboflow workspace list
It returns light information about each workspace, listing the link and ID. Here's what that might look like:
Default Workspace:
Leo Ueno
link: https://app.roboflow.com/leo-ueno
id: leo-ueno
Other Workspaces:
Workspace Two
link: https://app.roboflow.com/workspace-two
id: workspace-two
This command has three primary subcommands related to workspace management. It does not have a default subcommand.
Use this command to get quick information about all the projects that the CLI has access to.
roboflow project list
This command takes one option:
-w
or--workspace
: (string; defaults to selected default workspace) You can use this to specify a workspace. Use a workspace ID or URL string. Learn more about finding your workspace ID.
It returns light information about each project, including the link, project ID, type, version count, image count, and class list. Here's what that might look like:
Aircraft Detection
link: https://app.roboflow.com/leo-ueno/aircraft-detection-ctgkk
id: leo-ueno/aircraft-detection-ctgkk
type: instance-segmentation
versions: 0
images: 0
classes:
Aircraft Segmentation
link: https://app.roboflow.com/leo-ueno/aircraft-segmentation-kvoti
id: leo-ueno/aircraft-segmentation-kvoti
type: instance-segmentation
versions: 0
images: 2965
classes: Boeing 787,Boeing 777,Airbus A380,Boeing 767,Boeing 757,Boeing 727,Antonov AN-225 Mriya,Airbus A330,Boeing 747,Boeing 737
Use this command to get detailed information about one specific project.
roboflow project get *projectId*
This command takes one argument:
projectId
: (string; required) The project to get information on. Get the project ID usingroboflow project list
,roboflow workspace get
or through the web UI.
This command takes one option:
-w
or--workspace
: (string; defaults to selected default workspace) You can use this to specify a workspace. Use a workspace ID or URL string. Learn more about finding your workspace ID.
It returns detailed information about the specified project, as well as light information on the workspace. Here's what that might look like:
{
workspace: { name: 'Leo Ueno', url: 'leo-ueno', members: 1 },
project: {
id: 'leo-ueno/smoke-object-detection',
type: 'object-detection',
name: 'Smoke (Object Detection)',
created: 1688767894.359,
updated: 1691163505.539,
images: 141,
unannotated: 0,
annotation: 'smoke',
versions: 2,
public: false,
license: 'Private',
splits: { valid: 28, test: 14, export: 0, train: 99 },
colors: { smoke: '#C7FC00' },
classes: { smoke: 195 },
icon: {
original: 'https://sources.roboflow.com/8RXOThHzC8XDd7z4QWh2pM3HASk1/oXF4XBtIZaSrj4Z16ktC/original.jpg',
thumb: 'https://sources.roboflow.com/8RXOThHzC8XDd7z4QWh2pM3HASk1/oXF4XBtIZaSrj4Z16ktC/thumb.jpg',
annotation: 'https://sources.roboflow.com/8RXOThHzC8XDd7z4QWh2pM3HASk1/oXF4XBtIZaSrj4Z16ktC/annotation-smoke.png'
},
preprocessing: {
'auto-orient': true,
resize: { format: 'Stretch to', width: 640, height: 640 }
},
augmentation: {
rotate: { degrees: 10 },
shear: { horizontal: 10, vertical: 10 },
crop: { min: 0, percent: 20 },
image: { versions: 5 }
}
},
versions: [
{
id: 'leo-ueno/smoke-object-detection/2',
name: '2023-07-13 9:39pm',
created: 1689309594.667,
images: 537,
splits: { valid: 28, test: 14, train: 495 },
model: {
id: 'smoke-object-detection/2',
endpoint: 'https://detect.roboflow.com/smoke-object-detection/2',
start: 1689312512.404,
end: 1689313321.026,
fromScratch: false,
tfjs: true,
oak: true,
map: '55.60',
recall: '60.47',
precision: '68.94'
},
preprocessing: {
'auto-orient': true,
resize: { format: 'Stretch to', width: 640, height: 640 }
},
augmentation: {
image: { versions: 5 },
*Other augmentations...*
},
exports: [ 'yolov5pytorch' ]
},
*Other versions...*
]
}
This command is used for importing a local dataset to Roboflow.
roboflow import *folder*
This command takes one argument:
folder
: (file path; required) The file path to a folder that contains your dataset.
This command takes three options:
-w
or--workspace
: (string; defaults to selected default workspace) You can use this to specify a workspace. Use a workspace ID or URL string. Learn more about finding your workspace ID.-p
or--project
: (string; required, will be prompted if not provided) Specify a project to upload the dataset to. Use a project ID. Learn more about finding your project ID.-c
or--concurrent
: (integer; defaults to10
) Specify how many images to upload at one time concurrently.
This command can be used for downloading a dataset version for a Roboflow project locally.
roboflow download *datasetUrl*
This command takes one argument:
datasetUrl
: (string; required) Choose which dataset to download.- This is the combination of
*workspace ID*/*project ID*/*version*
. - For example:
leo-ueno/aircraft-detection/1
- You can get this dataset from a selected version in the "Versions" tab of your project.
https://app.roboflow.com/
stellasphere/test-woenr/1
This command takes three options:
-w
or--workspace
: (string; defaults to selected default workspace) You can use this to specify a workspace. Use a workspace ID or URL string. Learn more about finding your workspace ID.-v
or--version
: (integer; optional) You can use this to specify a version of your dataset. Learn more about finding your version number.-f
or--format
: (format; will be prompted if not provided) Select the output format of your dataset.
If the version is provided in the
datasetUrl
argument, the --version
option will be ignored. If both are not present, the latest version will be downloaded.This command can be used for running inference on an image.
roboflow infer *file* --model *model ID*
This command has one argument:
file
: (file path; required) The file path to the image that you'd like your model to infer on.
This command has four options:
-m
or--model
: (string; required) The model ID of the model that you are trying to infer on. Learn more about finding model IDs.-c
or--confidence:
(float; defaults to 0.5) A threshold for limiting the returned predictions based on confidence.-o
or--overlap:
(float; defaults to 0.5) A threshold for limiting the returned predictions based on overlap with other predictions in the vicinity.-w
or--workspace
: (string; defaults to selected default workspace) You can use this to specify a workspace. Use a workspace ID or URL string. Learn more about finding your workspace ID.
The
--overlap
options are for object detection models only.It will return a JSON response, the same as the standard inference API. For more details on the response, check out the inference API page.
Your default workspace is set when using
roboflow auth
and can be changed using roboflow workspace select
Last modified 3mo ago