difyctl get applists your appsdescribe appshows one app’s details and inputsrun appinvokes oneresume appcontinues a workflow that paused for human inputexport studio-app/import studio-appexports / imports apps as DSL files
List Your Apps
Arguments
[app-id]: optional. The ID of one app to show. Omit it to list every app in your workspace.
Flags
Examples
List the apps in your workspace:Output
Default table:
Exit Codes
See Output Formats and Exit Codes for the full scheme.
Inspect an App
describe app answers the question you have before running an unfamiliar app: what type of app is it, is its API enabled, and what inputs does it expect.
Arguments
<app-id>: required. The ID of the app to inspect.
Flags
Examples
Inspect an app before running it:--inputs programmatically:
Output
Default text view:
Description: row appears when the app has one, and an Agent: true row when the app is agentic.
Under -o json, the three keys are:
info- the metadata fields shown above, fromNametoService APIparameters- the parameters block shown aboveinput_schema- a normalized list of the app’s inputs, the field thejq '.input_schema'example reads
Exit Codes
Run an App
run app is one command for all app types. The CLI reads the app’s type and dispatches to the right endpoint. What changes is how you pass input and the response shape:
- Chatbot, Chatflow, Agent: take a positional message, print the reply to stdout, and print a conversation hint to stderr.
- Text Generator: takes a positional message and prints the completion to stdout. No conversational state, no hint.
- Workflow: takes a JSON object via
--inputsand prints its outputs to stdout. A workflow whose output is a single string prints it raw. Anything else prints as compact JSON.
Arguments
<app-id>: required. The ID of the app to run, fromget app.[message]: the user message, for Chatbot, Chatflow, Agent, and Text Generator apps. Workflow apps reject a positional message, so pass their inputs with--inputs.
Flags
Examples
Send a message to a Chatbot, Chatflow, Agent, or Text Generator app:Output
The response body goes to stdout. Everything else (hints, progress, errors) goes to stderr, so piping and redirection stay clean. After a reply from a Chatbot, Chatflow, or Agent app, stderr carries the conversation hint:
--stream, output prints incrementally as the server produces it. If a run fails with HTTP 422 right after an app was republished, the CLI clears its app-metadata cache and hints to run the command again.
Errors print to stderr. Under -o json they arrive as a structured JSON object with a stable code field. See Output Formats and Exit Codes for the error shape.
Exit Codes
When a Workflow Pauses
Workflow and Chatflow apps can include human-input steps. When a run reaches one, it pauses instead of finishing: the command exits 0 (a pause is not a failure), prints the pause to stdout, and prints a ready-to-run resume command to stderr:-o json, stdout gets the pause as a JSON object instead:
-o json and check stdout for "status": "paused". Three fields drive the resume: form_token, workflow_run_id, and (when the form offers more than one action) the action id. Forms expire at expiration_time (Unix epoch seconds).
When the workflow delivers its form through email or another external channel, form_token is null and the run can’t be resumed from the CLI.
Resume a Paused Workflow
resume app submits the form a paused workflow is waiting on, then attaches to the run and prints its output exactly like run app.
Arguments
<app-id>: required. Theapp_idfrom the pause payload.<form-token>: required. Theform_tokenfrom the pause payload. Tokens are single-use, so resuming with an already-consumed token returns an error.
Flags
Examples
Approve a single-action form, providing its input values:Output
In the default text output, stderr confirms the submission, the workflow’s output prints to stdout as the run completes, and stderr confirms the finish:
Exit Codes
Export an App
export studio-app writes the app’s full definition as a DSL YAML document, for versioning, backup, or importing elsewhere.
For Workflow and Chatflow apps, export returns the current draft, not the published version that run app executes. Use --workflow-id to export a specific published version instead. Chatbot, Agent, and Text Generator apps export the published version.
Arguments
<app-id>: required. The ID of the app to export, fromget app.
Flags
Examples
Print an app’s DSL to stdout:Output
The DSL YAML document prints to stdout: akind: app header, a version field, and the full app definition. With --output, the same content is written to the file and stderr confirms it:
Exit Codes
Import an App
import studio-app creates an app from a DSL YAML document, or overwrites an existing one with --app-id.
For Workflow and Chatflow apps, it writes the definition to the app’s draft. run app uses the published version, so publish the app in Dify after importing for the change to take effect.
Flags
Examples
Import an app from a local DSL file:Output
All status lines go to stderr; stdout stays empty. On success, stderr reports the new app’s ID:Missing plugin dependencies after the import. Install them before using the app.