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, to enable remote operations, you'll first need to generate a team-specific API key.

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

Name the key, tick all of the access permissions, and click Create before copying the access key to your keyboard. You'll need it in a second.

Back in the Command Prompt/Terminal, enter the command below:

darwin authenticate

You'll then be prompted to enter the API key that you just created. The API key is encrypted, so don't be surprised if you don't see the actual text after pasting 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 we've got the command 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 your download's progress. The destination path for your download will appear following downloaded at.

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

darwin dataset export dataset-slug export-version

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

darwin dataset export fast_cars 1.0