> ## Documentation Index
> Fetch the complete documentation index at: https://docs.redbrickai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI (Legacy)

> The RedBrick CLI offers a simple interface to quickly import and export your images & annotations, and perform other high-level actions.

<Warning>These docs are subject to the "ephemeral source problem" but help our AI bot support you better. Please go to our full CLI documentation [here](https://sdk.redbrickai.com/cli.html) to be sure you're referencing the latest version.</Warning>

usage**:** redbrick **\[-**h**]** **\[-**v**]** **\[--**completion **\{**bash**,**zsh**,**tcsh**}]**
&#x20;               **\{**config**,**init**,**clone**,**info**,**export**,**upload**,**report**}** **...**

## Named Arguments

-v, --version

show program’s version number and exit

\--completion

Possible choices: bash, zsh, tcsh

print shell completion script

## Commands

command

Possible choices: config, init, clone, info, export, upload, report

## Sub-commands

### config

Setup the credentials for your CLI.

redbrick config **\[-**h**]** **\[--**org ORG**]** **\[--**key KEY**]** **\[--**url URL**]** **\[--**profile PROFILE**]**
&#x20;               **\[--**force**]**
&#x20;               **\{**list**,**set**,**add**,**remove**,**clear**,**verify**}** **...**

#### Positional Arguments

sub\_command

Possible choices: list, set, add, remove, clear, verify

#### Named Arguments

\--org, -o

Org ID

\--key, -k

API Key

\--url, -u

Endpoint URL, should default to [https://api.redbrickai.com.](https://api.redbrickai.com.)

\--profile, -p

Profile name

\--force, -f

Force create new credentials

Default: False

#### Sub-commands

##### list

List all credential profiles

redbrick config list **\[-**h**]**

##### set

Set your default credentials profile

redbrick config set **\[-**h**]** **\[**profile**]**

###### Positional Arguments

profile

Profile name

##### add

Add a new profile

redbrick config add **\[-**h**]** **\[--**org ORG**]** **\[--**key KEY**]** **\[--**url URL**]**
&#x20;                   **\[--**profile PROFILE**]**

###### Named Arguments

\--org, -o

Org ID

\--key, -k

Add your API Key.

\--url, -u

Endpoint URL, should default to [https://api.redbrickai.com.](https://api.redbrickai.com.)

\--profile, -p

Define a name for your authentication profile.

##### remove

Remove a profile

redbrick config remove **\[-**h**]** **\[**profile**]**

###### Positional Arguments

profile

Profile name

##### clear

Clear all credentials

redbrick config clear **\[-**h**]**

##### verify

Verify a profile

redbrick config verify **\[-**h**]** **\[**profile**]**

###### Positional Arguments

profile

Profile name

### init

Create a new project. We recommend creating a new directory and naming it after your project, initializing your project within the new directory.

$mkdir new-project$ cd new-project
\$ redbrick init

redbrick init **\[-**h**]** **\[--**name NAME**]** **\[--**taxonomy TAXONOMY**]** **\[--**reviews REVIEWS**]**
&#x20;             **\[--**workspace WORKSPACE**]** **\[--**sibling**-**tasks SIBLING\_TASKS**]**
&#x20;             **\[**path**]**

#### Positional Arguments

path

Local path of the empty project directory

Default: “.”

#### Named Arguments

\--name, -n

Project name

\--taxonomy, -t

Taxonomy name

\--reviews, -r

Number of review stages

\--workspace, -w

The workspace that you want to add this project to

\--sibling-tasks

Number of tasks created for each uploaded datapoint

### clone

The project will be cloned to a local directory named after your `project name`.

redbrick clone **\[-**h**]** **\[**project**]** **\[**path**]**

#### Positional Arguments

project

Project ID or Name

path

Local path of the empty project directory

### info

Get a project’s information

redbrick info **\[-**h**]** **\[--**get **\{**labelstorage**}]** **\[--**set **\{**labelstorage**}]** **\[**path**]**

#### Positional Arguments

path

Path of project (Default: current directory)

Default: “.”

#### Named Arguments

\--get, -g

Possible choices: labelstorage

Get a project’s setting information

\--set, -s

Possible choices: labelstorage

Set a project setting

### export

Export data for a project

redbrick export **\[-**h**]** **\[--with-**files**]** **\[--**dicom**-**to**-**nifti**]** **\[--**old**-**format**]**
&#x20;               **\[--**without**-**masks**]** **\[--**semantic**]** **\[--**binary**-**mask**]** **\[--**single**-**mask**]**
&#x20;               **\[--**no**-**consensus**]** **\[--**png**]** **\[--**rt**-**struct**]** **\[--**mhd**]** **\[--**clear**-**cache**]**
&#x20;               **\[--**concurrency CONCURRENCY**]** **\[--**stage STAGE**]**
&#x20;               **\[--**destination DESTINATION**]**
&#x20;               **\[**type**]**

#### Positional Arguments

type

Export type: (latest \[default], groundtruth, )

Default: “latest”

#### Named Arguments

\--with-files

Export with files (e.g. images/video frames)

Default: False

\--dicom-to-nifti

Convert DICOM images to NIfTI. Applicable when `--with-files` is set.

Default: False

\--old-format

Whether to export tasks in old format. (Default: False)

Default: False

\--without-masks

Exports only tasks JSON without downloading any segmentation masks. Note: This is not recommended for tasks with overlapping labels.

Default: False

\--semantic

Whether to export all segmentations as semantic\_mask. This will create one segmentation file per class. If this is set to True and a task has multiple instances per class, then attributes belonging to each instance will not be exported.

Default: False

\--binary-mask

Whether to export all segmentations as binary masks. This will create one segmentation file per instance.

Default: False

\--single-mask

Whether to export all segmentations in a single file. Binary mask will be considered if both binary\_mask and single\_mask are set.

Default: False

\--no-consensus

Whether to export tasks without consensus info. If None, will default to export with consensus info, if it is enabled for the given project.

Default: False

\--png

Export labels as PNG masks

Default: False

\--rt-struct

Export labels as DICOM RT-Struct. (Only for DICOM images)

Default: False

\--mhd

Export segmentation masks in MHD format.

Default: False

\--clear-cache

Clear local cache

Default: False

\--concurrency, -c

Concurrency value (Default: 10)

Default: 10

\--stage, -s

Export tasks that are currently in the given stage. Applicable only with `redbrick export` and `redbrick export latest`

\--destination, -d

Destination directory (Default: current directory)

Default: “.”

### upload

Upload files to a project

redbrick upload **\[-**h**]** **\[--as-**frames**]**
&#x20;               **\[--**type **\[\{**DICOM3D**,**NIFTI3D**,**NRRD3D**,**IMAGE2D**,**VIDEO**,**VIDEOFRAMES**}]]**
&#x20;               **\[--as-**study**]** **\[--**json**]** **\[--**segment**-**map SEGMENT\_MAP**]**
&#x20;               **\[--**storage STORAGE**]** **\[--**label**-**storage LABEL\_STORAGE**]**
&#x20;               **\[--**ground**-**truth**]** **\[--**label**-**validate**]** **\[--**prune**-**segmentations**]**
&#x20;               **\[--**rt**-**struct**]** **\[--**mhd**]** **\[--**clear**-**cache**]**
&#x20;               **\[--**concurrency CONCURRENCY**]**
&#x20;               directory

#### Positional Arguments

directory

The directory containing files to upload to the project

#### Named Arguments

\--as-frames

Upload video from image frames

Default: False

\--type, -t

Possible choices: DICOM3D, NIFTI3D, NRRD3D, IMAGE2D, VIDEO, VIDEOFRAMES

Import file type \[’`DICOM3D`’, ‘`NIFTI3D`’, ‘`NRRD3D`’, ‘`IMAGE2D`’, ‘`VIDEO`’, ‘`VIDEOFRAMES`’]

Please refer to [our documentation](https://docs.redbrickai.com/importing-data/direct-data-upload), to understand the required folder structure and supported file types.

Default: “DICOM3D”

\--as-study

Group files by study

Default: False

\--json

Upload json files with list of task objects

Default: False

\--segment-map, -m

Segmentation mapping file path

\--storage, -s

Storage method: (redbrick \[default], public, )

Default: “redbrick”

\--label-storage

Label Storage method: (same as items storage `--storage` \[default], redbrick, public, )

\--ground-truth

Upload tasks directly to ground truth.

Default: False

\--label-validate

Validate NIfTI label instances and segmentMap. By default, the uploaded NIfTI files are not validated during upload, which can result in invalid files being uploaded. Using this argument validates the files before upload, but may increase the upload time.

Default: False

\--prune-segmentations

Prune segmentations that are not part of the series.

Default: False

\--rt-struct

Upload segmentations from DICOM RT-Struct files.

Default: False

\--mhd

Upload segmentations from MHD files.

Default: False

\--clear-cache

Clear local cache

Default: False

\--concurrency, -c

Concurrency value (Default: 10)

Default: 10

### report

Generate an audit report for a project. Exports a JSON file containing all actions & events associated with every task, including:

* Who annotated the task

* Who uploaded the data

* Who reviewed the task

* and more.

redbrick report **\[-**h**]** **\[--**concurrency CONCURRENCY**]** **\[**type**]**

#### Positional Arguments

type

Export type: (all \[default], groundtruth)

Default: “all”

#### Named Arguments

\--concurrency, -c

Concurrency value (Default: 10)

Default: 10

[NextFormats](https://sdk.redbrickai.com/formats/index.html)[PreviousPython SDK](https://sdk.redbrickai.com/sdk.html)

Copyright © 2023, RedBrick AI

Made with [Sphinx](https://www.sphinx-doc.org/) and [@pradyunsg](https://pradyunsg.me/)'s [Furo](https://github.com/pradyunsg/furo)

On this page

* [Named Arguments](https://sdk.redbrickai.com/cli.html#named-arguments)

* [Commands](https://sdk.redbrickai.com/cli.html#commands)

* [Sub-commands](https://sdk.redbrickai.com/cli.html#Sub-commands)

  * [config](https://sdk.redbrickai.com/cli.html#config)

    * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments)

    * [Named Arguments](https://sdk.redbrickai.com/cli.html#named-arguments_repeat1)

    * [Sub-commands](https://sdk.redbrickai.com/cli.html#Sub-commands_repeat1)

      * [list](https://sdk.redbrickai.com/cli.html#list)

      * [set](https://sdk.redbrickai.com/cli.html#set)

        * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments_repeat1)

      * [add](https://sdk.redbrickai.com/cli.html#add)

        * [Named Arguments](https://sdk.redbrickai.com/cli.html#named-arguments_repeat2)

      * [remove](https://sdk.redbrickai.com/cli.html#remove)

        * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments_repeat2)

      * [clear](https://sdk.redbrickai.com/cli.html#clear)

      * [verify](https://sdk.redbrickai.com/cli.html#verify)

        * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments_repeat3)

  * [init](https://sdk.redbrickai.com/cli.html#init)

    * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments_repeat4)

    * [Named Arguments](https://sdk.redbrickai.com/cli.html#named-arguments_repeat3)

  * [clone](https://sdk.redbrickai.com/cli.html#clone)

    * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments_repeat5)

  * [info](https://sdk.redbrickai.com/cli.html#info)

    * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments_repeat6)

    * [Named Arguments](https://sdk.redbrickai.com/cli.html#named-arguments_repeat4)

  * [export](https://sdk.redbrickai.com/cli.html#export)

    * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments_repeat7)

    * [Named Arguments](https://sdk.redbrickai.com/cli.html#named-arguments_repeat5)

  * [upload](https://sdk.redbrickai.com/cli.html#upload)

    * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments_repeat8)

    * [Named Arguments](https://sdk.redbrickai.com/cli.html#named-arguments_repeat6)

  * [report](https://sdk.redbrickai.com/cli.html#report)

    * [Positional Arguments](https://sdk.redbrickai.com/cli.html#positional-arguments_repeat9)

    * [Named Arguments](https://sdk.redbrickai.com/cli.html#named-arguments_repeat7)

![Read the Docs](data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmc6c3ZnCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZyIKICAgeD0iMHB4IgogICB5PSIwcHgiCiAgIHZpZXdCb3g9IjY5NCAxOTcgMzQ2LjY5ODU1IDM5OS45ODQ3NyIKICAgc29kaXBvZGk6ZG9jbmFtZT0ibG9nby1saWdodC5zdmciCiAgIHdpZHRoPSIzNDYuNjk4NTUiCiAgIGhlaWdodD0iMzk5Ljk4NDc3IgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjMuMiAoMDkxZTIwZWYwZiwgMjAyMy0xMS0yNSwgY3VzdG9tKSIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHN2ZzpkZWZzCiAgICAgaWQ9ImRlZnMxMiIgLz4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgaWQ9Im5hbWVkdmlldzEyIgogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiIKICAgICBib3JkZXJjb2xvcj0iIzAwMDAwMCIKICAgICBib3JkZXJvcGFjaXR5PSIwLjI1IgogICAgIGlua3NjYXBlOnNob3dwYWdlc2hhZG93PSIyIgogICAgIGlua3NjYXBlOnBhZ2VvcGFjaXR5PSIwLjAiCiAgICAgaW5rc2NhcGU6cGFnZWNoZWNrZXJ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