website/src/docs/installation.md
Task offers many installation methods. Check out the available methods below.
These installation methods are maintained by the Task team and are always up-to-date.
:::info Package Repository Hosting
Package repository hosting for deb/rpm/apk is graciously provided by Cloudsmith. Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that enables your organization to create, store and share packages in any format, to any place, with total confidence.
:::
[package]
If you Set up the repository by running :
curl -1sLf 'https://dl.cloudsmith.io/public/task/task/setup.rpm.sh' | sudo -E bash
Then you can install Task with:
dnf install task
[package]
If you Set up the repository by running:
curl -1sLf 'https://dl.cloudsmith.io/public/task/task/setup.deb.sh' | sudo -E bash
Then you can install Task with:
apt install task
[package]
Set up the repository by running:
curl -1sLf 'https://dl.cloudsmith.io/public/task/task/setup.alpine.sh' | sudo -E bash
Then you can install Task with:
apk add task
Task is available via our official Homebrew tap [source]:
brew install go-task/tap/go-task
Alternatively it can be installed from the official Homebrew repository [package] [source] by running:
brew install go-task
Task is available on Snapcraft [source], but keep in mind that your Linux distribution should allow classic confinement for Snaps to Task work correctly:
sudo snap install task --classic
Npm can be used as cross-platform way to install Task globally or as a dependency of your project [package] [source]:
npm install -g @go-task/cli
Task is available via the community repository [source]:
winget install Task.Task
::: warning Community Maintained
These installation methods are maintained by the community and may not always be up-to-date with the latest Task version. The Task team does not directly control these packages.
:::
Mise is a cross-platform package manager that acts as a "frontend" to a variety
of other package managers "backends" such as asdf, aqua and ubi.
If using Mise, we recommend using the aqua or ubi backends to install Task
as these install directly from our GitHub releases.
::: code-group
mise use -g aqua:go-task/task@latest
mise install
mise use -g ubi:go-task/task
mise install
:::
Task repository is tracked by Macports [package] [source]:
port install go-task
Like npm, pip can be used as a cross-platform way to install Task [package] [source]:
pip install go-task-bin
choco install go-task
[source]
scoop install task
pacman -S go-task
dnf install go-task
pkg install task
[source]
nix-env -iA nixpkgs.go-task
pacstall -I go-task-deb
pkgx task
or, if you have pkgx integration enabled:
task
You can download the binary from the
releases page on GitHub and add to
your $PATH.
DEB, RPM and APK packages are also available.
The task_checksums.txt file contains the SHA-256 checksum for each file.
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:
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:
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:
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d v3.36.0
Parameters are order specific, to set both installation directory and version:
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin v3.42.1
We have an official GitHub Action to install Task in your GitHub workflows. This repository is forked from the fantastic project by the Arduino team. Check out the repository for more examples and configuration.
- name: Install Task
uses: go-task/setup-task@v1
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:
go install github.com/go-task/task/v3/cmd/task@latest
Or you can install into another directory:
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.
:::
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.
If your executable isn’t named task, set the TASK_EXE environment variable before running eval.
::: code-group
# ~/.bashrc
# export TASK_EXE='go-task' if needed
eval "$(task --completion bash)"
# ~/.zshrc
# export TASK_EXE='go-task' if needed
eval "$(task --completion zsh)"
# ~/.config/fish/config.fish
# export TASK_EXE='go-task' if needed
task --completion fish | source
# $PROFILE\Microsoft.PowerShell_profile.ps1
Invoke-Expression (&task --completion powershell | Out-String)
:::
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.
::: code-group
task --completion bash > /etc/bash_completion.d/task
task --completion zsh > /usr/local/share/zsh/site-functions/_task
task --completion fish > ~/.config/fish/completions/task.fish
:::
The Zsh completion supports the standard verbose zstyle to control whether task
descriptions are shown. By default, descriptions are displayed. To show only task
names without descriptions, add this to your ~/.zshrc (after the completion is loaded):
zstyle ':completion:*:*:task:*' verbose false