The Flywheel command-line interface (CLI) is an additional Flywheel program you download to use on your computer's Command Prompt (Windows) or Terminal (Mac) app. It is helpful to have a basic understanding of how the Command Prompt and Terminal apps work to get the most out of the Flywheel CLI (you can learn more about the Command Prompt and Terminal app, in this introductory article by Codcademy.
This article explains how to install the Flywheel CLI onto your computer.
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:
OS X: fw-darwin_amd64.zip
To start using the CLI to interact with your Flywheel site, generate an API key.
Go back to your Flywheel User Profile from Step 1.
Scroll down to to the API Key section.
Click Generate API Key.
Do not share your API key with anyone – even Flywheel support. This key should be treated like a password used to sign in to Flywheel.
Follow the steps for your OS either Windows or Linux/Mac
fw-windows_amd64<version_number>to unzip the file. You should see a
fw.exefile inside. This is the Flywheel CLI program.
Open the Command Prompt 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 the folder containing the Flywheel CLI or
To quickly add the file path to Command Prompt, drag and drop the folder icon containing
fw.exe.The filepath will automatically be added to the command.
Continue to Step 4: Log in your Flywheel instance
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.
In Terminal, navigate to the Flywheel CLI. For example:
Continue to Step 4: log in from the CLI
Copy the API key generated from Step 2 above.
In Terminal or Command Prompt, enter:
fw.exe login <APIkey>
<filepath to fw> login <yourAPIKey>
The following message appears:
You are now logged in as <Flywheel username>!
You may have noticed in the steps above you have to include the full filepath for the fw application when you enter a command. If you plan to use the CLI often, you may want to add it to your system PATH. Adding the Flywheel CLI to your PATH means that you only need to use
fw to invoke the Flywheel CLI. If you want to learn more about the PATH variable, see this article by Oracle.
To begin, move the
fw.exefile to a more permanent location on your computer. For example
C:\Program Files\Common Files
Open the start menu and search for advance system settings, and click View advanced system settings
Click Environment Variables
Select PATH from the list, and click Edit.
Click New, and enter the filepath to fw.exe.
Click Ok in each window
In the command prompt enter:
The CLI shows your login information