コンテンツにスキップ

複数の Profile を使用する

Profile は別名付きの完全な OWL 設定で、Endpoint、API Key、任意のワークスペース情報を含みます。複数のアカウント、サイト、環境を分離して保存できます。

追加と切り替え

owl profile add customer-a
owl profile add customer-b --from ./customer-b.yaml
owl profile list
owl switch customer-a
owl profile current

profile add は設定を保存するだけで、自動的に選択しません。追加と切り替えはローカル検証のみを行い、実際の認証はリクエスト時に確認されます。エラー時に別の Profile へフォールバックしません。

owl --profile customer-b sync
owl --profile customer-b exec owl.data.show_dql_namespace
OWL_PROFILE=customer-b owl profile current -f json

選択の優先順位は --profile > OWL_PROFILE > owl switch で保存したデフォルトです。--profile はツール名の前に指定します。

ファイルとキャッシュの分離

名前付き Profile は ${OWL_DIR}/profiles/ 以下に独立した設定、認証情報、キャッシュ、データ、ログを保持します。ツールキャッシュは Endpoint と Key でも分離されます。

従来の ${OWL_DIR}/config.yaml は予約名 default として残ります。Profile 選択後は、Endpoint と Key はその Profile からセットで取得され、OWL_REGISTRY_ENDPOINT、OWL_API_KEY、OWL_TOKEN で上書きされません。

CLI の --conf は非推奨で、ヘルプから非表示になりました。移行期間中は互換性が保たれますが、--profile とは併用できません。Registry サービスの --config には影響しません。

シェル補完

eval "$(owl completion bash)"
owl completion powershell | Out-String | Invoke-Expression

補完は Profile 別名、カテゴリ、ツール名、パラメータ、schema の enum 値を提示します。選択中 Profile のローカルキャッシュだけを読み取り、通信やツール実行は行いません。

名前変更と削除

owl profile rename customer-a customer-a-prod
owl profile remove customer-b
owl profile remove obsolete-profile --purge

通常の削除では cache/data が保持されます。--purge は管理対象の成果物も削除します。消去に失敗した場合は設定、認証情報、別名が保持または復元され、権限修正後に再試行できます。default は名前変更も削除もできません。

フィードバック

このページは役に立ちましたか?