Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

CLI: projects and Data Units

Upload media files and folders with the Unitlab CLI, monitor Batch Queues, attach datasets and inspect project Data Units with verified commands.

Use the CLI to upload media, manage projects, attach published data and inspect work items. The main example uploads two images, waits for processing, and checks the resulting filenames.

Task
Route

Upload media files or folders

CLI commands on this page, Python SDK or frontend.

The current CLI has no annotation-import command. A JSON label file is not imported by project upload.

Before you start

Use Unitlab 3.1.6 and complete installation and authentication.

Prepare the following folder and run commands from road-scenes/:

road-scenes/
└── images/
    ├── road.jpg
    └── crossing.jpg

These examples use placeholders, not real IDs:

Placeholder
Replace it with

PROJECT_ID

The id of your target project from project list or project create.

BATCH_QUEUE_ID

The batch_queue_id returned by the upload.

CLOUD_STORAGE_ID, FOLDER_ID, DATASET_ID

The ID of an existing connection, Assets folder, or dataset.

DATA_UNIT_ID, SOURCE_LINK_ID

An ID returned by project data-units or project sources.

Find or create a project

List existing projects and use the intended project ID:

If you need a new project instead, create one:

Save its returned id and use it as PROJECT_ID below. To use an existing workspace ontology at creation, add --ontology ONTOLOGY_ID, replacing that placeholder with the ontology ID.

Upload media files and folders

Choose one example. The folder command uploads both example images; the single-file command uploads only road.jpg. Running both uploads road.jpg again. The video tab is a separate example requiring drive.mp4.

The example uses 30 FPS. Choose the source frame rate when importing labels for original frames. Without this flag, video upload defaults to 1 FPS.

--source is required; --directory is its alias. Folder collection is recursive, so no recursive flag is needed. Ordinary files are sent with their basenames, not a recreated local folder tree. Use unique filenames when different source folders contain identically named files.

The result includes total, uploaded, failed and batch_queue_id. For the valid two-image folder, expect total: 2, uploaded: 2, and failed: 0. Save the queue ID and replace BATCH_QUEUE_ID in the next commands with that value. Upload transfer can finish before server processing, and unsupported extensions are skipped. See supported source files.

Wait for processing and inspect failures

The wait command always prints JSON and does not take a --json flag. For the valid two-image example, the final status should show:

The output can include additional fields. Check that batch-queue data contains road.jpg and crossing.jpg. A terminal queue may still contain failed items; inspect failed as well as processing. A waiting timeout does not cancel processing.

Upload returns a nonzero exit code for per-file upload failures. Keep the successful items and retry only corrected failures. The wait command reports processing results, so a script should also check its JSON failed count.

To find a queue later:

Import media from connected storage

Multiple paths can follow the storage ID. Paths are relative to the saved connection prefix. Directory paths end with / and select immediate files; select child directories separately. Include --fps when the selection contains video. Save the returned batch_queue_id and check processing as above. See CLI cloud storage.

Attach existing data

Choose a folder or published dataset already available in your workspace. Run the preview first, check the selected item count, and then run the corresponding attachment command. These commands reuse existing data; they do not upload your local images/ folder.

Use published dataset versions. A --dataset with no published version is skipped unless you add --publish-unpublished, which publishes it as version 1 and attaches it. Supply --fps if video is included. If attachment returns a Batch Queue ID, wait for it before importing labels or starting dependent work. See datasets and versions.

LiDAR scene preview and upload

The dry run lists detected scenes, frame counts, sensors, cameras and unused files without uploading. --dry-run and --split-sensor-folders require --type pointcloud. They are not general flags for image uploads.

When matching sensor folders represent independent recordings, add --split-sensor-folders. For scene folders, ZIPs, calibration and camera requirements, see LiDAR preparation.

Check one scene's processing, or process a failed scene again, with its item id from batch-queue data. A failed scene's status gives the reason in error:

Inspect Data Units and sources

Data Units are the project's work items: loose media or Data Groups. Their workflow status is separate from upload processing status. Related work commands are documented under CLI workflow tasks.

project data-units also filters with --search (text in the name), --data-type (for example image or video), --batch-queue BATCH_QUEUE_ID, and --kind datasource (loose media) or --kind group (Data Groups).

Preview the effect before detaching a source:

To rename a project, use unitlab project update PROJECT_ID --name "Road scenes v2" --json; --description changes its description. To delete an entire project, resolve its exact ID first, then use unitlab project delete PROJECT_ID. The command asks for confirmation and aborts unless you confirm; add --yes to skip the prompt in a script.

JSON lists and annotation files

The CLI does not accept a generic file-list JSON through --source or an upload --data-file flag. Use a local script to read and validate such a list, then upload each path. The SDK file-list example explains the separate Batch Queues this creates.

Import labels through the Python SDK or frontend once media is ready. Use Assets grouping configuration when the JSON describes filename rules for related files.

Explore Unitlab's data curation platform.