Find a Command
Describe the job tohelp in a few words, and it lists the commands that match. For example, to find the command that publishes an app:
difyctl help on its own: it lists the words commands start with, such as get and run. Add one of those words to list every command that starts with it:
help with its full name to see the fields it takes (the values you pass to it):
--help or -h to the command itself.
Run a Command
help labels the commands you canât undo as destructive, such as stop run and the delete commands that act on your server.
If help shows stop run as write instead, your server or difyctl is too old to label destructive commands. Until both are updated, check the target of every command that isnât read.
Pass Values as Flags
Pass each field you need as its flag, followed by the value. A commandâs help lists its flags with their types, defaults, and whether theyâre required. For example, part of the help forrun console_app workflow:
difyctl get console_app lists:
-
For a
booleanfield, pass the flag alone to set it to true, or add=falseto set it to false, such as--auto-generate-name=falseonrun console_app chat. -
For a list field, such as
string[], repeat the flag for each value, such as--identifiers a --identifiers boninstall plugin. -
For a field whose type is
json,object, or amap, pass the JSON text as the flagâs value. For example, with--inputsfrom the help above:
@ and the fileâs path, such as --inputs @inputs.json. To read it from stdin, write --inputs @-.
Watch for @ on a string field: it never reads a file. --yaml-content @app.yml sends the literal text @app.yml, not the fileâs contents. To send the contents, let the shell read the file with --yaml-content "$(cat app.yml)".
Send a Whole Request as JSON
When a script builds the request, or you keep it in a file, put all the fields in one JSON object and pass it with--input (singular, not the --inputs field above).
Write each field by its name: the flag without --, with underscores instead of dashes (app_id, not --app-id):
--input also reads from a file, such as --input @request.json, or from stdin, with --input @-.
A flag takes priority over the same field in --input. This way, you can keep a request in a file and change one value per run. With {"mode": "workflow", "limit": 50, "page": 1} in request.json, this lists the second page of your Workflow apps:
Follow Hints
Some results includehints: commands the server suggests you run next, with their values filled in wherever the server knows them. When a hint is the step you want next, run it instead of building that command yourself.
For example, after a chat app replies to difyctl run console_app chat, the result carries this hint:
op with spaces instead of dots, and pass its input to --input. Replace each null with your own value. For this hint, thatâs difyctl run console_app chat with your next message as the query: