Getting Started with Taskfile
Create your Taskfile
There are multiple ways to create a Taskfile:
- Create a Taskfile in the current directory
- Create a Taskfile in a specific directory
- Create a Taskfile with a custom filename
- Manually create a Taskfile
Open the Taskfile in your editor
The generated Taskfile will look like this:Here is a breakdown of the fields:
The task name in this example is
Taskfile.yml
| Field | Description |
|---|---|
version | The version of the Taskfile format to run |
vars | Variables that can be used in the Taskfile |
tasks | The tasks to run |
cmds | The commands to run |
silent | If true, task metadata will not be printed — only the command output |
default. You can define more tasks by adding them to the tasks section.Run the task
Use
task --help to see all available options and flags.task command, it looks for a Taskfile in the current directory or in the specified directory.hello task: