Flywheel CLI Command Cheat Sheet
Quick reference for the most common Flywheel CLI commands. For detailed documentation, click the command name.
Getting Help
Run any command with -h or --help to see detailed usage information:
Setup and Authentication
| Command | Syntax | Description |
|---|---|---|
| version | fw version | Display CLI version |
| login | fw login <api_key> | Authenticate with Flywheel |
| status | fw status | Check current login status |
| logout | fw logout | Delete saved API key |
Browse and Navigate
| Command | Syntax | Description |
|---|---|---|
| ls | fw ls [path] | List groups, projects, or containers |
fw ls | List all accessible groups | |
fw ls <group> | List projects in a group | |
fw ls <group>/<project> | List subjects in a project |
Common Options:
--ids- Display database identifiers-a, --all- Show all containers (Site Admin only)
File Operations
| Command | Syntax | Description |
|---|---|---|
| download | fw download <path> [options] | Download files or containers |
fw download <path>/<file> | Download a single file | |
fw download <path> --zip | Download container as zip | |
| upload | fw upload <path> <local_file> | Upload file to container |
| cp | fw cp <source> <destination> | Copy files between locations |
Common Options:
-i, --include <type>- Include only specific file types-e, --exclude <type>- Exclude specific file types-o, --output <path>- Specify output location
Import Data (Ingest)
| Command | Syntax | Description | Guide |
|---|---|---|---|
| ingest dicom | fw ingest dicom <source> <group> <project> | Import DICOM files | DICOM Import |
| ingest bids | fw ingest bids <folder> <group> | Import BIDS dataset | BIDS Import |
| ingest folder | fw ingest folder <source> <group> <project> | Import structured folder | Folder Import |
| ingest template | fw ingest template <folder> <template> | Import using custom template | Template Guide |
| ingest project | fw ingest project <fw://path> <api_key> | Copy project between sites | Project Copy |
Common Ingest Options:
--subject <label>- Override subject label--session <label>- Override session label--de-identify- Apply de-identification during import--deid-profile <name>- Specify de-identification profile--group <id>- Target group ID--project <label>- Target project label
Decision Guide: Which Ingest Command Should I Use?
Export Data
| Command | Syntax | Description | Guide |
|---|---|---|---|
| export bids | fw export bids -p <project> <destination> | Export project in BIDS format | BIDS Export |
| sync | fw sync <source> <destination> | Sync data to external storage | Sync Guide |
Common Export Options:
--subject <label>- Export single subject--session <label>- Export single session--data-type <type>- Export specific data types--source-data- Include source data (BIDS)-x, --full-project- Include analyses and metadata (sync)--dry-run- Preview without transferring files
De-identification
| Command | Syntax | Description |
|---|---|---|
| deid | fw deid test <profile> <file> | Test de-ID profile on local file |
fw deid apply <profile> <file> | Apply de-ID profile to local file |
Note: The fw deid command is for testing profiles locally. Production de-identification is applied during ingest or via gears.
More Info: De-identification Guide | Create De-ID Profile
Common Flags (All Commands)
| Flag | Description |
|---|---|
-h, --help | Show command help |
--config-file <file> | Use configuration file |
-y, --yes | Skip confirmation prompts |
--debug | Enable debug logging |
--quiet | Suppress log messages |
--timezone <tz> | Set timezone for imports |
Flywheel Path Format
All CLI commands use the fw:// path format to reference containers:
Path with spaces: Use quotes:
File Type Filtering
Many commands support filtering by file type:
Common file types: dicom, nifti, pdf, tabular, source code
Configuration Files
Simplify complex commands by using configuration files:
Example config file:
Learn more about configuration files
Tips and Best Practices
Performance
- Use
--clusterflag for large imports (if available) - Use
--dry-runto preview operations before executing - Filter by file type to reduce transfer times
Security
- Store API keys securely (use password managers)
- Never commit API keys to version control
- Use
cat api-key.txt | xargs fw loginto avoid command history
Troubleshooting
- Add
--debugflag to see detailed logs - Check
fw statusto verify authentication - Use
fw lsto confirm paths before operations
Need help? See the CLI Troubleshooting Guide
See Also
Getting Started:
- Installation Guide - Download and install the CLI
- Usage Examples - Common workflows and examples
- Configuration Files - Simplify complex commands
Command References:
- File Management - Detailed
ls,cp,upload,downloaddocumentation - Ingest Commands - Complete import documentation
- Export Commands - Complete export documentation
Troubleshooting:
- CLI Troubleshooting Guide - Common issues and solutions
- Finding CLI Logs - Locate detailed logs
New CLI (Beta):
- fw-beta Documentation - Next-generation CLI