This article explains how to download and install the Flywheel CLI.
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
-
Open the Terminal app.
-
Unzip the file.
-
If you are using macOS 10.15 Catalina release (or later), you need to add the Flywheel CLI as a security exception. If you are using an earlier macOS version or Linux, continue to step 4.
To add the Flywheel CLI as a security exception:
- Right-click on fw, and click Open.
- Click Open on the warning prompt.
- Right-click on fw, and click Open.
-
In Terminal, navigate to the Flywheel CLI. For example:
OS X
cd ~/Downloads/darwin_amd64*
Linux
cd ~/Downloads/fw-linux_amd64/linux_amd64*
-
(Optional) To make it easier to access the Flywheel CLI later on, you can add it to your PATH (If you want to learn more about the PATH variable, see this article by Oracle ). You don't need to add the Flywheel CLI to your PATH. However, if you do not add it, you must either enter the file path where fw resides each time your enter a command or you must run the commands from the same folder as fw.
To add the Flywheel CLI, enter the following command:
sudo mv ./fw /usr/local/bin
When prompted, enter your password. - Continue to Step 3: Generate an API key
-
Double-click
fw-windows_amd64<version_number>
to unzip the file. You should see afw.exe
file inside. This is the Flywheel CLI. -
Open the Command Prompt utility as an administrator.
-
From the start menu, search Command.
Command Prompt appears as one of the results. -
Right click on Command Prompt, and choose Run as Administrator.
-
-
In the Command Prompt, navigate to
fw-windows_amd64<version_number>
.For example:
cd C:\Users\[username]\Downloads\windows_amd64*
-
(Optional) To make it easier to access the Flywheel CLI later on, you can add it to your PATH (If you want to learn more about the PATH variable, see this article by Oracle ). You don't need to add the Flywheel CLI to your PATH. However, if you do not add it, you must either enter the file path where fw.exe resides each time your enter a command or you must run the commands from the same folder as fw.exe.
Enter the following command to add the Flywheel CLI to you PATH:
setx path "%path%;C:\your_path"
For example:
setx path "%path%;C:\Programs\fw.exe"
Close and reopen the Command Prompt utility for the new path to be recognized. - Continue to 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.
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>
For example:
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 import data with the CLI or other examples for using the CLI.