docs/current_docs/partials/_install-cli.mdx
import { daggerVersion } from './version';
Install the latest stable release of the Dagger CLI following the steps below.
<Tabs groupId="platform"> <TabItem value="macOS">We assume that you have Homebrew installed. If you do, you can install dagger with a single command:
brew install dagger/tap/dagger
:::note
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:
<CodeBlock language="shell"> {`curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=/usr/local/bin sh`} </CodeBlock>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:
If you want to set a specific version, you can set DAGGER_VERSION:
To see the installed version of dagger:
<CodeBlock language="shell"> {`./bin/dagger version\n`} {`# Expected output: dagger v${daggerVersion} (registry.dagger.io/engine:v${daggerVersion}) darwin/amd64`} </CodeBlock> </TabItem> <TabItem value="Linux"> The quickest way of installing the latest stable release of `dagger` on Linux is to use [install.sh](https://github.com/dagger/dagger/blob/main/install.sh):curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
:::note
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:
To see the installed version of dagger:
<CodeBlock language="shell"> {`./bin/dagger version\n`} {`# Expected output: dagger v${daggerVersion} (registry.dagger.io/engine:v${daggerVersion}) linux/amd64`} </CodeBlock> </TabItem> <TabItem value="Windows">The simplest way to install Dagger on Windows is using the Windows Package Manager:
winget install Dagger.Cli
To verify the installation:
dagger version
:::warning Development releases should be considered unfinished. :::
<Tabs groupId="platform"> <TabItem value="macOS"> 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.
</TabItem>
<TabItem value="Linux">
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.
</TabItem>
<TabItem value="Windows">
To install the latest development release, use the following command in PowerShell 7.0:
iwr -useb https://dl.dagger.io/dagger/install.ps1 | iex; Install-Dagger -DaggerCommit head
This will install the development release of the Dagger CLI in the <your home folder>\dagger directory.
</TabItem>
</Tabs>
:::warning 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. :::