Quickstart
Install the Dagger CLI
The Dagger CLI is available for installation on macOS, Linux, and Windows to run locally or in a CI environment.
Stable release
Install the latest stable release of the Dagger CLI following the steps below.
- macOS
- Linux
- Windows
We assume that you have Homebrew installed. If you do, you can install dagger
with a single command:
brew install dagger/tap/dagger
This installs dagger
in:
type dagger
# Expected output on macOS ARM:
# dagger is /opt/homebrew/bin/dagger
# Expected output on macOS Intel:
# dagger is /usr/local/bin/dagger
If you do not have Homebrew installed, you can use install.sh:
curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=/usr/local/bin sh
If your user account doesn't have sufficient privileges to install in
/usr/local
and sudo
is available, you can set BIN_DIR
and use sudo -E
:
curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=/usr/local/bin sudo -E sh
If you want to set a specific version, you can set DAGGER_VERSION
:
curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.15.2 BIN_DIR=/usr/local/bin sh
To see the installed version of dagger:
./bin/dagger version
# Expected output: dagger v0.15.2 (registry.dagger.io/engine:v0.15.2) darwin/amd64
The quickest way of installing the latest stable release of dagger
on Linux is to use install.sh:
curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
This installs dagger
in $HOME/.local/bin
:
type dagger
# Expected output: dagger is $HOME/.local/bin/dagger
You may need to add it to your $PATH
environment variable.
If you want to install globally, and sudo
is available, you can specify an
alternative install location by setting BIN_DIR
and using sudo -E
:
curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=/usr/local/bin sudo -E sh
If you want to set a specific version, you can set DAGGER_VERSION
:
curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.15.2 BIN_DIR=$HOME/.local/bin sh
To see the installed version of dagger:
./bin/dagger version
# Expected output: dagger v0.15.2 (registry.dagger.io/engine:v0.15.2) linux/amd64
The Dagger CLI can be installed on Windows via a PowerShell 7.0 script.
The quickest way of installing the latest stable release of dagger
on Windows is to use install.ps1:
Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1 | Invoke-Expression; Install-Dagger
To install Dagger to a custom location, specify the location using the -InstallPath
parameter.
Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1 | Invoke-Expression;
Install-Dagger -InstallPath C:\tools\dagger
To install a specific version of Dagger, specify the version with the -DaggerVersion
parameter.
Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1 | Invoke-Expression;
Install-Dagger -DaggerVersion 0.15.2
For an interactive installation process, include the -Interactive
switch.
Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1 | Invoke-Expression;
Install-Dagger -Interactive
For further customization, such as adding Dagger to your system's PATH, additional parameters are available. To view all available options:
Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1 | Invoke-Expression;
Get-Command -Name Install-Dagger -Syntax
By default, without specifying the -InstallPath
, Dagger will be installed in the <your home folder>\dagger
directory.
To verify that Dagger has been installed correctly, use where.exe
where.exe dagger
# Expected output: C:\<your home folder>\dagger\dagger.exe
Development release
Development releases should be considered unfinished.
- macOS
- Linux
- Windows
To install the latest development release, use the following command:
curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_COMMIT=head sh
This will install the development release of the Dagger CLI in ./bin/dagger
.
To install the latest development release, use the following command:
curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_COMMIT=head sh
This will install the development release of the Dagger CLI in ./bin/dagger
.
To install the latest development release, use the following command:
Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1 -DaggerCommit head
This will install the development release of the Dagger CLI in the <your home folder>\dagger
directory.
Running this CLI against the stable Dagger Engine will, by default, stop and remove the stable version and install a development version of the Dagger Engine instead. You may prefer to install it in an isolated environment so as to avoid conflicts.
CLI version, so you may prefer to install it in an isolated environment so as to avoid conflicts.