> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-release-1-15-0.mintlify.site/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` requires Dify 1.15.0 or later.
</Note>

## Install

<Steps>
  <Step title="Run the Installer">
    `difyctl` ships a build with each Dify release, and the installer fetches the latest by default.

    <Tabs>
      <Tab title="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 | sh
        ```

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

      <Tab title="Windows">
        Supported platform: x64.

        ```powershell theme={null}
        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.
      </Tab>

      <Tab title="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.

                   <CodeGroup>
                     ```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
                     ```
                   </CodeGroup>

        3. Put the binary on your `PATH`:

                   <CodeGroup>
                     ```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"
                     ```
                   </CodeGroup>
      </Tab>
    </Tabs>

    <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).<br /><br />Defaults to the latest release; set it to your server's release tag when your server isn't on the latest. | `1.15.0`      |
      | `DIFYCTL_VERSION` | Pin a specific `difyctl` build. Used only when `DIFY_VERSION` is unset.                                                                                                                                                                                | `0.1.0-alpha` |
      | `DIFYCTL_PREFIX`  | The install directory (default `~/.local`). The binary lands in `<prefix>/bin`.                                                                                                                                                                        | `/usr/local`  |

      For example:

      <CodeGroup>
        ```bash macOS / Linux theme={null}
        curl -fsSL https://raw.githubusercontent.com/langgenius/dify/main/cli/scripts/install-cli.sh | DIFY_VERSION=1.15.0 sh
        ```

        ```powershell Windows theme={null}
        # PowerShell has no inline form; this applies for the rest of your session
        $env:DIFY_VERSION = "1.15.0"
        irm https://raw.githubusercontent.com/langgenius/dify/main/cli/scripts/install.ps1 | iex
        ```
      </CodeGroup>
    </Tip>
  </Step>

  <Step title="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:

    <CodeGroup>
      ```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')
      ```
    </CodeGroup>
  </Step>
</Steps>

## Update

To update `difyctl`, re-run the install script; it replaces the binary in place. To move to a specific Dify version, set `DIFY_VERSION` as above.

## Uninstall

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

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

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

## Next Steps

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