> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Install difyctl

> Install difyctl with a one-line script or a manual binary download

`difyctl` is a standalone binary with no runtime dependencies. The install script detects your platform, downloads the matching build from Dify's GitHub Releases, verifies its checksum, and puts the binary in place.

> [!NOTE]
>
> `difyctl` was introduced with Dify 1.15.0. Each build targets a specific Dify version, so install the one that matches your server (see `DIFY_VERSION` below).

## Install

**1. Run the Installer**

**macOS / Linux**

Supported platforms: macOS and Linux, x64 and arm64.

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/langgenius/dify/main/cli/scripts/install-cli.sh | DIFY_VERSION=1.17.1 sh
```

The script installs to `~/.local/bin/difyctl` and tells you if that directory isn't on your `PATH`.

**Windows**

Supported platform: x64.

```powershell theme={null}
$env:DIFY_VERSION = "1.17.1"
irm https://raw.githubusercontent.com/langgenius/dify/main/cli/scripts/install.ps1 | iex
```

The script installs to `%LOCALAPPDATA%\difyctl\bin\difyctl.exe` and prints the command to add that directory to your `PATH` if it isn't already there.

**Manual Download**

1. From [Dify's GitHub Releases](https://github.com/langgenius/dify/releases), pick the release that matches your server's Dify version and download two assets:

   * The binary for your platform (`difyctl-v<version>-<os>-<arch>`)
   * The checksum manifest (`difyctl-v<version>-checksums.txt`)

2. Compute the binary's SHA-256 hash and compare it with the matching entry in the checksums file.

   If the values differ, the download is corrupted or was tampered with; delete it and download again.

   ```bash macOS / Linux theme={null}
   shasum -a 256 difyctl-v<version>-<os>-<arch>
   ```

   ```powershell Windows theme={null}
   Get-FileHash difyctl-v<version>-windows-x64.exe
   ```

3. Put the binary on your `PATH`:

   ```bash macOS / Linux theme={null}
   chmod +x difyctl-v<version>-<os>-<arch>
   mv difyctl-v<version>-<os>-<arch> ~/.local/bin/difyctl
   ```

   ```powershell Windows theme={null}
   New-Item -ItemType Directory -Force "$env:LOCALAPPDATA\difyctl\bin" | Out-Null
   Move-Item difyctl-v<version>-windows-x64.exe "$env:LOCALAPPDATA\difyctl\bin\difyctl.exe"
   ```

> [!TIP]
>
> To customize the install, set any of these environment variables on the install command.
>
> | Variable | Description | Example |
> | - | - | - |
> | `DIFY_VERSION` | The Dify release tag to install `difyctl` from, matching a tag on [Dify's Releases](https://github.com/langgenius/dify/releases). Defaults to the latest release; set it to your server's release tag when your server isn't on the latest. | `1.16.1` |
> | `DIFYCTL_VERSION` | Pin a specific `difyctl` build. Used only when `DIFY_VERSION` is unset. | `0.2.0-alpha` |
> | `DIFYCTL_PREFIX` | The install directory (default `~/.local`). The binary lands in `<prefix>/bin`. | `/usr/local` |
>
> For example:
>
> ```bash macOS / Linux theme={null}
> curl -fsSL https://raw.githubusercontent.com/langgenius/dify/main/cli/scripts/install-cli.sh | DIFY_VERSION=1.16.1 sh
> ```
>
> ```powershell Windows theme={null}
> # PowerShell has no inline form; this applies for the rest of your session
> $env:DIFY_VERSION = "1.16.1"
> irm https://raw.githubusercontent.com/langgenius/dify/main/cli/scripts/install.ps1 | iex
> ```

**2. Verify the Install**

```bash theme={null}
difyctl version
```

You should see a `Client:` block with the version and platform.

If you get `command not found` instead, the install directory isn't on your `PATH`. Add it:

```bash macOS / Linux theme={null}
# add to ~/.zshrc or ~/.bashrc; running it inline only lasts until the session ends
export PATH="$HOME/.local/bin:$PATH"
```

```powershell Windows theme={null}
[Environment]::SetEnvironmentVariable('PATH', "$env:LOCALAPPDATA\difyctl\bin;$env:PATH", 'User')
```

## Update

To update `difyctl`, re-run the install command above; it replaces the binary in place.

## Uninstall

```bash macOS / Linux theme={null}
rm ~/.local/bin/difyctl
```

```powershell Windows theme={null}
Remove-Item -Recurse "$env:LOCALAPPDATA\difyctl"
```

To sign out before uninstalling, run [`difyctl auth logout`](/en/cloud/cli/reference/auth-and-contexts#sign-out).

## Next Steps

With `difyctl` installed, head to the [Quick Start](/en/cloud/cli/quick-start.md) to sign in and run your first app.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.