Skip to main content
Environment variables set defaults for the current shell session: every difyctl command you run in it picks them up. A command flag wins, then an environment variable. They’re shell-scoped and last only as long as the session.

Variables difyctl Reads

VariableWhat it controlsDefault
DIFY_CONFIG_DIRWhere difyctl keeps its configuration (hosts.yml).macOS and Linux: ~/.config/difyctl (Linux honors XDG_CONFIG_HOME)
Windows: %APPDATA%\difyctl
DIFY_LIMITDefault page size, 1 to 200, for list commands (get app, auth devices list). The --limit flag wins, then this variable.20
DIFY_WORKSPACE_IDThe workspace difyctl commands run against. Must be a UUID. See How difyctl Picks a Workspace for the resolution order.none
DIFYCTL_HTTP_RETRYRetry attempts for idempotent requests on transient failures (0 disables retries). --http-retry overrides it.3
An invalid value fails as a usage error (exit code 2) rather than being silently ignored, for example a non-UUID DIFY_WORKSPACE_ID.
Only the variables above change difyctl’s behavior. The others reported by the env list command are recognized but currently have no effect.

See What’s Set

difyctl env list [flags]
env list shows the current value of each difyctl environment variable in your shell. It reads only your local environment and never calls the server, so it works before you sign in.

Flags

FlagTypeDefaultDescription
--jsonbooleanfalsePrint the inventory as a JSON array instead of a table.
env list takes --json, not the -o global flag.

Examples

Check which variables are set in the current shell:
difyctl env list
Get the same inventory as JSON:
difyctl env list --json

Output

Unset variables show <unset>, and sensitive variables never print their value (only <set> or <unset>). With DIFY_LIMIT=50 exported:
NAME                VALUE    DESCRIPTION
DIFY_CONFIG_DIR     <unset>  Override the config-dir resolution (precedes XDG_CONFIG_HOME on Linux).
DIFY_FORMAT         <unset>  Default output format for list commands (table | json | yaml | wide | name).
DIFY_HOST           <unset>  Default Dify host (overridden by --host).
DIFY_LIMIT          50       Default page size for list commands (1..200).
DIFY_NO_PROGRESS    <unset>  Suppress progress spinners. Truthy values: 1, true, yes.
DIFY_PLAIN          <unset>  Disable ANSI colors and decorative output. Truthy values: 1, true, yes.
DIFY_TOKEN          <unset>  Bearer token for non-interactive auth.
DIFY_WORKSPACE_ID   <unset>  Workspace ID used for difyctl commands.
DIFYCTL_HTTP_RETRY  <unset>  HTTP retry count for GET/PUT/DELETE. 0 disables. Overrides --http-retry flag.
--json prints a JSON array, one entry per variable, masked the same way:
[
  {
    "name": "DIFY_CONFIG_DIR",
    "description": "Override the config-dir resolution (precedes XDG_CONFIG_HOME on Linux).",
    "sensitive": false,
    "value": "<unset>"
  }
]

Exit Codes

CodeMeaning
0Success
See Output Formats and Exit Codes for the full scheme.
Last modified on June 25, 2026