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:
- Left sidebar that serves as an Airplane explorer—it lists out local tasks, views, and resources that have been discovered.
- Middle pane that allows the user to perform operations like executing tasks, modifying local resources, etc.
- Right sidebar used to view reference material like the Airplane documentation during the development process.
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:
bashCopied1$ airplane dev --editor2Discovering tasks and views...3Found 2 tasks:4- Generate report5- Find user67Found 1 view:8- Admin panel910Visit https://app.airplane.dev/editor?host=http://localhost:4000 for a development UI.11[Ctrl+C] to shutdown the local dev server.
This command does a few things:
- Discovers local task and view definitions to load into the local dev server, which subsequently
get displayed in the editor.
airplane dev --editortakes 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.
- Starts up an HTTP server that will respond to requests from the editor to execute tasks, load views, etc.
- 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!
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
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.yamlin the current directory. You can override this with
--config-path, if your dev config file is stored elsewhere.
bashCopied1$ airplane dev --editor --config-path my-airplane-config.dev.yaml
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!
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.