Local task execution without Studio
Execute a single task locally inside your terminal
While we recommend the browser-based local development approach outlined on the
Studio page, it is possible to run a task entirely in your
terminal by disabling the Studio.
To execute your task locally:
bashCopied1$ airplane dev --studio=false path/to/definition.task.yaml
Parameters
Parameters
If your task has any parameters, you'll be prompted:
bashCopied1$ airplane dev --studio=false my_task.task.yaml2? Dry Run (--dry_run): [Use arrows to move, type to filter]3> Yes4No
These inputs can also be passed as CLI args:
bashCopied1$ airplane dev --studio=false my_task.task.yaml -- --help23Test Task Usage:4--dry_run (default: true)56$ airplane dev --studio=false my_task.task.yaml -- --dry_run=false
Config variables and resources
Config variables and resources
If you need to load in config variables or reference resources in your task, you can define them in
an
airplane.dev.yaml
file.Inline tasks
Inline tasks
Since you can write multiple inline configured tasks in a single file, you may need to specify which
task should be executed.
To execute a specific inline configured task, you can append the path to the
file with
::<exportName>
.- If you have a default export, leaving out the identifier will run the default exported task.
- If you only have one task defined in the file, leaving out the identifier will run the task, regardless of whether its default exported or not.
- If multiple tasks are defined in the file and none of them are default exported, leaving out the
identifier will throw an error. Providing an
exportName
identifier that doesn't exist in the file will also throw an error.
javascriptCopied1// tasks.airplane.ts (default export, multiple tasks)2import airplane from "airplane";34export default airplane.task(...); // airplane dev tasks.airplane.ts56export const taskA = airplane.task(...); // airplane dev tasks.airplane.ts::taskA
javascriptCopied1// tasks.airplane.ts (no default export, multiple tasks)2import airplane from "airplane";34export const taskA = airplane.task(...); // airplane dev tasks.airplane.ts::taskA56export const taskB = airplane.task(...); // airplane dev tasks.airplane.ts::taskB
javascriptCopied1// tasks.airplane.ts (no default export, single task)2import airplane from "airplane";34export const taskA = airplane.task(...); // airplane dev tasks.airplane.ts OR airplane dev tasks.airplane.ts::taskA
To execute a specific inline configured task, you can append the path to the
file with
::<function_name>
.- If you only have one task defined in the file, leaving out the identifier will run the task.
- If multiple tasks are defined in the file, leaving out the identifier will raise an error.
Providing a
function_name
identifier that doesn't exist in the file will also raise an error.