Skip to content

kili

Kili Command line Interface.

To get all the available commands, please type: kili project --help.

Usage:

kili [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--version boolean Show the version and exit. False
--help boolean Show this message and exit. False

project

Commands to interact with a Kili project.

Usage:

kili project [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

copy

Copy an existing Kili project.

The copy can include or not the json interface, quality settings, members, assets and labels of the source project.

By default, only the json interface, quality settings and project members are copied.

If no title is provided, the source project title will be used. If no description is provided, the description will be set to an empty string.

Returns the new project id and title once the copy is finished.

\b

Examples

Copy a project and set a new title and new description:

kili project copy clbqn56b331234567890l41c0 \\
    --title "New project title" \\
    --description "New project description"
Copy the json interface but not the members:
kili project copy clbqn56b331234567890l41c0 \\
    --with-json-interface \\
    --without-members

Usage:

kili project copy [OPTIONS] FROM_PROJECT_ID

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--title text New project title. None
--description text New project description. None
--with-json-interface / --without-json-interface boolean Copy json interface. True
--with-quality-settings / --without-quality-settings boolean Copy quality settings. True
--with-members / --without-members boolean Copy members. True
--with-assets / --without-assets boolean Copy assets. False
--with-labels / --without-labels boolean Copy labels. False
--help boolean Show this message and exit. False

create

Create a Kili project.

interface must be a path pointing to your json interface file

If no interface is provided, --from-project can be used to create a new project with the json_interface of another project (assets will not be copied).

\b

Examples

kili project create \\
     path/to/interface.json \\
    --input-type TEXT \\
    --title "Invoice annotation project"
kili project create \\
    --from-project <project_id_src> \\
    --input-type TEXT \\
    --title "Invoice annotation project"

To build a Kili project interface, please visit: \n https://docs.kili-technology.com/docs/customizing-the-interface-through-json-settings

Usage:

kili project create [OPTIONS] [INTERFACE]

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--from-project text project_id of another Kili project None
--title text Project Title. _required
--input-type choice (IMAGE | PDF | TEXT | VIDEO | LLM_RLHF | LLM_INSTR_FOLLOWING) Project input data type. Please check your license to see which ones you have access to. _required
--description text Project description. ``
--stdout-format text Defines how the output table is formatted (see https://pypi.org/project/tabulate/, default: plain). plain
--help boolean Show this message and exit. False

describe

Show project description and analytics.

\b

Examples

kili project describe --project-id <project_id>

Usage:

kili project describe [OPTIONS] PROJECT_ID

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--help boolean Show this message and exit. False

export

Export the Kili labels of a project to a given format.

Info

The supported formats are:

  • Yolo V4, V5, V7, V8 for object detection tasks.
  • Kili (a.k.a raw) for all tasks.
  • COCO for object detection tasks (bounding box and semantic segmentation).
  • Pascal VOC for object detection tasks (bounding box).

Cloud storage

Export with asset download (--with-assets) is not allowed for projects connected to a cloud storage.

Examples

kili project export \
    --project-id <project_id> \
    --output-format coco \
    --output-file /tmp/export.zip
kili project export \
    --project-id <project_id> \
    --output-format yolo_v5 \
    --output-file /tmp/export_split.zip \
    --layout split

Usage:

kili project export [OPTIONS]

Options:

Name Type Description Default
--output-format choice (raw | kili | yolo_v4 | yolo_v5 | yolo_v7 | yolo_v8 | coco | pascal_voc | geojson | llm_v1 | llm_dynamic_v1) Format into which the label data will be converted _required
--output-file text File into which the labels are saved. _required
--layout choice (split | merged) Layout of the label files: 'split' to group labels per job, 'merged' to have one folder with every labels. merged
--single-file boolean Layout of the label files. Single file mode is only available for some specific formats (COCO and Kili). False
--with-assets / --without-assets boolean Download assets in the export. True
--normalized-coordinates / --pixel-coordinates boolean Whether to use normalized coordinates or not. None
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--project-id text Id of the project _required
--verbose boolean Show more logs False
--help boolean Show this message and exit. False

import

Add assets into a project.

Files can be paths to files or to folders. You can provide several paths separated by spaces.

If no Files are provided, --from-csv can be used to import assets from a CSV file with two columns:

  • external_id: external id of the asset.
  • content: paths to the asset file or a url hosting the asset.

\b

Examples

kili project import \\
    dir1/dir2/ dir1/dir3/test1.png \\
    --project-id <project_id>
kili project import \\
    dir1/dir3/video.mp4 \\
    --project-id <project_id> \\
    --frames \\
    --fps 24
kili project import \\
    --from-csv assets_list.csv \\
    --project-id <project_id> \\
    --frames \\
    --fps 24

\b

Unsupported imports

Currently, this command does not support:

  • the import of videos from local frames, rich text and time series assets
  • the import of assets with metadata or with a custom external_id

For such imports, please use the append_many_to_dataset method in the Kili SDK.

Usage:

kili project import [OPTIONS] [FILES]...

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--project-id text Id of the project _required
--from-csv path path to a csv file with required columns:external_id, content required columns: None
--frames boolean Only for a frame project, import videos as frames. The import time is longer with this option. False
--fps integer Only for a frame project, import videos with a specific frame rate None
--verbose boolean Show more logs False
--help boolean Show this message and exit. False

label

Import labels or predictions.

Files can be paths to files or to folders.
You can provide several paths separated by spaces. Label files are JSON files containing labels in the Kili format: the value corresponding to the jsonResponse field of a label (see here for example).
File's name must be equal to asset's external_id.

\b

Examples

To import default labels:

kili project label \\
    dir/labels/ dir/ground-truth/image1.json \\
    --project-id <project_id>
To import labels as predictions:
kili project label \\
    dir/predictions/ \\
    --project-id <project_id> \\
    --prediction \\
    --model-name YOLO-run-3
To import labels as predictions in the Yolo v5 format into a target job:
kili project label \\
    dir/predictions/ \\
    --project-id <project_id> \\
    --prediction \\
    --model-name YOLO-v5 \\
    --metadata-file classes.yml \\
    --target-job IMAGE_DETECTION_JOB \\
    --input-format yolo_v5
    --overwrite True

Usage:

kili project label [OPTIONS] [FILES]...

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--project-id text Id of the project _required
--prediction boolean Tells to import labels as predictions, which means that they will appear as pre-annotations in the Kili interface False
--model-name text Name of the model that generated predictions, if labels are sent as predictions None
--verbose boolean Show more logs False
--input-format choice (yolo_v4 | yolo_v5 | yolo_v7 | kili | raw) Format in which the labels are encoded kili
--metadata-file text File containing format metadata (if relevant to the input format) None
--target-job text Job name in the project where to upload the labels (if relevant to the input format) None
--overwrite boolean when uploading prediction or inference labels, if the overwrite flag is activated, it will overwrite existing labels with the same model name and of the same label type, on the targeted assets. False
--help boolean Show this message and exit. False

list

List your projects.

\b

Examples

kili project list --max 10 --stdout-format pretty

Usage:

kili project list [OPTIONS]

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--stdout-format text Defines how the output table is formatted (see https://pypi.org/project/tabulate/, default: plain). plain
--max integer Maximum number of project to display. 100
--help boolean Show this message and exit. False

member

Commands to interact with Kili project members.

Usage:

kili project member [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

add

Add members to a Kili project.

Emails can be passed directly as arguments. You can provide several emails separated by spaces.

Examples

kili project member add \
    --project-id <project_id> \
    --role REVIEWER \
    john.doe@test.com jane.doe@test.com
kili project member add \
    --project-id <project_id> \
    --from-csv path/to/members.csv
kili project member add \
    --project-id <project_id> \
    --from-project <project_id_scr>

Usage:

kili project member add [OPTIONS] [EMAILS]...

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--project-id text Id of the project _required
--role choice (ADMIN | TEAM_MANAGER | REVIEWER | LABELER) Project role of the added user(s). None
--from-csv path path to a csv file with required columns:email required columns: role None
--from-project text project_id of another Kili project None
--help boolean Show this message and exit. False

list

List the members of the project.

Examples

kili project member list <project_id> --stdout-format pretty

Usage:

kili project member list [OPTIONS] PROJECT_ID

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--stdout-format text Defines how the output table is formatted (see https://pypi.org/project/tabulate/, default: plain). plain
--help boolean Show this message and exit. False

rm

Remove members from a Kili project.

Emails can be passed directly as arguments. You can provide several emails separated by spaces.

Examples

kili project member rm \
    --project-id <project_id> \
    john.doe@test.com
kili project member rm \
    --project-id <project_id> \
    --from-csv path/to/members.csv
kili project member rm \
    --project-id <project_id> \
    --all

Usage:

kili project member rm [OPTIONS] [EMAILS]...

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--project-id text Id of the project _required
--from-csv path path to a csv file with required columns:email required columns: role None
--all boolean Remove all users from project False
--help boolean Show this message and exit. False

update

Update member's role of a Kili project.

Emails can be passed directly as arguments. You can provide several emails separated by spaces.

Examples

kili project member update\
    --project-id <project_id> \
    --role REVIEWER \
    john.doe@test.com
kili project member update \
    --project-id <project_id> \
    --from-csv path/to/members.csv
kili project member update \
    --project-id <project_id> \
    --from-project <project_id_scr>

Usage:

kili project member update [OPTIONS] [EMAILS]...

Options:

Name Type Description Default
--api-key text Your Kili API key. None
--endpoint text Kili API Endpoint. None
--project-id text Id of the project _required
--role choice (ADMIN | TEAM_MANAGER | REVIEWER | LABELER) Project role of the added user(s). None
--from-csv path path to a csv file with required columns:email required columns: role None
--from-project text project_id of another Kili project None
--help boolean Show this message and exit. False