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

# Global Flags

> Use these flags across difyctl commands to control output format, verbosity, and retry behavior

The flags below work across `difyctl` commands. `-v` and `-h` are universal, while `-o` and `--http-retry` are accepted by most but not all. Check a command's [reference](/en/cli/reference/command-index) for the flags it accepts.

| Flag                                      | What it does                                                          |
| :---------------------------------------- | :-------------------------------------------------------------------- |
| [`-o, --output <format>`](#output-format) | Selects the output format: `json`, `yaml`, `name`, `wide`, or `text`. |
| [`-v, --verbose`](#verbose-mode)          | Turns on verbose diagnostics on stderr.                               |
| [`--http-retry <n>`](#http-retries)       | Sets the retry budget for idempotent requests.                        |
| [`-h, --help`](/en/cli/reference/help)    | Show the command's help instead of running it.                        |

<Note>
  Flags always follow the command: `difyctl get app -o json` works; `difyctl -o json get app` is read as an unknown command.
</Note>

## Output Format

To see which of the five formats a command supports, check its `--help` or the flags table on its reference page. If you repeat the flag, the last value wins.

`-o` also changes how failures render: under `-o json`, errors arrive as a machine-readable JSON object on stderr.

For the format schemas, defaults, and channel rules, see [Output Formats and Exit Codes](/en/cli/reference/output-formats-and-exit-codes).

<Note>
  On [`export studio-app`](/en/cli/reference/apps#export-an-app), `-o` is the output file path, not a format selector.
</Note>

## Verbose Mode

`-v` adds verbose HTTP logging to stderr and includes the `raw_response` field (the raw server response, bearer tokens redacted) in error output.

Use it when a request fails and the normal error doesn't explain why.

## HTTP Retries

`difyctl` retries idempotent requests (GET, PUT, DELETE) on transient failures: network errors and HTTP 408, 413, 500, 502, 503, and 504 responses. POST requests are never retried. A 429 (rate limited) is handled separately and exits `7`, not retried by this budget.

The default budget is 3 attempts with exponential backoff (300 ms, doubling, capped at 30 s). Use `--http-retry 0` to disable retries.

The [`DIFYCTL_HTTP_RETRY`](/en/cli/reference/environment-variables) environment variable sets the same budget; if both are set, the flag takes priority.

## `--workspace` Is Not Global <Badge color="blue">Cloud</Badge>

`--workspace <id>` is per-command: it appears on commands that target workspace data and applies to that invocation only.

For where the flag sits in the precedence chain (flag, environment variable, stored default), see [How difyctl Picks a Workspace](/en/cli/reference/workspaces#how-difyctl-picks-a-workspace).
