All commands below assume you’re signed in.
Send a Message
Send a message to a Chatbot, Chatflow, Agent, or Text Generator app by passing it as a positional argument to difyctl run app. The reply prints to stdout.
difyctl run app 0a1b2c3d-4e5f-6789-abcd-ef0123456789 "What are your business hours?"
# save just the reply to a file; hints and errors go to stderr, not stdout
difyctl run app 0a1b2c3d-4e5f-6789-abcd-ef0123456789 "Summarize this week's tickets" > reply.txt
Run a Workflow
Pass the inputs as a single JSON object with --inputs instead of a positional message. The outputs print to stdout as JSON.
difyctl run app 7f3e9a2b-1c4d-4e8f-9a0b-2d5c8e1f4a7b --inputs '{"topic":"quarterly report"}'
# read large input sets from a file instead
difyctl run app 7f3e9a2b-1c4d-4e8f-9a0b-2d5c8e1f4a7b --inputs-file inputs.json
Find Your Apps
List the apps in your workspace with difyctl get app. Narrow the list with --name or --mode.
difyctl get app
# filter by name substring or mode
difyctl get app --name report --mode workflow
Stream a Long Response
Add --stream to print the response as it’s generated instead of all at once at the end.
difyctl run app 0a1b2c3d-4e5f-6789-abcd-ef0123456789 "Draft a launch announcement" --stream
Continue a Conversation
Copy the conversation ID from the hint that follows each Chatbot or Chatflow reply, then pass it back with --conversation to continue the same conversation.
difyctl run app 0a1b2c3d-4e5f-6789-abcd-ef0123456789 "What are your business hours?"
# hint: continue this conversation with --conversation 4f7d8c2a-9b1e-4c6d-8a3f-5e2b7c9d0a1f
difyctl run app 0a1b2c3d-4e5f-6789-abcd-ef0123456789 "And on weekends?" --conversation 4f7d8c2a-9b1e-4c6d-8a3f-5e2b7c9d0a1f
Get JSON Output for Scripts
Add -o json to any command to get the raw response as pipe-friendly JSON.
difyctl run app 0a1b2c3d-4e5f-6789-abcd-ef0123456789 "What are your business hours?" -o json | jq -r '.answer'
# extract fields from list output the same way
difyctl get app -o json | jq -r '.data[].id'
# get just the IDs, one per line, no jq needed
difyctl get app -o name
Before running an unfamiliar app, check its app type and input schema with difyctl describe app: names, types, and which inputs are required.
difyctl describe app 7f3e9a2b-1c4d-4e8f-9a0b-2d5c8e1f4a7b
# get the schema as JSON to build --inputs programmatically
difyctl describe app 7f3e9a2b-1c4d-4e8f-9a0b-2d5c8e1f4a7b -o json
Last modified on June 25, 2026