Files
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

172 lines
7.2 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: ワークスペースを一覧表示し、アクティブなワークスペースを切り替え、difyctl がコマンドで使用するワークスペースをどう決定するかを解説します
---
> このドキュメントは AI によって自動翻訳されています。不正確な部分がある場合は、[英語版](/en/cli/reference/workspaces) を参照してください。
`difyctl` は一度に 1 つのアクティブなワークスペースで動作します。このワークスペースは、フラグ、環境変数、または保存されたデフォルト値から決まります。これらの優先順位については [difyctl がワークスペースを選択する仕組み](#difyctl-がワークスペースを選択する仕組み) を参照してください。
- [`difyctl get workspace`](#ワークスペースの一覧表示) は所属するワークスペースを一覧表示します
- [`use workspace`](#ワークスペースの切り替え-cloud) はアクティブなワークスペースを切り替えます <Badge color="blue">Cloud</Badge>
どちらも [グローバルフラグ](/ja/cli/reference/global-flags) を受け付けます。
## ワークスペースの一覧表示
```text
difyctl get workspace [flags]
```
### フラグ
| フラグ | 型 | デフォルト | 説明 |
|:---|:---|:---|:---|
| `-o <format>` | string | none | 出力形式:`json`、`yaml`、`name`、`wide` のいずれか。フラグを省略するとデフォルトの表形式になります。 |
### 例
ワークスペースと、現在アクティブなものを確認する:
```bash
difyctl get workspace
```
スクリプト用に一覧全体を JSON 形式で取得する:
```bash
difyctl get workspace -o json
```
ワークスペース ID のみを 1 行に 1 つずつ出力する:
```bash
difyctl get workspace -o name
```
### 出力
| 形式 | stdout に出力される内容 |
|:---|:---|
| default | 整列された表。`CURRENT` 列は現在アクティブなワークスペースを `*` で示し、`ROLE` 列は各ワークスペースでのロールを示します。 |
| `-o wide` | 同じ列です。ワークスペースに wide 専用の列はありません。 |
| `-o json`、`-o yaml` | `workspaces` 配列。各エントリには `id`、`name`、`role`、`status`、`current` が含まれます。 |
| `-o name` | ワークスペース ID。1 行に 1 つずつ。 |
デフォルトの表:
```text
ID NAME ROLE STATUS CURRENT
b4e8d2a6-7c3f-4a1e-9d5b-8f2c6e0a4d7b Acme Team owner normal *
9c2f4e6a-8b1d-4f3e-a5c7-0d9e2b4f6a8c Marketing normal normal
```
`-o json`
```json
{
"workspaces": [
{
"id": "b4e8d2a6-7c3f-4a1e-9d5b-8f2c6e0a4d7b",
"name": "Acme Team",
"role": "owner",
"status": "normal",
"current": true
},
{
"id": "9c2f4e6a-8b1d-4f3e-a5c7-0d9e2b4f6a8c",
"name": "Marketing",
"role": "normal",
"status": "normal",
"current": false
}
]
}
```
### 終了コード
| コード | 意味 |
|:---|:---|
| `0` | 成功 |
| `1` | ネットワークまたはサーバーエラー |
| `2` | 使用方法のエラー(サポートされていない `-o` の値など) |
| `4` | 認証エラー |
| `7` | レート制限(HTTP 429 |
全体の体系については [出力形式と終了コード](/ja/cli/reference/output-formats-and-exit-codes) を参照してください。
## ワークスペースの切り替え <Badge color="blue">Cloud</Badge>
```text
difyctl use workspace [workspace-id] [flags]
```
`use workspace` はまずサーバー上でアクティブなワークスペースを切り替え、続いて `hosts.yml` に保存されたデフォルト値を更新します。切り替えに失敗した場合(ワークスペースが存在しない、またはメンバーでない場合)、ローカルの状態は変更されません。
<Tip>
日常的な呼び出し方法については、よく使うタスクの [ワークスペースの切り替え](/ja/cli/common-tasks#ワークスペースの切り替え-cloud) を参照してください。
</Tip>
### 引数
- `workspace-id`:切り替え先のワークスペース。[`get workspace`](#ワークスペースの一覧表示) で取得します。ターミナルでは省略すると、現在のワークスペースが `*` で示された一覧から選択できます。非対話的なセッション(スクリプト、CI、パイプ)では必須です。
### フラグ
[グローバルフラグ](/ja/cli/reference/global-flags) のみです。
### 例
ワークスペースから対話的に選択する:
```bash
difyctl use workspace
```
または、切り替え先を自分で調べてから ID で切り替える(スクリプトで使える形式):
```bash
difyctl get workspace
difyctl use workspace 9c2f4e6a-8b1d-4f3e-a5c7-0d9e2b4f6a8c
```
別のワークスペースに対して単一のコマンドを実行するだけなら、切り替えずに `--workspace` を渡します:
```bash
difyctl get app --workspace 9c2f4e6a-8b1d-4f3e-a5c7-0d9e2b4f6a8c
```
### 出力
切り替えに成功すると、新しいアクティブなワークスペースが stdout に確認表示されます:
```text
✓ Switched to Marketing (9c2f4e6a-8b1d-4f3e-a5c7-0d9e2b4f6a8c)
```
切り替えは永続化されます。以降のすべてのコマンドは、再度切り替えるまで新しいワークスペースに対して実行されます。
### 終了コード
| コード | 意味 |
|:---|:---|
| `0` | 成功 |
| `1` | ワークスペースが見つからない、またはその他のサーバーエラー |
| `2` | 使用方法のエラー(選択するターミナルがない状況で `workspace-id` を省略した場合など) |
| `4` | 認証エラー、または `use workspace` がピッカーを開いたときに利用可能なワークスペースがない |
| `7` | レート制限(HTTP 429 |
全体の体系については [出力形式と終了コード](/ja/cli/reference/output-formats-and-exit-codes) を参照してください。
## difyctl がワークスペースを選択する仕組み
アプリは必ず 1 つのワークスペースに属するため、ワークスペースを対象とするすべてのコマンドには、実行先となるワークスペースが必要です。`difyctl` は次の順序で解決し、最初に見つかった値を使用します。
1. コマンド自体に付ける `--workspace <id>` フラグ。その呼び出しにのみ適用されます。
2. [`DIFY_WORKSPACE_ID`](/ja/cli/reference/environment-variables) 環境変数。
3. 保存されたデフォルト値。サインイン時に設定ディレクトリの `hosts.yml` に書き込まれ、[`use workspace`](#ワークスペースの切り替え-cloud) によって更新されます。
いずれからもワークスペースが得られない場合、コマンドは終了コード `2` で失敗します。
ワークスペース ID は UUID です。ワークスペース名ではなく、[`get workspace`](#ワークスペースの一覧表示) で取得した ID を使用してください。UUID でない値は使用方法のエラーになります。