CLI を使い始める

tags

orc tags は、Workspaceで質問の分類に使うタグを管理するコマンドです。一覧を取得し、名前と表示色を作成・更新したり、タグを論理削除したりできます。

認証と対象Workspaceへのアクセスが必要です。一覧で返されたタグIDを変更・削除に使います。質問への関連付けは orc prompts tags update で行い、タグを作成する操作とは別です。

使い方

terminal
orc tags list --workspace <workspace-id>

タグとIDを確認します。

サブコマンド

list

Workspaceのタグを一覧します。--limit と返されたcursorでページを取得できます。

terminal
orc tags list [options]

create

name は必須で最大64文字です。任意の color は登録された色名を指定します。変更の再試行に --idempotency-key を使用できます。

terminal
orc tags 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。任意。

terminal
orc tags create --idempotency-key <value>
--name

(required) Tag name, from 1 to 64 characters. Must be unique among active tags in this workspace, ignoring case.; max 64 chars

型: string。任意。

terminal
orc tags create --name <value>
--color

Display color token. Defaults to gray when omitted.; enum: gray|red|orange|yellow|lime|green|cyan|blue|purple|fuchsia|pink|emerald|amber|violet|indigo|teal|sky|rose|slate|zinc|neutral|stone

型: string。任意。

terminal
orc tags create --color <value>

使用例

terminal
orc tags create --name "Priority" --color blue --workspace <workspace-id>

表示色付きのタグを作成する

update

タグIDを指定して入力した name と color を変更します。色は --color null または --color reset で解除できます。

terminal
orc tags 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。任意。

terminal
orc tags update <id> --idempotency-key <value>
--name

Replacement tag name. Omit to retain the current name.; max 64 chars

型: string。任意。

terminal
orc tags update <id> --name <value>
--color

Replacement color token. Send null to clear the stored color; omit to retain it.; enum: |gray|red|orange|yellow|lime|green|cyan|blue|purple|fuchsia|pink|emerald|amber|violet|indigo|teal|sky|rose|slate|zinc|neutral|stone; (use "null" or "reset" to clear)

型: string。任意。

terminal
orc tags update <id> --color <value>

使用例

terminal
orc tags update <tag-id> --color null --workspace <workspace-id>

タグの表示色を解除する

delete

タグIDを指定して論理削除します。対象WorkspaceとIDを確認してから実行します。

terminal
orc tags delete <id> [options]

表示色と質問への関連付け

色は gray、red、orange、yellow、lime、green、cyan、blue、purple、fuchsia、pink、emerald、amber、violet、indigo、teal、sky、rose、slate、zinc、neutral、stone です。

prompts tags update は関連付け全体を置き換えるため、新しいタグだけでなく保持する既存タグIDも送ってください。タグ名をそのままpromptのID引数へ指定する操作ではありません。

必要な権限

対象Workspaceへのアクセスが必要です。変更操作には対応する書き込み権限が必要です。

グローバルオプション

orc tags では、次のグローバルオプションを使用できます。

各オプションの詳細と使用例は、グローバルオプションを参照してください。