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:
bash
Copied
1
$ airplane dev --studio=false path/to/definition.task.yaml

Parameters

If your task has any parameters, you'll be prompted:
bash
Copied
1
$ airplane dev --studio=false my_task.task.yaml
2
? Dry Run (--dry_run): [Use arrows to move, type to filter]
3
> Yes
4
No
These inputs can also be passed as CLI args:
bash
Copied
1
$ airplane dev --studio=false my_task.task.yaml -- --help
2
3
Test Task Usage:
4
--dry_run (default: true)
5
6
$ airplane dev --studio=false my_task.task.yaml -- --dry_run=false

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

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.
javascript
Copied
1
// tasks.airplane.ts (default export, multiple tasks)
2
import airplane from "airplane";
3
4
export default airplane.task(...); // airplane dev tasks.airplane.ts
5
6
export const taskA = airplane.task(...); // airplane dev tasks.airplane.ts::taskA
javascript
Copied
1
// tasks.airplane.ts (no default export, multiple tasks)
2
import airplane from "airplane";
3
4
export const taskA = airplane.task(...); // airplane dev tasks.airplane.ts::taskA
5
6
export const taskB = airplane.task(...); // airplane dev tasks.airplane.ts::taskB
javascript
Copied
1
// tasks.airplane.ts (no default export, single task)
2
import airplane from "airplane";
3
4
export const taskA = airplane.task(...); // airplane dev tasks.airplane.ts OR airplane dev tasks.airplane.ts::taskA