Skip to content

The Flywheel Command-Line Interface (CLI)

The Command-Line Interface (CLI) provides a powerful way to interact with Flywheel. This article gives an overview of the features of the Flywheel CLI along with some examples.

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.

Get the Flywheel CLI

See our article on downloading and installing the Flywheel CLI.

If you already have the Flywheel CLI installed, see our article on 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.

> fw -h
Flywheel command-line interface

Usage:
  fw [command]

Available Commands:
  cp          Copy a local file to a remote location, or vice-a-versa
  deid        Create and test de-identification template
  download    Download a remote file or container
  export      Export data from Flywheel
  ingest      Ingest large datasets into Flywheel
  login       Login to a Flywheel instance
  logout      Delete your saved API key
  ls          Show remote files
  status      See your current login status
  sync        Sync files from Flywheel to storage
  upload      Upload a local file to a Flywheel container
  version     Print CLI version

Flags:
  -h, --help   help for fw

Use "fw [command] --help" for more information about a command.

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:

usage: fw ls [-h] [--config-file CONFIG_FILE | --no-config] [-y] [--ca-certs CA_CERTS] [--timezone TIMEZONE] [--debug | --quiet]
             [--ids] [-a]
             [path]

positional arguments:
  path                  The path to list subfolders and files

options:
  -h, --help            show this help message and exit
  --config-file CONFIG_FILE, -C CONFIG_FILE
                        Specify configuration options via config file
  --no-config           Do NOT load the default configuration file
  -y, --yes             Assume the answer is yes to all prompts
  --ca-certs CA_CERTS   The file to use for SSL Certificate Validation
  --timezone TIMEZONE   Set the effective local timezone for imports
  --debug               Turn on debug logging
  --quiet               Squelch log messages to the console
  --ids                 Display database identifiers
  -a, --all             Show all

Learn More

The following articles explain how to use the Flywheel CLI for common tasks: