Develop tasks and views locally in your browser of choice.
The Airplane editor provides a rich local development experience that allows you to quickly iterate on tasks and views, even before they've been deployed. The editor is functionally divided into three parts, which include:
  1. Left sidebar that serves as an Airplane explorer—it lists out local tasks, views, and resources that have been discovered.
  2. Middle pane that allows the user to perform operations like executing tasks, modifying local resources, etc.
  3. Right sidebar used to view reference material like the Airplane documentation during the development process.
Not all tasks support local execution. Currently, only Node, Python and Shell tasks support local execution.

Starting the editor

If you haven't installed the Airplane CLI, do that before continuing. The editor works by making requests to a local dev server, a trimmed-down version of the Airplane API server that's used to facilitate local development. To start up the local dev server, run airplane dev --editor:
$ airplane dev --editor
Discovering tasks and views...
Found 2 tasks:
- Generate report
- Find user
Found 1 view:
- Admin panel
Visit https://app.airplane.dev/editor?host=http://localhost:4000 for a development UI.
[Ctrl+C] to shutdown the local dev server.
This command does a few things:
  1. Discovers local task and view definitions to load into the local dev server, which subsequently get displayed in the editor. airplane dev --editor takes in a single, optional, positional argument that indicates which directory to discover tasks and views from, e.g. something like airplane dev --editor ~/my_apps. By default, if no argument is passed, the CLI will attempt to discover task and view definitions in the current directory and all nested subdirectories. It's also possible to pass in a filename as an argument, e.g. airplane dev --editor my_task.task.yaml—in this case, the editor will be used for the local development of a singular task or view.
  2. Starts up an HTTP server that will respond to requests from the editor to execute tasks, load views, etc.
  3. Outputs a URL from which you can access the editor. Note that although the editor UI is part of our production web app, any tasks and views are actually running locally on your machine!

Executing tasks

You can execute tasks locally from the editor—to do so, select a task from the left sidebar, fill in any relevant parameters, and click Execute task:
You'll then be redirected to a page for the run, which shows real-time logs for your task execution in a UI similar to what you might see in your production environment:
If your task requires config variables or resource configuration, you can include them in a dev config file. By default, the CLI will look for a file called airplane.dev.yaml in the current directory. You can override this with --config-path, if your dev config file is stored elsewhere.
$ airplane dev --editor --config-path my-airplane-config.dev.yaml

Loading views

To load a view into the editor, simply select a view from the left sidebar (it may take a few seconds to initially load the view):
Because the local dev server is handling the loading of the view, any edits you make to your view will show up instantly in the editor—try it out!
If you reference a task in your view, this will run the task in your team's default environment or a specified environment if you pass the --env flag (e.g. airplane dev --editor --env stage). We're currently looking into adding the ability to hit a local task from a local view!

Setting local configuration

Through the editor, you can configure local resources and config variables. For more information, check out the docs on the Dev config file.