Skip to main content
If you used difyctl before Dify 1.18.0, your old build stops working once your server runs 1.18.0 or later. The commands and sign-in have changed, so start from Upgrade Across Dify 1.18.0.
To have your coding agent do this setup for you, point it to this page. You’ll still approve its sign-in in your browser.

Before You Start

On Dify Cloud, you’re ready to install. On a self-hosted server, check that:

Install

brew install dify gets you Dify’s plugin development CLI, not difyctl.
1

Run the Installer

Supported on x64 and arm64.
This installs the build from the latest Dify release. If your self-hosted server isn’t on the latest release, set DIFY_VERSION to its version:
The script checks the download’s checksum and installs to ~/.local/bin/difyctl.
To install into a different folder or change other install settings, see Configuration.
2

Verify the Install

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

Sign In

1

Start the Sign-In

Pass the address you open Dify at in your browser (https://cloud.dify.ai on Dify Cloud):
If no browser opens, for example over SSH, open the URL difyctl prints on any device.For a local server on http:// or with a self-signed certificate, add --insecure. It applies to every later command until you sign in again without it, so keep it to local development.
2

Approve in Your Browser

On the Authorize difyctl page, enter the code difyctl printed and click Continue. The code expires after 15 minutes.When the page shows your account and workspace, check both before you click Authorize. difyctl and your coding agent will act as this account and can do anything it can. If it’s not the account you want, click Cancel, sign in to Dify as the right one, and start the sign-in again.difyctl will work in the workspace the page shows. To use a different one, switch difyctl to it once you’ve signed in.
To sign in again or sign out later, see Manage Your Sign-In. If sign-in fails, see Troubleshooting.

List Your Apps

Check that difyctl works by listing the apps in the workspace you signed in to:
Only apps with Service API access turned on are listed.

Set Up Your Coding Agent

The difyctl skill teaches your coding agent to use difyctl. Install it into the skills folder of each coding agent you use:
For any other agent, look up its skills folder in its documentation. If your agent doesn’t find the skill, restart it.

Keep Control of Commands and Keys

Keep your agent’s own approval for shell commands turned on: difyctl runs each command without asking first. The skill tells your agent to check with you before it deletes anything, installs an integration, or publishes an app. Whether it does depends on the AI model your agent runs on.
To let your agent look around without asking, allow the commands that only read from your server: difyctl get, difyctl describe, and difyctl knowledge_fs Cloud.
Anything you type into the chat, such as a model provider’s API key, passes through your agent’s model. To keep a key out of it, add the key in Dify yourself before the agent needs it, or tell the agent you’ll add it yourself when it asks.

Find Commands Yourself

Describe the job to help in a few words, and it lists the commands that match. For example, to find the command that publishes an app:
To browse instead, run difyctl help. For how to pass values to a command and follow the hints in its results, see Find and Run Commands.

Next Steps

Ask your agent for any of these, or do them yourself:

Troubleshooting

Last modified on October 28, 2026