The Flywheel Command-Line Interface (CLI) is a tool for uploading existing data into Flywheel and downloading data from Flywheel to work with offline. The Flywheel CLI is also required to start jobs and build gears. This article explains how to download and install the Flywheel CLI.
Step 1: Download
To download the Flywheel CLI:
- Log in to Flywheel.
- In the upper-right corner, select your account menu, and select Profile.
- Go to the Download Flywheel CLI section, and select your computer's operating system.
A zip file with the following name is downloaded to your computer:
- Linux: fw-linux_amd64.zip
- OS X: fw-darwin_amd64.zip
- Windows: fw-windows_amd64.zip
Step 2: Install
Linux and OS X
- Open the Terminal app.
- Unzip the file.
Inside the folder is the Flywheel CLI, which is named fw.
- In Terminal, navigate to the Flywheel CLI. For example:
- (Optional) Enter this command to add the CLI to your PATH:
This makes it easier to access the Flywheel CLI later on. It is not required to add the Flywheel CLI to your PATH. If you do not to add it to your PATH, you must either enter the file path where fw resides in the commands below or run the commands from the same location as the Flywheel CLI.
sudo mv ./fw /usr/local/bin
- Enter your password when prompted.
- Open the Command Prompt app.
- Unzip fw-windows_amd64.
Inside the folder is the Flywheel CLI, which is named fw.exe.
- (Optional) Enter the following command to add the Flywheel CLI to you PATH:
pathman /rs c:\<pathToYourFlyweehlCLI>
pathman /rs c:\Programs\fw.exe
This makes it easier to access the Flywheel CLI later on. It is not required to add the Flywheel CLI to your PATH. If you do not to add it to your PATH, you must either enter the file path where fw.exe resides in the commands below or run the commands from the same location as the Flywheel CLI.
Step 3: Generate an API key
To start using the CLI to interact with Flywheel, generate an API key.
- On your Flywheel User Profile, go to the API Key section.
- Click Generate API Key.
The API Key appears. This is specific to your Flywheel site. You may only have one active API key for a site at a time.
Step 4: Log in
Use your API key to log in to the CLI:
- Copy your API Key.
- In Terminal or Command Prompt, enter the following command:
fw login <yourapikey>
fw login university.flywheel.io:123456789abcde
- The following message appears:
You are now logged in as <username>!
The Flywheel CLI is now installed. Learn more about how to start using the CLI.