---
title: workspace
description: CLIが使うWorkspaceを確認し、ディレクトリや既定値へ保存する。
canonical_url: https://orchestor.io/docs/cli/workspace
markdown_url: https://orchestor.io/docs/cli/workspace.md
contentType: reference
---

# workspace

`orc workspace` は、CLIで選択中のWorkspaceを確認し、現在のディレクトリへのリンクや将来のコマンドで使う既定Workspaceを保存するコマンドです。Workspaceの作成やサーバー上の変更は行いません。

API操作は [`orc workspaces`](https://orchestor.io/docs/cli/workspaces.md) を参照してください。ローカルで対象を選んでも、そのWorkspaceへのアクセス権が追加されるわけではありません。

## 使い方

```bash title="terminal"
orc workspace current
```

*選択中のWorkspaceと選択元を確認します。*

## サブコマンド

### `current`

選択したWorkspaceの `id` と選択元 `source` を返します。未選択の場合は `id: null`、`source: none` と選択方法の案内を返します。

```bash title="terminal"
orc workspace current [options]
```

### `link`

Workspace IDを現在のディレクトリの `.orchestor/workspace.json` に保存します。IDを省略すると現在解決されるWorkspaceを使います。対象がない場合は検証エラーです。保存結果は `workspaceId` と `path` です。

```bash title="terminal"
orc workspace link [id] [options]
```

### `unlink`

現在のディレクトリの `.orchestor/workspace.json` を削除します。ファイルがなかった場合も結果を返し、`unlinked` は実際にファイルがあったかを示します。グローバルの既定Workspaceは削除しません。

```bash title="terminal"
orc workspace unlink [options]
```

### `use`

必須のIDをローカル設定の `defaultWorkspace` として保存します。結果は `defaultWorkspace` と `configPath` です。現在のディレクトリのリンクや環境変数があれば、その指定が既定値より優先されます。

```bash title="terminal"
orc workspace use <id> [options]
```

### `list`

List workspaces

```bash title="terminal"
orc workspace list [options]
```

#### 固有のオプション

##### `--include-archived`

Include archived workspaces in the response.; enum: true|false

型: `string`。任意。

```bash title="terminal"
orc workspace list --include-archived <value>
```

##### `--include-management`

Include brand, monitoring configuration, and production prompt entitlement summaries for accessible workspaces.; enum: true|false

型: `string`。任意。

```bash title="terminal"
orc workspace list --include-management <value>
```

### `create`

Create workspace

```bash title="terminal"
orc workspace create [options]
```

#### 固有のオプション

##### `--idempotency-key`

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: `string`。任意。

```bash title="terminal"
orc workspace create --idempotency-key <value>
```

##### `--name`

(required) Workspace display name after trimming surrounding whitespace. Must contain 1 to 120 characters.; max 120 chars

型: `string`。任意。

```bash title="terminal"
orc workspace create --name <value>
```

##### `--slug`

Preferred workspace URL slug. Omit or send an empty string to derive it from name. The server normalizes to lowercase letters, digits and hyphens and resolves conflicts within the organization.

型: `string`。任意。

```bash title="terminal"
orc workspace create --slug <value>
```

##### `--workspace-type`

Workspace type. Omission creates a team workspace.; enum: personal|team

型: `string`。任意。

```bash title="terminal"
orc workspace create --workspace-type <value>
```

##### `--client-label`

Optional client-facing label. Surrounding whitespace is removed; omitted, null or empty values store no label.; (use "null" or "reset" to clear)

型: `string`。任意。

```bash title="terminal"
orc workspace create --client-label <value>
```

##### `--purpose`

Commercial workspace purpose, defaulting to client in the extended flow. Supplying this field selects extended creation. pitch requires an agency organization and consumes monthly and active pitch quotas.; enum: client|pitch

型: `string`。任意。

```bash title="terminal"
orc workspace create --purpose <value>
```

##### `--setup-mode`

Creation stopping point. A supplied owned brand is initialized active in every mode; no separate brand activation is required. Brand readiness does not start measurement. empty skips setup generation and measurement; brand is optional. suggestions generates review candidates without starting measurement. measure generates and measures. Omission uses measure if any extended setup field is present; otherwise creation is empty. Pitch quotas and seven-day expiry begin at creation in every mode.; enum: empty|suggestions|measure

型: `string`。任意。

```bash title="terminal"
orc workspace create --setup-mode <value>
```

##### `--brand`

Managed brand to initialize. Required for suggestions and measure. Optional for empty; when provided, both name and domain are required. Supplying brand without setup_mode starts the measure flow.; (JSON object, e.g. '{"custom_id":"x"}')

型: `string`。任意。

```bash title="terminal"
orc workspace create --brand <value>
```

##### `--default-country-code`

Two-letter default observation country code. Trimmed and uppercased. Defaults to JP in the extended flow. Supplying this field selects extended creation even without setup_mode.

型: `string`。任意。

```bash title="terminal"
orc workspace create --default-country-code <value>
```

##### `--default-language-code`

Default observation language code, optionally with a regional suffix. Trimmed and lowercased, for example ja or en-us. Defaults to ja in the extended flow. Supplying this field selects extended creation even without setup_mode.

型: `string`。任意。

```bash title="terminal"
orc workspace create --default-language-code <value>
```

### `get`

Get workspace

```bash title="terminal"
orc workspace get <id> [options]
```

### `update`

Update workspace

```bash title="terminal"
orc workspace update <id> [options]
```

#### 固有のオプション

##### `--idempotency-key`

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --idempotency-key <value>
```

##### `--is-default`

Set this workspace as the organization default. Must be true and the only field in the body. Requires a human organization owner or admin; machine credentials cannot perform this change.; enum: true

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --is-default <value>
```

##### `--name`

Replacement workspace display name. Omit to retain the current value.; max 120 chars

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --name <value>
```

##### `--slug`

Replacement preferred slug. Normalized and made unique within the organization. Omit to retain the current slug.

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --slug <value>
```

##### `--client-label`

Replacement client-facing label. Omit to retain it; null or an empty string clears it. Nonempty strings are trimmed.; (use "null" or "reset" to clear)

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --client-label <value>
```

##### `--color-token`

Workspace visual identity color. Omit to retain the current token.; enum: default|gray|brown|orange|yellow|green|blue|purple|pink|red

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --color-token <value>
```

##### `--identity-kind`

Workspace visual identity rendering mode. Omit to retain the current mode. Set the corresponding icon, emoji or image value separately when needed.; enum: color|initial|icon|emoji|image

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --identity-kind <value>
```

##### `--icon-token`

Icon identifier used by icon identity mode. Omit to retain it; null or an empty string clears it. Does not change identity_kind.; (use "null" or "reset" to clear); max 64 chars

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --icon-token <value>
```

##### `--emoji`

Emoji value used by emoji identity mode. Omit to retain it; null or an empty string clears it. Does not change identity_kind.; (use "null" or "reset" to clear); max 32 chars

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --emoji <value>
```

##### `--image-file-id`

File ID used by image identity mode. Omit to retain it; null or an empty string clears it. Does not change identity_kind.; (use "null" or "reset" to clear)

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --image-file-id <value>
```

##### `--purpose`

Set client to convert an unarchived pitch workspace. Submit only purpose and optional dry_run. The conversion is irreversible. A request to convert to pitch is rejected.; enum: client|pitch

型: `string`。任意。

```bash title="terminal"
orc workspace update <id> --purpose <value>
```

### `archive`

Archive workspace

```bash title="terminal"
orc workspace archive <id> [options]
```

#### 固有のオプション

##### `--idempotency-key`

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: `string`。任意。

```bash title="terminal"
orc workspace archive <id> --idempotency-key <value>
```

### `restore`

Restore workspace

```bash title="terminal"
orc workspace restore <id> [options]
```

#### 固有のオプション

##### `--idempotency-key`

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: `string`。任意。

```bash title="terminal"
orc workspace restore <id> --idempotency-key <value>
```

## 使用例

### 現在のディレクトリへリンクします。

```bash title="terminal"
orc workspace link <workspace-id>
```

*現在のディレクトリへリンクします。*

### 既定Workspaceを設定します。

```bash title="terminal"
orc workspace use <workspace-id>
```

*既定Workspaceを設定します。*

### ディレクトリのリンクを解除します。

```bash title="terminal"
orc workspace unlink
```

*ディレクトリのリンクを解除します。*

## 選択の優先順位

対象は `--workspace`、`ORCHESTOR_WORKSPACE_ID`、現在のディレクトリの `.orchestor/workspace.json`、グローバル設定の `defaultWorkspace` の順に選びます。期待と異なる場合は `current` の `source` と、優先される指定を確認してください。

`link` と `use` はローカル選択の保存です。認証や所属はサーバーへの操作時に確認されます。

## グローバルオプション

`orc workspace` では、次の[グローバルオプション](https://orchestor.io/docs/cli/global-flags.md)を使用できます。

- [`--help`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%98%E3%83%AB%E3%83%97)
- [`--workspace`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%AF%E3%83%BC%E3%82%AF%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9)
- [`--json`](https://orchestor.io/docs/cli/global-flags.md#json-%E5%87%BA%E5%8A%9B)
- [`--pretty`](https://orchestor.io/docs/cli/global-flags.md#json-%E5%87%BA%E5%8A%9B)
- [`--format`](https://orchestor.io/docs/cli/global-flags.md#%E5%87%BA%E5%8A%9B%E5%BD%A2%E5%BC%8F)
- [`--field`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E3%81%AE%E6%8A%BD%E5%87%BA)
- [`--fields`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E3%81%AE%E6%8A%BD%E5%87%BA)
- [`--raw`](https://orchestor.io/docs/cli/global-flags.md#%E5%80%A4%E3%81%A0%E3%81%91%E3%82%92%E5%87%BA%E5%8A%9B)
- [`--output`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%B8%E3%81%AE%E5%87%BA%E5%8A%9B)
- [`--no-pager`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%9A%E3%83%BC%E3%82%B8%E9%80%81%E3%82%8A)
- [`--dry-run`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%81%AE%E4%BA%8B%E5%89%8D%E7%A2%BA%E8%AA%8D)
- [`--yes`](https://orchestor.io/docs/cli/global-flags.md#%E7%A2%BA%E8%AA%8D%E3%81%AE%E7%9C%81%E7%95%A5)
- [`--limit`](https://orchestor.io/docs/cli/global-flags.md)
- [`--cursor`](https://orchestor.io/docs/cli/global-flags.md)
- [`--stdin`](https://orchestor.io/docs/cli/global-flags.md#%E6%A8%99%E6%BA%96%E5%85%A5%E5%8A%9B)
- [`--from-stdin`](https://orchestor.io/docs/cli/global-flags.md#%E6%A8%99%E6%BA%96%E5%85%A5%E5%8A%9B)
- [`--page-all`](https://orchestor.io/docs/cli/global-flags.md#%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E3%83%9A%E3%83%BC%E3%82%B8%E3%82%92%E5%8F%96%E5%BE%97)
- [`--timing`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E6%99%82%E9%96%93)
- [`--readonly`](https://orchestor.io/docs/cli/global-flags.md#%E8%AA%AD%E3%81%BF%E5%8F%96%E3%82%8A%E5%B0%82%E7%94%A8%E3%83%A2%E3%83%BC%E3%83%89)
- [`--wrap-untrusted`](https://orchestor.io/docs/cli/global-flags.md#%E5%A4%96%E9%83%A8%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E7%9B%AE%E5%8D%B0%E4%BB%98%E3%81%91)

各オプションの詳細と使用例は、[グローバルオプション](https://orchestor.io/docs/cli/global-flags.md)を参照してください。

---

[Documentation index](https://orchestor.io/docs/llms.txt)
