> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-release-1-15-0.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Common Tasks

> Copy-paste commands for the difyctl tasks you'll run most often

All commands below assume you're [signed in](/en/cli/authenticate).

## 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/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/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
```

## Find Your Apps

List the apps in your workspace with [`difyctl get app`](/en/cli/reference/apps#list-your-apps). Narrow the list with `--name` or `--mode`.

```bash theme={null}
difyctl get app

# filter by name substring or mode
difyctl get app --name report --mode workflow

# list apps from every workspace you belong to
difyctl get app -A
```

## Stream a Long Response

Add [`--stream`](/en/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 Chatbot or Chatflow reply, then pass it back with [`--conversation`](/en/cli/reference/apps#run-an-app) to continue the same conversation.

```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/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'

# 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
```

## Switch Your Workspace <Badge color="blue">Cloud</Badge>

Change your active workspace with [`difyctl use workspace`](/en/cli/reference/workspaces#switch-your-workspace-cloud). List available workspaces with `get workspace`.

```bash theme={null}
difyctl get workspace

difyctl use workspace 9c2f4e6a-8b1d-4f3e-a5c7-0d9e2b4f6a8c
# ✓ Switched to Marketing (9c2f4e6a-8b1d-4f3e-a5c7-0d9e2b4f6a8c)

# one-off: run a single command against another workspace without switching
difyctl get app --workspace 9c2f4e6a-8b1d-4f3e-a5c7-0d9e2b4f6a8c
```

## Inspect an App's Inputs

Before running an unfamiliar app, check its app type and input schema with [`difyctl describe app`](/en/cli/reference/apps#inspect-an-app): names, types, and which inputs are required.

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