The CLI authenticates against Grounds Account using the OAuth 2.0 device authorization grant with PKCE. You don’t need a client secret on your machine.Documentation Index
Fetch the complete documentation index at: https://docs.grounds.gg/llms.txt
Use this file to discover all available pages before exploring further.
grounds login
- The CLI requests a device code from Grounds Account.
- Your browser opens at the verification URL with the code pre-filled.
- You sign in with your Grounds Account (or are already signed in) and approve the device.
- The CLI exchanges the code for an access + refresh token.
- Tokens are written to your OS-specific config dir.
grounds logout
account.grounds.gg.
grounds doctor
| Check | Verifies |
|---|---|
config | Config dir is readable |
auth | Credentials present and the access token can be obtained (refreshes if expired) |
api | <api>/healthz returns 200 |
gradle | A Gradle wrapper or gradle binary is on PATH |
java | A JVM ≥ 21 is on PATH |
auth will say not logged in if you’ve never run login, or session expired (run 'grounds login') if your refresh token has aged out.
Auth in CI / scripts
For unattended use, don’t rungrounds login. Use a project-scoped service-account token instead:
GROUNDS_TOKEN overrides credentials from disk. The CLI will not try to refresh it (it’s not a JWT).
Credentials on disk
| OS | Path |
|---|---|
| Linux | $XDG_CONFIG_HOME/grounds/credentials.json (default ~/.config/grounds/credentials.json) |
| macOS | ~/Library/Application Support/grounds/credentials.json |
| Windows | %APPDATA%\grounds\credentials.json |
0600 on POSIX.
Multiple accounts / environments
Use--config <dir> (or GROUNDS_CONFIG_DIR) to keep separate credential stores:
API URL override
Set--api-url <url> or GROUNDS_API_URL to talk to a different forge instance (e.g., a self-hosted preview). Default is https://platform.grnds.io.