Skip to main content
Before you start, make sure difyctl is installed.
The CLI’s API endpoints (/openapi/v1/*) are off by default: set api.openapi.enabled: true in the Helm values before you sign in. api.enableOauthBearer must stay true (the default).

Step 1: Sign In

  1. Sign in to your company’s Dify host. Use the console API URL for your instance.
    difyctl prints a one-time code and a verification URL, then waits:
  2. Open the URL in a browser, enter the code, and sign in. Return to the terminal and you’ll see:

Step 2: Find Your App

List the apps in your workspace:
You should see something like this:
Copy the ID of the app you want to run. The examples below use the two IDs from this table.

Step 3: Run Your App

How you pass input depends on the app type.
Pass your message as a positional argument:
The reply prints to stdout. For Chatbot, Chatflow, and Agent apps, a hint also prints to stderr so you can continue the same conversation later:

Next Steps