Install and sign in
Overview
Install the AGS CLI and sign in to your AGS environment.
Install
Homebrew (macOS)
brew install accelbyte/tap/ags-cli
Homebrew users get updates through the normal brew upgrade flow.
macOS and Linux (installer script)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/AccelByte/accelbyte-ags-cli/releases/latest/download/accelbyte-ags-cli-installer.sh | sh
Windows (installer script)
powershell -ExecutionPolicy Bypass -c "irm https://github.com/AccelByte/accelbyte-ags-cli/releases/latest/download/accelbyte-ags-cli-installer.ps1 | iex"
The AGS CLI binaries are not code-signed yet. Your operating system may display a warning on the first run. On macOS, open the binary's properties in System Settings and allow it to run. On Windows, select Run anyway if prompted by SmartScreen.
Sign in
Browser login (interactive)
ags auth login
This opens a browser window and completes the sign-in flow. It requires a public IAM client with http://127.0.0.1:<port> configured as a redirect URI. The default port is 8080. Change it with --port if that port is in use.
If you don't have that IAM client yet, create it from the login prompt:
-
Press Enter at the Client ID prompt. The CLI prints a link to the IAM client form in the Admin Portal. The link selects the AGS CLI template, which creates a public client with
http://127.0.0.1:8080as its redirect URI. -
Open the link and create the client. If your Admin Portal doesn't have the AGS CLI template yet, the form opens empty. Enter Client Type: Public, Client Name: AGS CLI, and Redirect URI:
http://127.0.0.1:8080.If you log in with
--portand a port other than8080, set the client's redirect URI tohttp://127.0.0.1:<port>. This applies whether the form uses the AGS CLI template or opens empty. The CLI prints the same reminder under the link. -
Paste the new client's ID at the Client ID prompt.
CI login (client credentials)
ags auth login --grant client-credentials
Use this in CI pipelines and service accounts. It requires a confidential IAM client and a client secret. Store the client secret as a CI secret variable. After login, subsequent ags commands in the same session use the stored token without passing credentials on every call.