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
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
The file holds the access token, refresh token, expiry timestamps, and a hint of who you are (email, preferred username decoded from the ID token). Permissions are
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.