Skip to content

Installation

Task offers many installation methods. Check out the available methods below.

INFO

Some of the methods below are marked as Community. This means they are not maintained by the Task team and may not be up-to-date.

Package Managers

Homebrew macOS Linux

Task is available via our official Homebrew tap [source]:

shell
brew install go-task/tap/go-task

Alternatively it can be installed from the official Homebrew repository [package] [source] by running:

shell
brew install go-task

Macports macOS Community

Task repository is tracked by Macports [package] [source]:

shell
port install go-task

Snap macOS Linux

Task is available on Snapcraft [source], but keep in mind that your Linux distribution should allow classic confinement for Snaps to Task work correctly:

shell
sudo snap install task --classic

npm macOS Linux Windows

Npm can be used as cross-platform way to install Task globally or as a dependency of your project [package] [source]:

shell
npm install -g @go-task/cli

pip macOS Linux Windows Community

Like npm, pip can be used as a cross-platform way to install Task [package] [source]:

shell
pip install go-task-bin

WinGet Windows

Task is available via the community repository [source]:

shell
winget install Task.Task

Chocolatey Windows Community

[package] [source]

shell
choco install go-task

Scoop Windows Community

[source]

shell
scoop install task

Arch (pacman) Arch Linux Community

[package] [source]

shell
pacman -S go-task

Fedora (dnf) Fedora Community

[package] [source]

shell
dnf install go-task

FreeBSD (Ports) FreeBSD Community

[package] [source]

shell
pkg install task

NixOS (nix) NixOS Linux Community

[source]

shell
nix-env -iA nixpkgs.go-task

pacstall Debian Ubuntu Community

[package] [source]

shell
pacstall -I go-task-deb

pkgx macOS Linux Community

[package] [source]

shell
pkgx task

or, if you have pkgx integration enabled:

shell
task

Get The Binary

Binary

You can download the binary from the releases page on GitHub and add to your $PATH.

DEB and RPM packages are also available.

The task_checksums.txt file contains the SHA-256 checksum for each file.

Install Script

We also have an install script which is very useful in scenarios like CI. Many thanks to GoDownloader for enabling the easy generation of this script.

By default, it installs on the ./bin directory relative to the working directory:

shell
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d

It is possible to override the installation directory with the -b parameter. On Linux, common choices are ~/.local/bin and ~/bin to install for the current user or /usr/local/bin to install for all users:

shell
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin

WARNING

On macOS and Windows, ~/.local/bin and ~/bin are not added to $PATH by default.

By default, it installs the latest version available. You can also specify a tag (available in releases) to install a specific version:

shell
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d v3.36.0

Parameters are order specific, to set both installation directory and version:

shell
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin v3.42.1

GitHub Actions

If you want to install Task in GitHub Actions you can try using this action by the Arduino team:

yaml
- name: Install Task
  uses: arduino/setup-task@v2
  with:
    version: 3.x
    repo-token: ${{ secrets.GITHUB_TOKEN }}

This installation method is community owned.

Build From Source

Go Modules

Ensure that you have a supported version of Go properly installed and setup. You can find the minimum required version of Go in the go.mod file.

You can then install the latest release globally by running:

shell
go install github.com/go-task/task/v3/cmd/task@latest

Or you can install into another directory:

shell
env GOBIN=/bin go install github.com/go-task/task/v3/cmd/task@latest

TIP

For CI environments we recommend using the install script instead, which is faster and more stable, since it'll just download the latest released binary.

Setup completions

Some installation methods will automatically install completions too, but if this isn't working for you or your chosen method doesn't include them, you can run task --completion <shell> to output a completion script for any supported shell. There are a couple of ways these completions can be added to your shell config:

This method loads the completion script from the currently installed version of task every time you create a new shell. This ensures that your completions are always up-to-date.

shell
# ~/.bashrc
eval "$(task --completion bash)"
shell
# ~/.zshrc
eval "$(task --completion zsh)"
shell
# ~/.config/fish/config.fish
task --completion fish | source
powershell
# $PROFILE\Microsoft.PowerShell_profile.ps1
Invoke-Expression  (&task --completion powershell | Out-String)

Option 2. Copy the script to your shell's completions directory

This method requires you to manually update the completions whenever Task is updated. However, it is useful if you want to modify the completions yourself.

shell
task --completion bash > /etc/bash_completion.d/task
shell
task --completion zsh  > /usr/local/share/zsh/site-functions/_task
shell
task --completion fish > ~/.config/fish/completions/task.fish