From 27c86c08a9bb45440cce5532b5574274dba17eb0 Mon Sep 17 00:00:00 2001 From: Valentin Maerten Date: Mon, 7 Sep 2026 11:07:41 +0200 Subject: [PATCH 01/12] docs: redesign installation page --- .../components/InstallationMethods.vue | 376 ++++++++++++++ website/src/latest/docs/installation.md | 464 ++++++++++++++---- website/src/next/docs/installation.md | 464 ++++++++++++++---- 3 files changed, 1094 insertions(+), 210 deletions(-) create mode 100644 website/.vitepress/components/InstallationMethods.vue diff --git a/website/.vitepress/components/InstallationMethods.vue b/website/.vitepress/components/InstallationMethods.vue new file mode 100644 index 0000000000..8d24841c64 --- /dev/null +++ b/website/.vitepress/components/InstallationMethods.vue @@ -0,0 +1,376 @@ + + + + + diff --git a/website/src/latest/docs/installation.md b/website/src/latest/docs/installation.md index bcf568b8ae..e40b6ddf3a 100644 --- a/website/src/latest/docs/installation.md +++ b/website/src/latest/docs/installation.md @@ -2,33 +2,81 @@ title: Installation description: Installation methods for Task outline: deep +pageClass: installation-page --- + + # Installation -Task offers many installation methods. Check out the available methods below. +Install Task with your preferred package manager, download a binary, or set it +up in CI. Then add shell completions and you're ready to go. + + + + -## Official Package Managers +## Official packages {#official-package-managers} These installation methods are maintained by the Task team and are always up-to-date. -:::info Package Repository Hosting +
-[![Hosted By: Cloudsmith](https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith&style=for-the-badge)](https://cloudsmith.com) +### [Homebrew](https://brew.sh) {#homebrew} -Package repository hosting for deb/rpm/apk is graciously provided by [Cloudsmith](https://cloudsmith.com). -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. +
-::: +

macOS

+ + -If you Set up the repository by running : +
+ +Task is available via our official Homebrew tap: + +```shell +brew install go-task/tap/go-task +``` + +Alternatively it can be installed from the official Homebrew repository by +running: + +```shell +brew install go-task +``` + +
+ +
+ +### [dnf](https://docs.fedoraproject.org/en-US/quick-docs/dnf) {#dnf} + +
+ +

Fedora · CentOS · Red Hat

+ + + +
+ +Set up the repository: ```shell curl -1sLf 'https://dl.cloudsmith.io/public/task/task/setup.rpm.sh' | sudo -E bash @@ -40,11 +88,25 @@ Then you can install Task with: dnf install task ``` -### [apt](https://doc.ubuntu-fr.org/apt) ![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?logo=Ubuntu&logoColor=white) ![Debian](https://img.shields.io/badge/debian-red?logo=debian&logoColor=orange&color=darkred) ![Linux Mint](https://img.shields.io/badge/Linux%20Mint-87CF3E?logo=linuxmint&logoColor=fff) {#apt} +
+ +
+ +### [apt](https://doc.ubuntu-fr.org/apt) {#apt} + +
-[[package](https://cloudsmith.io/~task/repos/task/packages/?sort=-format&q=format%3Adeb)] +

Ubuntu · Debian · Linux Mint

-If you Set up the repository by running: + + +
+ +Set up the repository: ```shell curl -1sLf 'https://dl.cloudsmith.io/public/task/task/setup.deb.sh' | sudo -E bash @@ -56,9 +118,23 @@ Then you can install Task with: apt install task ``` -### [apk](https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper) ![Alpine Linux](https://img.shields.io/badge/Alpine_Linux-0D597F?logo=alpinelinux&logoColor=fff) {#apk} +
+ +
+ +### [apk](https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper) {#apk} + +
+ +

Alpine Linux

+ + + +
Set up the repository by running: @@ -72,173 +148,345 @@ Then you can install Task with: apk add task ``` -### [Homebrew](https://brew.sh) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) {#homebrew} +
-Task is available via our official Homebrew tap -[[source](https://github.com/go-task/homebrew-tap/blob/main/Casks/go-task.rb)]: +
-```shell -brew install go-task/tap/go-task -``` +### [Snap](https://snapcraft.io/task) {#snap} -Alternatively it can be installed from the official Homebrew repository -[[package](https://formulae.brew.sh/formula/go-task)] -[[source](https://github.com/Homebrew/homebrew-core/blob/master/Formula/g/go-task.rb)] -by running: +
-```shell -brew install go-task -``` +

Linux

+ + -Task is available on [Snapcraft](https://snapcraft.io/task) -[[source](https://github.com/go-task/snap/blob/main/snap/snapcraft.yaml)], but -keep in mind that your Linux distribution should allow classic confinement for -Snaps to Task work correctly: +
+ +Task is available on [Snapcraft](https://snapcraft.io/task), 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](https://www.npmjs.com) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#npm} +
+ +
+ +### [npm](https://www.npmjs.com) {#npm} + +
+ +

macOS · Linux · Windows

+ + + +
Npm can be used as cross-platform way to install Task globally or as a -dependency of your project -[[package](https://www.npmjs.com/package/@go-task/cli)] -[[source](https://github.com/go-task/task/blob/main/package.json)]: +dependency of your project: ```shell npm install -g @go-task/cli ``` -### [WinGet](https://github.com/microsoft/winget-cli) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#winget} +
+ +
+ +### [WinGet](https://github.com/microsoft/winget-cli) {#winget} + +
+ +

Windows

+ + + +
Task is available via the -[community repository](https://github.com/microsoft/winget-pkgs) -[[source](https://github.com/microsoft/winget-pkgs/tree/master/manifests/t/Task/Task)]: +[community repository](https://github.com/microsoft/winget-pkgs): ```shell winget install Task.Task ``` -## Community-Maintained Package Managers +
+ +

Package repository hosting for deb/rpm/apk is graciously provided by Cloudsmith.

-::: warning Community Maintained +## Community packages {#community-maintained-package-managers} 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](https://mise.jdx.dev/) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#mise} +### [Mise](https://mise.jdx.dev/) {#mise} -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. +

macOS · Linux · Windows

-::: code-group + + +
-```shell [ubi] -mise use -g ubi:go-task/task -mise install +Install and activate Task globally with Mise: + +```shell +mise use -g task ``` -::: +To use Task in the current project instead, run `mise use task`. This installs +Task and adds it to your project's `mise.toml`. + +
-### [Macports](https://macports.org) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) {#macports} +
-Task repository is tracked by Macports -[[package](https://ports.macports.org/port/go-task/details/)] -[[source](https://github.com/macports/macports-ports/blob/master/devel/go-task/Portfile)]: +### [Macports](https://macports.org) {#macports} + +
+ +

macOS

+ + + +
+ +Task repository is tracked by Macports: ```shell port install go-task ``` -### [pip](https://pip.pypa.io) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#pip} +
+ +
+ +### [pip](https://pip.pypa.io) {#pip} + +
-Like npm, pip can be used as a cross-platform way to install Task -[[package](https://pypi.org/project/go-task-bin)] -[[source](https://github.com/Bing-su/pip-binary-factory/tree/main/task)]: +

macOS · Linux · Windows

+ + + +
+ +Like npm, pip can be used as a cross-platform way to install Task: ```shell pip install go-task-bin ``` -### [Chocolatey](https://chocolatey.org) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#chocolatey} +
+ +
+ +### [Chocolatey](https://chocolatey.org) {#chocolatey} + +
+ +

Windows

-[[package](https://community.chocolatey.org/packages/go-task)] -[[source](https://github.com/Starz0r/ChocolateyPackagingScripts/blob/master/src/go-task_gh_build.py)] + + +
```shell choco install go-task ``` -### [Scoop](https://scoop.sh) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#scoop} +
+ +
+ +### [Scoop](https://scoop.sh) {#scoop} + +
+ +

Windows

+ + + +
```shell scoop install task ``` -### Arch ([pacman](https://wiki.archlinux.org/title/Pacman)) ![Arch Linux](https://img.shields.io/badge/Arch%20Linux-1793D1?logo=arch-linux&logoColor=fff) {#arch} +
+ +
+ +### Arch ([pacman](https://wiki.archlinux.org/title/Pacman)) {#arch} + +
+ +

Arch Linux

-[[package](https://archlinux.org/packages/extra/x86_64/go-task/)] -[[source](https://gitlab.archlinux.org/archlinux/packaging/packages/go-task)] + + +
```shell pacman -S go-task ``` -### Fedora ([dnf](https://docs.fedoraproject.org/en-US/quick-docs/dnf)) ![Fedora](https://img.shields.io/badge/Fedora-51A2DA?logo=fedora&logoColor=fff) {#fedora-community} +
+ +
-[[package](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/)] -[[source](https://src.fedoraproject.org/rpms/golang-github-task)] +### Fedora ([dnf](https://docs.fedoraproject.org/en-US/quick-docs/dnf)) {#fedora-community} + +
+ +

Fedora

+ + + +
```shell dnf install go-task ``` -### FreeBSD ([Ports](https://ports.freebsd.org/cgi/ports.cgi)) ![FreeBSD](https://img.shields.io/badge/FreeBSD-990000?logo=freebsd&logoColor=fff) {#freebsd} +
+ +
+ +### FreeBSD ([Ports](https://ports.freebsd.org/cgi/ports.cgi)) {#freebsd} + +
-[[package](https://cgit.freebsd.org/ports/tree/devel/task)] -[[source](https://cgit.freebsd.org/ports/tree/devel/task/Makefile)] +

FreeBSD

+ + + +
```shell pkg install task ``` -### [Nix](https://nixos.org) ![Nix](https://img.shields.io/badge/Nix-5277C3?logo=nixos&logoColor=fff) ![NixOS](https://img.shields.io/badge/NixOS-5277C3?logo=nixos&logoColor=fff) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) {#nix} +
+ +
+ +### [Nix](https://nixos.org) {#nix} + +
+ +

Nix · NixOS · Linux · macOS

+ + + +
```shell nix-env -iA nixpkgs.go-task ``` -### [pacstall](https://github.com/pacstall/pacstall) ![Debian](https://img.shields.io/badge/Debian-A81D33?logo=debian&logoColor=fff) ![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?logo=ubuntu&logoColor=fff) {#pacstall} +
+ +
+ +### [pacstall](https://github.com/pacstall/pacstall) {#pacstall} + +
+ +

Debian · Ubuntu

+ + -[[package](https://pacstall.dev/packages/go-task-deb)] -[[source](https://github.com/pacstall/pacstall-programs/blob/master/packages/go-task-deb/go-task-deb.pacscript)] +
```shell pacstall -I go-task-deb ``` -### [pkgx](https://pkgx.sh) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) {#pkgx} +
-[[package](https://pkgx.dev/pkgs/taskfile.dev)] -[[source](https://github.com/pkgxdev/pantry/blob/main/projects/taskfile.dev/package.yml)] +
+ +### [pkgx](https://pkgx.sh) {#pkgx} + +
+ +

macOS · Linux

+ + + +
```shell pkgx task @@ -250,7 +498,11 @@ or, if you have pkgx integration enabled: task ``` -## Get The Binary +
+ +
+ +## Binaries & CI {#get-the-binary} ### Binary @@ -318,7 +570,7 @@ examples and configuration. uses: go-task/setup-task@v1 ``` -## Build From Source +## Build from source Ensure that you have a supported version of [Go](https://golang.org) properly installed and setup. You can find the minimum required version of Go in the @@ -364,7 +616,7 @@ demand before calling it. go tool task {arguments...} ``` -## Setup completions +## Shell completions {#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 @@ -376,8 +628,8 @@ 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. +always up-to-date. If your executable isn’t named task, set the `TASK_EXE` +environment variable before running eval. ::: code-group @@ -446,9 +698,10 @@ task --completion nu | save --force ($nu.data-dir | path join "vendor/autoload/t ### Zsh customization -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): +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): ```shell zstyle ':completion:*:*:task:*' verbose false @@ -463,18 +716,19 @@ zstyle ':completion:*:*:task:*' show-aliases false ### Nushell caveats -Nushell cannot source a script from stdin, so both options above write the script -to an autoload directory. Option 1 rewrites it at every startup, which keeps it -in sync with the installed version of Task — the refreshed completions are picked -up by the next shell. With option 2, re-run the command after upgrading Task. +Nushell cannot source a script from stdin, so both options above write the +script to an autoload directory. Option 1 rewrites it at every startup, which +keeps it in sync with the installed version of Task — the refreshed completions +are picked up by the next shell. With option 2, re-run the command after +upgrading Task. The completions are attached to an `extern "task"` declaration, which Nushell requires to be static. Three consequences are worth knowing: -- The experimental flags (`--force-all`, `--download`, `--offline`, …) are always - offered, even when the corresponding experiment is disabled. Their description - is prefixed with the experiment name, and `task --experiments` lists the ones - that are enabled. +- The experimental flags (`--force-all`, `--download`, `--offline`, …) are + always offered, even when the corresponding experiment is disabled. Their + description is prefixed with the experiment name, and `task --experiments` + lists the ones that are enabled. - Passing a value to a boolean flag with `=` does not work: Nushell forwards `--color=false` as two arguments, so Task reads `false` as a task name. Use `NO_COLOR=1`, or bypass the declaration with `^task --color=false`. diff --git a/website/src/next/docs/installation.md b/website/src/next/docs/installation.md index bcf568b8ae..e40b6ddf3a 100644 --- a/website/src/next/docs/installation.md +++ b/website/src/next/docs/installation.md @@ -2,33 +2,81 @@ title: Installation description: Installation methods for Task outline: deep +pageClass: installation-page --- + + # Installation -Task offers many installation methods. Check out the available methods below. +Install Task with your preferred package manager, download a binary, or set it +up in CI. Then add shell completions and you're ready to go. + + + + -## Official Package Managers +## Official packages {#official-package-managers} These installation methods are maintained by the Task team and are always up-to-date. -:::info Package Repository Hosting +
-[![Hosted By: Cloudsmith](https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith&style=for-the-badge)](https://cloudsmith.com) +### [Homebrew](https://brew.sh) {#homebrew} -Package repository hosting for deb/rpm/apk is graciously provided by [Cloudsmith](https://cloudsmith.com). -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. +
-::: +

macOS

+ + -If you Set up the repository by running : +
+ +Task is available via our official Homebrew tap: + +```shell +brew install go-task/tap/go-task +``` + +Alternatively it can be installed from the official Homebrew repository by +running: + +```shell +brew install go-task +``` + +
+ +
+ +### [dnf](https://docs.fedoraproject.org/en-US/quick-docs/dnf) {#dnf} + +
+ +

Fedora · CentOS · Red Hat

+ + + +
+ +Set up the repository: ```shell curl -1sLf 'https://dl.cloudsmith.io/public/task/task/setup.rpm.sh' | sudo -E bash @@ -40,11 +88,25 @@ Then you can install Task with: dnf install task ``` -### [apt](https://doc.ubuntu-fr.org/apt) ![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?logo=Ubuntu&logoColor=white) ![Debian](https://img.shields.io/badge/debian-red?logo=debian&logoColor=orange&color=darkred) ![Linux Mint](https://img.shields.io/badge/Linux%20Mint-87CF3E?logo=linuxmint&logoColor=fff) {#apt} +
+ +
+ +### [apt](https://doc.ubuntu-fr.org/apt) {#apt} + +
-[[package](https://cloudsmith.io/~task/repos/task/packages/?sort=-format&q=format%3Adeb)] +

Ubuntu · Debian · Linux Mint

-If you Set up the repository by running: + + +
+ +Set up the repository: ```shell curl -1sLf 'https://dl.cloudsmith.io/public/task/task/setup.deb.sh' | sudo -E bash @@ -56,9 +118,23 @@ Then you can install Task with: apt install task ``` -### [apk](https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper) ![Alpine Linux](https://img.shields.io/badge/Alpine_Linux-0D597F?logo=alpinelinux&logoColor=fff) {#apk} +
+ +
+ +### [apk](https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper) {#apk} + +
+ +

Alpine Linux

+ + + +
Set up the repository by running: @@ -72,173 +148,345 @@ Then you can install Task with: apk add task ``` -### [Homebrew](https://brew.sh) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) {#homebrew} +
-Task is available via our official Homebrew tap -[[source](https://github.com/go-task/homebrew-tap/blob/main/Casks/go-task.rb)]: +
-```shell -brew install go-task/tap/go-task -``` +### [Snap](https://snapcraft.io/task) {#snap} -Alternatively it can be installed from the official Homebrew repository -[[package](https://formulae.brew.sh/formula/go-task)] -[[source](https://github.com/Homebrew/homebrew-core/blob/master/Formula/g/go-task.rb)] -by running: +
-```shell -brew install go-task -``` +

Linux

+ + -Task is available on [Snapcraft](https://snapcraft.io/task) -[[source](https://github.com/go-task/snap/blob/main/snap/snapcraft.yaml)], but -keep in mind that your Linux distribution should allow classic confinement for -Snaps to Task work correctly: +
+ +Task is available on [Snapcraft](https://snapcraft.io/task), 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](https://www.npmjs.com) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#npm} +
+ +
+ +### [npm](https://www.npmjs.com) {#npm} + +
+ +

macOS · Linux · Windows

+ + + +
Npm can be used as cross-platform way to install Task globally or as a -dependency of your project -[[package](https://www.npmjs.com/package/@go-task/cli)] -[[source](https://github.com/go-task/task/blob/main/package.json)]: +dependency of your project: ```shell npm install -g @go-task/cli ``` -### [WinGet](https://github.com/microsoft/winget-cli) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#winget} +
+ +
+ +### [WinGet](https://github.com/microsoft/winget-cli) {#winget} + +
+ +

Windows

+ + + +
Task is available via the -[community repository](https://github.com/microsoft/winget-pkgs) -[[source](https://github.com/microsoft/winget-pkgs/tree/master/manifests/t/Task/Task)]: +[community repository](https://github.com/microsoft/winget-pkgs): ```shell winget install Task.Task ``` -## Community-Maintained Package Managers +
+ +

Package repository hosting for deb/rpm/apk is graciously provided by Cloudsmith.

-::: warning Community Maintained +## Community packages {#community-maintained-package-managers} 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](https://mise.jdx.dev/) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#mise} +### [Mise](https://mise.jdx.dev/) {#mise} -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. +

macOS · Linux · Windows

-::: code-group + + +
-```shell [ubi] -mise use -g ubi:go-task/task -mise install +Install and activate Task globally with Mise: + +```shell +mise use -g task ``` -::: +To use Task in the current project instead, run `mise use task`. This installs +Task and adds it to your project's `mise.toml`. + +
-### [Macports](https://macports.org) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) {#macports} +
-Task repository is tracked by Macports -[[package](https://ports.macports.org/port/go-task/details/)] -[[source](https://github.com/macports/macports-ports/blob/master/devel/go-task/Portfile)]: +### [Macports](https://macports.org) {#macports} + +
+ +

macOS

+ + + +
+ +Task repository is tracked by Macports: ```shell port install go-task ``` -### [pip](https://pip.pypa.io) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#pip} +
+ +
+ +### [pip](https://pip.pypa.io) {#pip} + +
-Like npm, pip can be used as a cross-platform way to install Task -[[package](https://pypi.org/project/go-task-bin)] -[[source](https://github.com/Bing-su/pip-binary-factory/tree/main/task)]: +

macOS · Linux · Windows

+ + + +
+ +Like npm, pip can be used as a cross-platform way to install Task: ```shell pip install go-task-bin ``` -### [Chocolatey](https://chocolatey.org) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#chocolatey} +
+ +
+ +### [Chocolatey](https://chocolatey.org) {#chocolatey} + +
+ +

Windows

-[[package](https://community.chocolatey.org/packages/go-task)] -[[source](https://github.com/Starz0r/ChocolateyPackagingScripts/blob/master/src/go-task_gh_build.py)] + + +
```shell choco install go-task ``` -### [Scoop](https://scoop.sh) ![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white) {#scoop} +
+ +
+ +### [Scoop](https://scoop.sh) {#scoop} + +
+ +

Windows

+ + + +
```shell scoop install task ``` -### Arch ([pacman](https://wiki.archlinux.org/title/Pacman)) ![Arch Linux](https://img.shields.io/badge/Arch%20Linux-1793D1?logo=arch-linux&logoColor=fff) {#arch} +
+ +
+ +### Arch ([pacman](https://wiki.archlinux.org/title/Pacman)) {#arch} + +
+ +

Arch Linux

-[[package](https://archlinux.org/packages/extra/x86_64/go-task/)] -[[source](https://gitlab.archlinux.org/archlinux/packaging/packages/go-task)] + + +
```shell pacman -S go-task ``` -### Fedora ([dnf](https://docs.fedoraproject.org/en-US/quick-docs/dnf)) ![Fedora](https://img.shields.io/badge/Fedora-51A2DA?logo=fedora&logoColor=fff) {#fedora-community} +
+ +
-[[package](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/)] -[[source](https://src.fedoraproject.org/rpms/golang-github-task)] +### Fedora ([dnf](https://docs.fedoraproject.org/en-US/quick-docs/dnf)) {#fedora-community} + +
+ +

Fedora

+ + + +
```shell dnf install go-task ``` -### FreeBSD ([Ports](https://ports.freebsd.org/cgi/ports.cgi)) ![FreeBSD](https://img.shields.io/badge/FreeBSD-990000?logo=freebsd&logoColor=fff) {#freebsd} +
+ +
+ +### FreeBSD ([Ports](https://ports.freebsd.org/cgi/ports.cgi)) {#freebsd} + +
-[[package](https://cgit.freebsd.org/ports/tree/devel/task)] -[[source](https://cgit.freebsd.org/ports/tree/devel/task/Makefile)] +

FreeBSD

+ + + +
```shell pkg install task ``` -### [Nix](https://nixos.org) ![Nix](https://img.shields.io/badge/Nix-5277C3?logo=nixos&logoColor=fff) ![NixOS](https://img.shields.io/badge/NixOS-5277C3?logo=nixos&logoColor=fff) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) {#nix} +
+ +
+ +### [Nix](https://nixos.org) {#nix} + +
+ +

Nix · NixOS · Linux · macOS

+ + + +
```shell nix-env -iA nixpkgs.go-task ``` -### [pacstall](https://github.com/pacstall/pacstall) ![Debian](https://img.shields.io/badge/Debian-A81D33?logo=debian&logoColor=fff) ![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?logo=ubuntu&logoColor=fff) {#pacstall} +
+ +
+ +### [pacstall](https://github.com/pacstall/pacstall) {#pacstall} + +
+ +

Debian · Ubuntu

+ + -[[package](https://pacstall.dev/packages/go-task-deb)] -[[source](https://github.com/pacstall/pacstall-programs/blob/master/packages/go-task-deb/go-task-deb.pacscript)] +
```shell pacstall -I go-task-deb ``` -### [pkgx](https://pkgx.sh) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) {#pkgx} +
-[[package](https://pkgx.dev/pkgs/taskfile.dev)] -[[source](https://github.com/pkgxdev/pantry/blob/main/projects/taskfile.dev/package.yml)] +
+ +### [pkgx](https://pkgx.sh) {#pkgx} + +
+ +

macOS · Linux

+ + + +
```shell pkgx task @@ -250,7 +498,11 @@ or, if you have pkgx integration enabled: task ``` -## Get The Binary +
+ +
+ +## Binaries & CI {#get-the-binary} ### Binary @@ -318,7 +570,7 @@ examples and configuration. uses: go-task/setup-task@v1 ``` -## Build From Source +## Build from source Ensure that you have a supported version of [Go](https://golang.org) properly installed and setup. You can find the minimum required version of Go in the @@ -364,7 +616,7 @@ demand before calling it. go tool task {arguments...} ``` -## Setup completions +## Shell completions {#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 @@ -376,8 +628,8 @@ 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. +always up-to-date. If your executable isn’t named task, set the `TASK_EXE` +environment variable before running eval. ::: code-group @@ -446,9 +698,10 @@ task --completion nu | save --force ($nu.data-dir | path join "vendor/autoload/t ### Zsh customization -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): +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): ```shell zstyle ':completion:*:*:task:*' verbose false @@ -463,18 +716,19 @@ zstyle ':completion:*:*:task:*' show-aliases false ### Nushell caveats -Nushell cannot source a script from stdin, so both options above write the script -to an autoload directory. Option 1 rewrites it at every startup, which keeps it -in sync with the installed version of Task — the refreshed completions are picked -up by the next shell. With option 2, re-run the command after upgrading Task. +Nushell cannot source a script from stdin, so both options above write the +script to an autoload directory. Option 1 rewrites it at every startup, which +keeps it in sync with the installed version of Task — the refreshed completions +are picked up by the next shell. With option 2, re-run the command after +upgrading Task. The completions are attached to an `extern "task"` declaration, which Nushell requires to be static. Three consequences are worth knowing: -- The experimental flags (`--force-all`, `--download`, `--offline`, …) are always - offered, even when the corresponding experiment is disabled. Their description - is prefixed with the experiment name, and `task --experiments` lists the ones - that are enabled. +- The experimental flags (`--force-all`, `--download`, `--offline`, …) are + always offered, even when the corresponding experiment is disabled. Their + description is prefixed with the experiment name, and `task --experiments` + lists the ones that are enabled. - Passing a value to a boolean flag with `=` does not work: Nushell forwards `--color=false` as two arguments, so Task reads `false` as a task name. Use `NO_COLOR=1`, or bypass the declaration with `^task --color=false`. From b4f46106004447b793986d65112e0715dcc27ef2 Mon Sep 17 00:00:00 2001 From: Valentin Maerten Date: Mon, 7 Sep 2026 11:17:32 +0200 Subject: [PATCH 02/12] docs: streamline installation flow --- .../components/InstallationMethods.vue | 164 ++++++++++-------- website/src/latest/docs/installation.md | 74 ++++---- website/src/next/docs/installation.md | 74 ++++---- 3 files changed, 161 insertions(+), 151 deletions(-) diff --git a/website/.vitepress/components/InstallationMethods.vue b/website/.vitepress/components/InstallationMethods.vue index 8d24841c64..78caba656e 100644 --- a/website/.vitepress/components/InstallationMethods.vue +++ b/website/.vitepress/components/InstallationMethods.vue @@ -2,7 +2,7 @@ import { nextTick, onMounted, onUnmounted, ref } from 'vue'; const platforms = [ - { id: 'all', label: 'All systems' }, + { id: 'all', label: 'All' }, { id: 'macos', label: 'macOS' }, { id: 'linux', label: 'Linux' }, { id: 'windows', label: 'Windows' } @@ -84,6 +84,33 @@ onUnmounted(() => { :aria-pressed="selected === platform.id" @click="selectPlatform(platform.id)" > + {{ platform.label }} @@ -97,26 +124,24 @@ onUnmounted(() => { diff --git a/website/.vitepress/components/InstallationMethods.vue b/website/.vitepress/components/InstallationMethods.vue index c76d57452c..6b114bf1dd 100644 --- a/website/.vitepress/components/InstallationMethods.vue +++ b/website/.vitepress/components/InstallationMethods.vue @@ -222,179 +222,12 @@ onUnmounted(() => { white-space: nowrap; } -.installation-methods :deep(.install-method) { - position: relative; - margin: 16px 0; - padding: 20px; - border: 1px solid var(--vp-c-divider); - border-radius: 12px; - background: var(--vp-c-bg); -} - -.installation-methods :deep(.install-method h3) { - position: relative; - margin: 0 0 4px; - padding: 0 0 0 30px; - font-size: 18px; - line-height: 26px; -} - -/* Decorative CSS masks keep logos out of heading names and the page outline. */ -.installation-methods :deep(.install-method h3::before) { - position: absolute; - top: 3px; - left: 0; - width: 20px; - height: 20px; - background-color: var(--install-icon-color, var(--vp-c-text-2)); - content: ''; - -webkit-mask: var(--install-icon, url('../theme/icons/install/package.svg')) - center / contain no-repeat; - mask: var(--install-icon, url('../theme/icons/install/package.svg')) center / - contain no-repeat; -} - -.installation-methods :deep(#homebrew) { - --install-icon: url('../theme/icons/install/homebrew.svg'); - --install-icon-color: #fbb040; -} - -.installation-methods :deep(#apk) { - --install-icon: url('../theme/icons/install/alpinelinux.svg'); - --install-icon-color: #0d597f; -} - -.installation-methods :deep(#snap) { - --install-icon: url('../theme/icons/install/snapcraft.svg'); - --install-icon-color: #e95420; -} - -.installation-methods :deep(#npm) { - --install-icon: url('../theme/icons/install/npm.svg'); - --install-icon-color: #cb3837; -} - -.installation-methods :deep(#mise) { - --install-icon: url('../theme/icons/install/mise.svg'); - --install-icon-color: var(--vp-c-text-1); -} - -.installation-methods :deep(#pip) { - --install-icon: url('../theme/icons/install/python.svg'); - --install-icon-color: #3776ab; -} - -.installation-methods :deep(#chocolatey) { - --install-icon: url('../theme/icons/install/chocolatey.svg'); - --install-icon-color: #80b5e3; -} - -.installation-methods :deep(#arch) { - --install-icon: url('../theme/icons/install/archlinux.svg'); - --install-icon-color: #1793d1; -} - -.installation-methods :deep(#fedora-community) { - --install-icon: url('../theme/icons/install/fedora.svg'); - --install-icon-color: #51a2da; -} - -.installation-methods :deep(#freebsd) { - --install-icon: url('../theme/icons/install/freebsd.svg'); - --install-icon-color: #ab2b28; -} - -.installation-methods :deep(#nix) { - --install-icon: url('../theme/icons/install/nixos.svg'); - --install-icon-color: #5277c3; -} - -.installation-methods :deep(.install-method h3 a:not(.header-anchor)) { - color: var(--vp-c-text-1); - text-decoration: none; -} - -.installation-methods :deep(.install-method h3 a:hover) { - color: var(--vp-c-brand-1); -} - -.installation-methods :deep(.install-meta) { - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: space-between; - gap: 8px 16px; - margin: 4px 0 12px; -} - -.installation-methods :deep(.install-method .install-platforms) { - margin: 0; - color: var(--vp-c-text-2); - font-size: 12px; - line-height: 20px; - font-weight: 500; -} - -.installation-methods :deep(.install-method .install-links p) { - display: flex; - flex-wrap: wrap; - gap: 6px; - margin: 0; -} - -.installation-methods :deep(.install-links a) { - padding: 3px 9px; - border: 1px solid transparent; - border-radius: 6px; - background: color-mix(in srgb, var(--vp-c-brand-1) 12%, transparent); - color: color-mix(in srgb, var(--vp-c-brand-1) 45%, var(--vp-c-text-1)); - font-size: 12px; - font-weight: 500; - line-height: 20px; - text-decoration: none; -} - -.installation-methods :deep(.install-links a:hover) { - border-color: var(--vp-c-brand-1); -} - -.installation-methods :deep(.install-links a:focus-visible) { - outline: 2px solid var(--vp-c-brand-1); - outline-offset: 2px; -} - -.installation-methods :deep(.install-method p) { - margin: 12px 0; - font-size: 14px; - line-height: 22px; -} - .installation-methods :deep(.installation-shortcuts + h2) { margin-top: 24px; padding-top: 0; border-top: 0; } -.installation-methods :deep(.install-method > :last-child) { - margin-bottom: 0; -} - -.installation-methods :deep(.install-method div[class*='language-']) { - margin: 12px 0; - border: 1px solid var(--vp-c-divider); - border-radius: 8px; -} - -/* Compact commands leave no room for the overlaid language label. */ -.installation-methods - :deep(.install-method div[class*='language-'] > span.lang) { - display: none; -} - -.installation-methods :deep(.install-method div[class*='language-'] pre) { - padding: 14px 0; -} - :global(.installation-page div[class*='language-'] pre) { overflow-x: auto; overflow-y: hidden; @@ -438,34 +271,6 @@ onUnmounted(() => { background: var(--vp-c-text-3); } -.installation-methods :deep(.install-method div[class*='language-'] code) { - padding: 0 18px; - font-size: 13px; - line-height: 22px; -} - -/* Keep the 40px copy control inside the compact, 50px single-line block. */ -.installation-methods - :deep(.install-method div[class*='language-'] > button.copy) { - top: 5px; - right: 6px; -} - -.installation-methods :deep(.install-method .vp-code-group) { - margin-top: 16px; -} - -.installation-methods :deep(.install-method .vp-code-group .tabs) { - margin: 0; - border-radius: 8px 8px 0 0; -} - -.installation-methods - :deep(.install-method .vp-code-group div[class*='language-']) { - margin: 0; - border-radius: 0 0 8px 8px; -} - .installation-methods :deep(.install-hosting) { margin: 24px 0 40px; color: var(--vp-c-text-2); @@ -492,10 +297,6 @@ onUnmounted(() => { padding: 8px 10px; font-size: 13px; } - - .installation-methods :deep(.install-method) { - padding: 16px; - } } @media (max-width: 379px) { @@ -520,10 +321,5 @@ onUnmounted(() => { .install-picker { display: none; } - - .installation-methods :deep(.install-method) { - display: block !important; - break-inside: avoid; - } } diff --git a/website/src/next/docs/installation.md b/website/src/next/docs/installation.md index 562b78f9bf..5a88702a84 100644 --- a/website/src/next/docs/installation.md +++ b/website/src/next/docs/installation.md @@ -6,6 +6,7 @@ pageClass: installation-page --- @@ -25,23 +26,21 @@ Choose a package manager for your system, or install Task from a binary. Maintained by the Task team and kept up-to-date. -
+ -### [Homebrew](https://brew.sh) {#homebrew} + - + -
+ -### [dnf](https://docs.fedoraproject.org/en-US/quick-docs/dnf) {#dnf} + - + -
+ -### [apt](https://doc.ubuntu-fr.org/apt) {#apt} + - + -
+ -### [apk](https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper) {#apk} + - + -
+ -### [Snap](https://snapcraft.io/task) {#snap} + - + -
+ -### [npm](https://www.npmjs.com) {#npm} + - + -
+ -### [WinGet](https://github.com/microsoft/winget-cli) {#winget} + - +

Package repository hosting for deb/rpm/apk is graciously provided by Cloudsmith.

@@ -226,21 +213,19 @@ Available through the Maintained by the community, outside the Task team's control. These packages may lag behind the latest release. -
+ -### [Mise](https://mise.jdx.dev/) {#mise} + - + -
+ -### [Macports](https://macports.org) {#macports} + - + -
+ -### [pip](https://pip.pypa.io) {#pip} + - + -
+ -### [Chocolatey](https://chocolatey.org) {#chocolatey} + - + -
+ -### [Scoop](https://scoop.sh) {#scoop} + - + -
+ -### Arch ([pacman](https://wiki.archlinux.org/title/Pacman)) {#arch} + - + -
+ -### Fedora ([dnf](https://docs.fedoraproject.org/en-US/quick-docs/dnf)) {#fedora-community} + - + -
+ -### FreeBSD ([Ports](https://ports.freebsd.org/cgi/ports.cgi)) {#freebsd} + - + -
+ -### [Nix](https://nixos.org) {#nix} + - + -
+ -### [pacstall](https://github.com/pacstall/pacstall) {#pacstall} + - + -
+ -### [pkgx](https://pkgx.sh) {#pkgx} + - +