BIDS (Brain Imaging Data Structure) has become one of the standard ways for organizing and sharing neuroimaging data. If you have existing data that is in the BIDS format that you would like to migrate to Flywheel, you can use the Flywheel CLI. Because BIDS follows a standard structure, the Flywheel CLI is able to read the metadata and automatically place your files in to the correct location in Flywheel.
This article explains how to use the Flywheel CLI to import BIDS data.
Prefer videos?
We also have a collection of webinars on using BIDS and Flywheel.
Before you begin
-
Follow these instructions to download and install the Flywheel CLI. If you cannot download the Flywheel CLI to your computer, you can upload smaller batches of files using your web browser.
-
Verify your data follows the BIDs format. If your data does not follow the BIDS format, see our other options for importing data.
Supported Modalities for Flywheel CLI import
Currently, the Flywheel CLI supports importing the MR modality. To import other modalities in to Flywheel (for example, EEG or MEG), use the browser upload.
Example BIDS directory structure
From the BIDS specification documentation, here are two examples of a single session and longitudinal and multi-site study.
Single session example

Longitudinal studies with multiple sessions (visits) example

To import BIDS data in to Flywheel:
-
Open Terminal or Windows Command Prompt.
-
Note the location of the parent folder containing the BIDS data you are importing.
-
Find the group ID for the group where you want to import your data. To find the group ID in the Flywheel UI:
-
Open Chrome, and sign in to your Flywheel account
-
From the menu on the left, select Groups.
-
Note the group ID.
Tip
You must have read/write permission to import data to the group.
-
-
In Terminal or Windows Command Prompt, enter the following command to import the folder:
fw import bids <BIDS_Folder_Location> <group_ID>
For example:
fw import bids ~/Documents/Study1 Ophthalmology
The Flywheel CLI displays the BIDS data it is processing and then shows if it is creating a new container in Flywheel or if it is adding the data to an existing container.
-
The import is complete once the Flywheel CLI stops showing data. If the Flywheel CLI is unable to import any data, an error occurs.
-
Sign in to Flywheel, and view your data:
-
In the left-hand navigation, select Projects.
-
Your imported data will be under a project that matches the name of the parent folder for your BIDS data.
If you used the
--project
option in the command, your data will be under the project you specified in the command.
View your data in the BIDS structure
The Flywheel UI offers the option to view data in the BIDs directory structure. See our BIDS Overview article for more information.
-
If you do not want to import all of your BIDS data, you can import a single subject or session folder to Flywheel. The --session
and --subject
options only upload folders matching the name you give in the command.
Below is a directory in the BIDS format. In this example, you want to upload session 01
for subject Control01
.

-
Open Terminal or Windows Command Prompt.
-
Note the location of the parent folder containing the BIDS data you are importing.
-
Find the group ID for the group where you want to import your data. To find the group ID in the Flywheel UI:
-
Open Chrome, and sign in to your Flywheel account
-
From the menu on the left, select Groups.
-
Note the group ID.
Tip
You must have read/write permission to import data to the group.
-
-
Use the
--subject
and--session
options with theimport bids
command. Using the example directory above, the command to importses-01
for subjectcontrol01
would look like:fw import bids --subject sub-Control01 --session ses-01 ~/Documents/Study1 Ophthalmology
-
The import is complete once the Flywheel CLI stops showing data. If the Flywheel CLI is unable to import data, an error occurs.
-
Sign in to Flywheel, and view your data.
View your data in the BIDS structure
The Flywheel UI offers the option to view data in the BIDs directory structure. See our BIDS Overview article for more information.