CLI Overview
The RedBrick CLI is a tool to interact programmatically with the RedBrick AI platform. The CLI provides a developer friendly way to perform important functions like export, project creation etc.
The RedBrick SDK works on Mac, windows, and linux, and is available on pypi. The SDK is compatible with 3.70 <= Python < 3.10
The CLI is included along with the Python SDK after version 0.7.0.

Generate an API Key

You can create an API key for your organization under Organization Settings, which is accessible by clicking on the bottom left corner of the screen.

Install the CLI

The CLI can be installed from pypy.
pip install redbrick-sdk

Create a credentials config

To easily manage authentication so that you can interact with your RedBrick AI account, you will have to create a credentials config which will be stored on your system.
redbrick config
> Org ID: TODO
> Profile name: TODO
✔ RedBrick AI Organization
Retrieve your organization ID from project settings, or the application URL -<org_id>/. Your credentials will be saved at ~/.redbrick/credentials using the profile name specified.

Clone an existing project

To perform any actions on your project, you have to first clone your project locally. You can do this by selecting from the list of projects.
redbrick clone
> Project-1 (project_1_id)
Project-2 (project_2_id)
You can also directly specify the project_id of your project (found in project settings, or<orgid>/<projectid>).
redbrick clone project_1_id
Doing so will create a project folder in your existing directory.
tree .
└── Project-1

Create a project

You can also create a project from the CLI. First, create a directory inside which you will initialize your project.
mdkir cli-project
cd cli-project
Inside your project directory, you can initialize a new project.
redbrick init
> Name: cli-project
> Label:
> Taxonomy:
> Reviews: 2
  • Name: Enter the name of your project.
  • Label: Define the type of your project e.g. DICOM_SEGMENTATION
  • Taxonomy: Select the taxonomy you're going to use for this project
  • Review: Select how many review stages you'd like to add to this workflow e.g. 2
Copy link
Generate an API Key
Install the CLI
Create a credentials config
Clone an existing project
Create a project