> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Common Tasks

> Copy-paste commands for the run tasks you'll do most often as an external SSO user

All commands below assume you're [signed in](/en/3.11.x/develop/cli/sso-users/authenticate) and that your administrator has permitted you to run the apps you're targeting.

## 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`](/en/3.11.x/develop/cli/reference/apps#run-an-app). The reply prints to stdout.

```bash theme={null}
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`](/en/3.11.x/develop/cli/reference/apps#run-an-app) instead of a positional message. The outputs print to stdout as JSON.

```bash theme={null}
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
```

## Stream a Long Response

Add [`--stream`](/en/3.11.x/develop/cli/reference/apps#run-an-app) to print the response as it's generated instead of all at once at the end.

```bash theme={null}
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 reply, then pass it back with [`--conversation`](/en/3.11.x/develop/cli/reference/apps#run-an-app) to continue the same session. This applies to Chatbot, Chatflow, and Agent apps; Workflow and Text Generator apps don't maintain conversation state.

```bash theme={null}
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`](/en/3.11.x/develop/cli/reference/output-formats-and-exit-codes) to any command to get the raw response as pipe-friendly JSON.

```bash theme={null}
difyctl run app 0a1b2c3d-4e5f-6789-abcd-ef0123456789 "What are your business hours?" -o json | jq -r '.answer'
```
