# Unity Gaming Services CLI

> Manage UGS configuration from the command line.

[Unity Gaming Services (UGS) CLI](https://services.docs.unity.com/guides/ugs-cli/latest/general/overview) は、Unity Gaming Services 設定を管理、テスト、デプロイするためのさまざまなツールを備えたコマンドラインインターフェースです。この CLI は Unity Dashboard の代わりに使用できるスケーラブルで自動化可能な手段で、チームのワークフローと生産性を向上できます。

## 使用の準備##get-started

UGS CLI の使用を開始するには、以下のドキュメントを参照してください。

* UGS CLI をインストールして使用するには、[使用開始に関するドキュメント](https://services.docs.unity.com/guides/ugs-cli/latest/general/get-started/install-the-cli) に従います。
* Deployments の使用法については、[サンプル](https://github.com/Unity-Technologies/unity-gaming-services-cli/blob/main/Samples/Deploy/instructions.md) を参照します。
* UGS CLI を CI/CD ツールに統合する方法の例については、次を参照してください。
  * [Unity Build Automation](https://services.docs.unity.com/guides/ugs-cli/latest/general/samples/ci-cd-pipeline-usage/unity-build-automation/)
  * [GitHub Actions](https://services.docs.unity.com/guides/ugs-cli/latest/general/samples/ci-cd-pipeline-usage/github-actions)
  * [Jenkins](https://services.docs.unity.com/guides/ugs-cli/latest/general/samples/ci-cd-pipeline-usage/jenkins)
  * [Docker](https://services.docs.unity.com/guides/ugs-cli/latest/general/samples/ci-cd-pipeline-usage/docker)

包括的な説明については、[UGS CLI](https://services.docs.unity.com/guides/ugs-cli/latest/general/overview) ドキュメントを参照してください。

## サポート対象サービスとユースケース##supported-services-and-use-cases

### デプロイ##deployments

Deployments では、UGS に Config as Code 形式のワークフローが導入されます。CLI の deploy コマンドでファイル設定をデプロイすることで、自動ビルドパイプライン (CI/CD) との統合を行えます。

Deployments 機能は、[Remote Config](https://forum.unity.com/threads/remote-config-authoring-tool-from-the-editor-pre-release.1353494/) や [Cloud Code](https://forum.unity.com/threads/cloud-code-js-authoring-tool-from-the-editor-pre-release.1353491/) などのパッケージ経由で Unity エディターでもサポートされます。CLI により、開発者がエンジンにかかわらず Deployments 機能を使用し、ビルドワークフローを自動化できます。

Deployments では、以下を実行できます。

* Cloud Code および Remote Config のローカル設定を使用する。
* ゲームクライアントコードの隣にサービス設定を追加する。
* サービス設定に Git のようなワークフローを適用する (例: ブランチ、マージ、差分、タグ)。
* [Unity 環境](./service-environments.md) をリポジトリブランチにマップし、分離環境で作業する。
* CLI または [Deployment ウィンドウ](https://docs.unity3d.com/Packages/com.unity.services.deployment@latest/index.html?subfolder=/manual/deployment_window.html) を介して、ファイル設定を手動でデプロイする。
* CI/CD パイプラインにデプロイステップを追加して、デプロイを自動化する。

### Deployments のサポート対象サービス##supported-services-for-deployments

* [Cloud Code スクリプト](https://github.com/Unity-Technologies/unity-gaming-services-cli/blob/main/Samples/Deploy/instructions.md#deploy-cloud-code-script)
* [Cloud Code C# モジュール](https://github.com/Unity-Technologies/unity-gaming-services-cli/blob/main/Samples/Deploy/instructions.md#deploy-cloud-code-module)
* [Remote Config](https://github.com/Unity-Technologies/unity-gaming-services-cli/blob/main/Samples/Deploy/instructions.md#deploy-remote-config)
* [Economy](https://github.com/Unity-Technologies/unity-gaming-services-cli/blob/main/Samples/Deploy/instructions.md#deploy-economy)
* [Leaderboards](https://github.com/Unity-Technologies/unity-gaming-services-cli/blob/main/Samples/Deploy/instructions.md#deploy-leaderboards)
* [Triggers](https://github.com/Unity-Technologies/unity-gaming-services-cli/blob/main/Samples/Deploy/instructions.md#deploy-triggers)
* [アクセス](https://github.com/Unity-Technologies/unity-gaming-services-cli/blob/main/Samples/Deploy/instructions.md#deploy-access)
* [Matchmaker](https://github.com/Unity-Technologies/unity-gaming-services-cli/blob/main/Samples/Deploy/instructions.md#deploy-matchmaker)

### CLI のサポート対象サービス##supported-services-for-cli

* [アクセス](https://services.docs.unity.com/guides/ugs-cli/latest/access/Access%20Command%20Line/overview/)

* [Cloud Code](https://services.docs.unity.com/guides/ugs-cli/latest/cloud-code/Cloud%20Code%20Command%20Line/overview)

* [Economy](https://services.docs.unity.com/guides/ugs-cli/latest/economy/Economy%20Command%20Line/overview/)

* [Leaderboards](https://services.docs.unity.com/guides/ugs-cli/latest/leaderboards/Leaderboards%20Command%20Line/overview)

* [Lobby](https://services.docs.unity.com/guides/ugs-cli/latest/lobby/Lobby%20Command%20Line/overview)

* [Matchmaker](https://services.docs.unity.com/guides/ugs-cli/latest/general/base-commands/deploy/)

* [Player/Unity Authentication](https://services.docs.unity.com/guides/ugs-cli/latest/player/Player%20Command%20Line/overview/)

* [Remote Config](https://services.docs.unity.com/guides/ugs-cli/latest/remote-config/Remote%20Config%20Command%20Line/overview)

* [Triggers](https://services.docs.unity.com/guides/ugs-cli/latest/triggers/Triggers%20Command%20Line/overview/)

* [環境](https://services.docs.unity.com/guides/ugs-cli/latest/general/base-commands/environment/add)

* [Cloud Save](https://services.docs.unity.com/guides/ugs-cli/latest/cloud-save/Cloud%20Save%20Command%20Line/overview/)

* [Multiplay Hosting](https://services.docs.unity.com/guides/ugs-cli/latest/game-server-hosting/Game%20Server%20Hosting%20Command%20Line/overview/)

* [Scheduler](https://services.docs.unity.com/guides/ugs-cli/latest/scheduler/Scheduler%20Command%20Line/overview/)
