The Flywheel Command-Line Interface (CLI)
The Command-Line Interface (CLI) provides a powerful way to interact with Flywheel programmatically. Use the CLI to import large datasets, download data, run analyses, and automate workflows.
New CLI (in BETA)
Flywheel is currently building an entirely new CLI, which will eventually replace the legacy CLI.
The new CLI is currently available for all customers as a BETA release for OSX and Linux. The new CLI can be installed alongside the legacy CLI and used independently. When installed, the new CLI is available via the fw-beta command.
The new CLI is the only supported CLI for the following use cases which are not available via the legacy CLI:
- Bulk Import
- Bulk Export
- External Storage Management
- Gear Development
- Gear Job Management
Refer to the new CLI documentation for more information.
Quick Start
1. Install the CLI
Download and install the Flywheel CLI for your operating system (Windows, macOS, or Linux).
2. Log in
Get your API key from your Flywheel profile page.
3. Verify your connection
You should see your username and the Flywheel site you're connected to.
4. Explore your data
Ready to import data? See Common Tasks below or jump to our Usage Examples.
Common Tasks
Import Data to Flywheel
Choose the right command for your data type:
| Data Type | Command | Guide |
|---|---|---|
| DICOM files | fw ingest dicom | Import DICOM Files |
| BIDS dataset | fw ingest bids | Import BIDS Data |
| Custom folders | fw ingest template | Create a Template |
| Flywheel exports | fw ingest folder | Import Structured Folders |
Not sure which to use? Read Which Ingest Command Should I Use?
Download Data from Flywheel
Export Data in Bulk
De-identify DICOM Data
Get the Flywheel CLI
First time installing? See Installing the Flywheel CLI
Already installed? See Updating the CLI to ensure compatibility with your Flywheel site.
Usage
To view the available list of commands, run fw -h. More information about each command can found in the Command References documentation folder.
Getting Help
With any command, you can add -h or --help to get more information. For example, with the ls command we'll see in the following section:
Learn More
Getting Started
- Installation Guide - Download and install the CLI
- Usage and Examples - Common CLI commands and workflows
- Configuration Files - Simplify complex commands
Authentication
- Authentication Commands - Login, logout, and status commands
- Check CLI Version - Verify your CLI version
File Management
- File Management Commands - Browse and transfer individual files (
ls,cp,upload,download)
Data Import
- Which Ingest Command Should I Use? - Decision guide
- Import DICOM Files - For medical imaging
- Import BIDS Data - For neuroimaging datasets
- Create an Ingest Template - For custom structures
- Copy Projects Between Sites - For multi-site workflows
Data Export
- Export to BIDS - Export in BIDS format
- Sync to Storage - Sync to external storage
Advanced Topics
- De-identify DICOM Files - Apply de-identification profiles
- Using Ingest Clusters - Speed up large imports
- Troubleshooting - Common issues and solutions
For Developers
- Create, test, and upload a gear - Gear development with CLI