Skip to Content
Last repository update 9/10/2025 🎉
DocsTaskfileTask Directory

Task Directory

We know that tasks are run in the current directory where the Taskfile is located. However, you can actually run the Taskfile tasks in another directory by using the dir keyword.

Taskfile.yml
version: '3' tasks: get-working-directory: dir: ./app1 cmds: - pwd

If the directory does not exist, Task will create it.

Demo and output
ubuntu@touted-mite:~$ task get-working-directory task: [get-working-directory] pwd /home/ubuntu/app1
Last updated on