Files
dify-docs/ja/cli/reference/environment-variables.mdx
Riskey 2f88f0f7d2 docs: sync Cloud documentation for Dify 1.15.0 (#835)
* docs: add Human Input file inputs and Service API to Cloud docs

Port the Phase 2 Human Input docs (file inputs and the Service API integration flow) to the Cloud docs, mirroring the self-host pages.

- human-input.mdx (en/zh/ja): add the Single File / File List field type and the file-handling notes; the upload-limit callout states Cloud's fixed limits (documents 15 MB, images 10 MB, audio 50 MB, video 100 MB, up to 10 files) instead of self-host env vars.
- hitl-api-integration-flow.mdx (en/zh/ja): new; identical to self-host since the Service API is the same.
- docs.json: nest the integration-flow under the Human Input group in all three navs.
- zh/ja reuse the self-host translations; only the callout and the /self-host/ links changed.

* docs: rewrite Cloud model providers around AI Credits

* docs: rewrite Cloud subscription management for 1.15.0

* docs: update Cloud code node limits and XLSX image extraction note

* docs: rewrite Cloud team members management for 1.15.0

* docs: apply the 1.15.0 Integrations redesign to Cloud docs

* docs: fix workflow API reference for run-level logs and streaming

* docs: sync self-host use-dify pages and fix translation debt

* docs: align shared tutorials and quick start with 1.15.0

* docs: refine difyctl install examples and workspace reference

* docs: rewrite hotkeys page to match current shortcuts

* fix: correct broken anchor links for badged headings and tabs

* fix: correct env link and Human Input resume identifier

* feat: handle heading badges in link-checker slugs

* fix: repoint publish-mcp cross-links to the merged MCP section

* docs: rename plugin dev CLI to Dify Plugin CLI

* docs: refine CLI reference readability and expand --agent

* feat: stop format checkers flagging indented list-item content

* fix: correct zh/ja custom-endpoint spacing and a list blank line

* docs: clarify Cloud model provider install and AI Credits coverage
2026-07-02 19:51:55 +08:00

94 lines
4.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 環境変数
description: 環境変数で現在の Shell セッションに difyctl のデフォルト値を設定
---
> このドキュメントは AI によって自動翻訳されています。不正確な部分がある場合は、[英語版](/en/cli/reference/environment-variables) を参照してください。
環境変数は現在の Shell セッションのデフォルト値を設定します。セッション内で実行するすべての `difyctl` コマンドがそれらを読み取ります。優先順位はコマンドのフラグが先、次に環境変数です。環境変数のスコープは Shell に限られ、有効なのはセッションの間だけです。
## difyctl が読み取る変数
| 変数 | 制御する内容 | デフォルト |
|:---|:---|:---|
| `DIFY_CONFIG_DIR` | `difyctl` が設定ファイル(`hosts.yml`)を保存する場所。 | macOS と Linux`~/.config/difyctl`Linux は `XDG_CONFIG_HOME` に従う)<br></br><br></br>Windows`%APPDATA%\difyctl` |
| `DIFY_LIMIT` | リストコマンド(`get app`、`auth devices list`)のデフォルトのページサイズ(1〜200)。優先順位は `--limit` フラグが先、次にこの変数です。 | `20` |
| `DIFY_WORKSPACE_ID` | `difyctl` コマンドの対象となるワークスペース。UUID である必要があります。解決順序は [difyctl がワークスペースを選択する方法](/ja/cli/reference/workspaces#difyctl-がワークスペースを選択する仕組み) を参照してください。 | なし |
| `DIFYCTL_HTTP_RETRY` | 一時的な障害が発生した際の、冪等なリクエストの再試行回数(`0` で再試行を無効化)。[`--http-retry`](/ja/cli/reference/global-flags#http-リトライ) が上書きします。 | `3` |
無効な値は黙って無視されるのではなく、使用法エラー(終了コード `2`)として失敗します。たとえば UUID でない `DIFY_WORKSPACE_ID` です。
<Info>
`difyctl` の動作を変えるのは上記の変数だけです。`env list` コマンドに表示されるその他の変数は、認識されますが現在は効果がありません。
</Info>
## 設定値を確認
```text
difyctl env list [flags]
```
`env list` は、Shell 内の各 `difyctl` 環境変数の現在の値を表示します。ローカル環境のみを読み取り、サーバーを呼び出すことはないため、サインイン前でも使用できます。
### フラグ
| フラグ | 型 | デフォルト | 説明 |
|:---|:---|:---|:---|
| `--json` | boolean | `false` | 一覧をテーブルではなく JSON 配列として出力する。 |
<Note>
`env list` が受け取るのは `--json` であり、[`-o` グローバルフラグ](/ja/cli/reference/global-flags) ではありません。
</Note>
### 例
現在の Shell でどの変数が設定されているかを確認します:
```bash
difyctl env list
```
同じ一覧を JSON で取得します:
```bash
difyctl env list --json
```
### 出力
未設定の変数は `<unset>` と表示され、機密性の高い変数は値を出力しません(`<set>` または `<unset>` のみ)。`DIFY_LIMIT=50` をエクスポートした場合:
```text
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` は変数ごとに 1 エントリの JSON 配列を出力し、上記と同じ方法でマスクします:
```json
[
{
"name": "DIFY_CONFIG_DIR",
"description": "Override the config-dir resolution (precedes XDG_CONFIG_HOME on Linux).",
"sensitive": false,
"value": "<unset>"
}
]
```
### 終了コード
| コード | 意味 |
|:---|:---|
| `0` | 成功 |
完全な体系は [出力フォーマットと終了コード](/ja/cli/reference/output-formats-and-exit-codes) を参照してください。