Export data with CLI commands

The fastest way to export datasets from V7 is through CLI commands. This is especially true for datasets containing a large number of images or videos. Exporting via the CLI will also allow you to export the images and videos from a dataset alongside their annotations.

Basics for using CLI Commands

Open the Command Prompt in Windows or Terminal on a Mac.

For each command in these instructions, paste the text into the Command Prompt or Terminal and hit Enter to run the command.

1. Setup

Install or update the Darwin Software Development Kit using these instructions.

2. Authentification

Next, you'll need to generate a team-specific API key to enable remote operations.

In V7, head to the Settings menu and click API Keys to generate a new key.

Name the key, select all access permissions, and click Create. Then, copy the access key to your clipboard—you’ll need it shortly.

Back in the Command Prompt or Terminal—this is normal.
, enter the following command:

darwin authenticate

You’ll be prompted to enter the API key you just created. Since the key is encrypted, it won’t be visible when you paste it into the Command Prompt/Terminal.

Enter Y and hit Enter when prompted to make your team in V7 the default team.

This will create a configuration file on your device at ~/.darwin/config.yaml.

Now you're ready to upload your data

3. Export data

Now that you're all set up, open the dataset that you would like to export, and select Export. Generate a new export version and copy the CLI command that V7 creates to your clipboard.

Once the command is copied, we can use the command below to pull the dataset. Replace team-name/dataset-name:export-version in the snippet below with the CLI command that you've copied from V7:

darwin dataset pull team-slug/dataset-slug:export-version

Hit enter, and you're all set! A progress bar will appear, showing you the progress of your download. The destination path for your download will appear following the downloaded at.

In addition, the export can also be generated automatically using this command before the pull command above.

darwin dataset export dataset-slug export-version

For example, for a team with the dataset called fast_cars who wants to generate the first export, this would be:

darwin dataset export fast_cars 1.0