Airplane CLI
The Airplane CLI,
airplane
, is the primary way you'll create and deploy new tasks. The CLI also
provides utility methods for getting/setting configs, executing tasks, viewing runs, etc...Installing the CLI
Installing the CLI
If you use Homebrew, you can install the CLI by running:
bashCopied1brew install airplanedev/tap/airplane
Otherwise, you can install with our installation script:
bashCopied1curl -L https://github.com/airplanedev/cli/releases/latest/download/install.sh | sh
You can install the CLI with our installation script:
bashCopied1curl -L https://github.com/airplanedev/cli/releases/latest/download/install.sh | sh
You can install the CLI from PowerShell with our installation script:
bashCopied1iwr https://github.com/airplanedev/cli/releases/latest/download/install.ps1 -useb | iex
Authentication
Authentication
You can log in to the CLI by running
airplane login
. This will open a browser window to complete
authentication—you can close the window when you're done.bashCopied1airplane login2# If you want to change teams or log out: airplane logout
If instead you want to authenticate on behalf of a service account,
perhaps to use the CLI in automation, you can set the
AP_API_KEY
and AP_TEAM_ID
environment
variables to the API key and team id of the service account:bashCopied1export AP_API_KEY=<your_api_key>2export AP_TEAM_ID=<your_team_id>3# deploy is run on behalf of the service account4airplane deploy ./path/to/tasks --yes
To confirm you're logged in, you can run
airplane auth info
:bashCopied1airplane auth info2Signed in as youremail@example.com3Using team MyTeam (ID: 1rGi5xu8bPuxT8TV0KKwP10RQuD)
Updating the CLI
Updating the CLI
To update the CLI, run the following:
bashCopied1airplane update
The
airplane update
command was added in
v0.3.172
(August 9th, 2023). If you
get an Unknown command "update" for "airplane"
error, you should upgrade the CLI by instead
re-running the installation command.Local development with Studio
Local development with Studio
The Airplane Studio provides a rich development experience that allows you to quickly iterate on
Tasks and Views, even before they've been deployed. To manage
code for tasks and views locally, we recommend using the Airplane CLI to start Studio with a local
development server.
Starting Studio
Starting Studio
Airplane Studio can be started locally with
airplane dev
:bashCopied1$ airplane dev2Discovering tasks and views...registered 2 tasks and 1 view.34Started studio session at https://app.airplane.dev/studio?host=http://localhost:4000 (^C to quit)5Press ENTER to open the studio in the browser.
See Studio for more info.