Skip to content

flyw

Flywheel CLI is a Command Line Interface for managing your data and site configuration within the Flywheel Biomedical Research Data Platform.

Installing locally

The stable version can be installed on Linux, OSX and Windows using a bootstrap script.

Linux and OSX

Prerequisites

The install script requires bash, curl, grep, tar, and shasum (or sha256sum) in order to download, extract, and verify the CLI.

# latest stable version
curl https://storage.googleapis.com/flywheel-dist/fw-cli/stable/install.sh | sh
# OR compatible version with a given site
curl https://storage.googleapis.com/flywheel-dist/fw-cli/stable/install.sh \
| FW_SITE_URL=https://<MY_SITE_DOMAIN> sh
# OR a specific version you choose
curl https://storage.googleapis.com/flywheel-dist/fw-cli/0.23/install.sh | sh

By default, flyw will be extracted under ~/.fw with all of its dependencies. The installation folder can be customized using the envvar FW_CLI_INSTALL_DIR.

Shell profiles are automatically updated to include flyw on the PATH for bash and zsh using ~/.bash_profile and ~/.zshenv respectively.

Windows (Powershell)

Prerequisites

The install script requires basic Powershell utilities and tar in order to download, extract, and verify the CLI.

# the latest stable version
irm https://storage.googleapis.com/flywheel-dist/fw-cli/stable/install.ps1 | iex
# OR a compatible version with a given site
$env:FW_SITE_URL="https://<MY_SITE_DOMAIN>"; `
irm https://storage.googleapis.com/flywheel-dist/fw-cli/stable/install.ps1 | iex
# OR a specific version you choose
irm https://storage.googleapis.com/flywheel-dist/fw-cli/0.23/install.ps1 | iex

Other versions

While stable is recommended since it always points to the most recent CLI tag, other versions are also available if needed:

  • latest - the bleeding-edge build from the tip of the main branch
  • <branch> - branch-specific builds for feature testing
  • <tag> - tag builds for explicitly using a specific version

Tab Completion

Tab completion is supported by the CLI. This can be enabled for bash and zsh with the following commands:

flyw --completion >/etc/bash_completion.d/flyw
source /etc/bash_completion.d/flyw

Alteratively, the following commands can also be used to enable tab completion:

# for bash
flyw --completion | tee -a ~/.bashrc
source ~/.bashrc

# for zsh
flyw --completion | tee -a ~/.zshrc
source ~/.zshrc

Running in Docker

Alternatively the CLI can be run within the flywheel/cli Docker image:

docker run --rm -itv$HOME:$HOME -w$HOME \
    -eFW_UID=$(id -u) -eFW_GID=$(id -g) \
    -hflyw flywheel/cli \
    flyw --help

Configuration

The CLI can be configured through multiple sources with the following priority order (highest to lowest):

  1. Command-line arguments - Arguments passed directly to commands
  2. See available CLI arguments
  3. Environment variables - Variables set directly in your shell (e.g., export FW_CLI_CONNECT_TIMEOUT=30)
  4. .env file - A .env file in your current working directory
  5. Config file - The ~/.fw/config.yml file (managed via flyw config commands)
  6. Defaults - Built-in default values

See the flyw config documentation for all available settings and management options.

Version skew

The following version skew table defines supported CLI versions for each Flywheel release. Compatibility is guaranteed only for the combinations listed below.

Flywheel \ flyw 0.29 0.30 0.31 0.32 0.33 0.34 0.35
21.4
21.5
21.6
22.0
22.1
22.2
22.3

Usage