/v1 REST API. The fastest way to get set up is the browser-based login flow. No copy-pasting keys.
Browser-based login (recommended)
1
The CLI opens your browser
A page on the GeoGen dashboard asks you to authorize the CLI. If you’re not signed in, you’ll be prompted to sign in first.
2
Pick a workspace
The dashboard shows a workspace picker. The CLI will only get access to the workspace you select.
3
Click Authorize
A new API key is minted with a label like
CLI: <your-device> (2026-05-22) so you can identify and revoke it from Settings → API Keys later.4
Done
The dashboard hands the key back to the CLI through a temporary local listener (bound to
127.0.0.1 only). The CLI writes it to ~/.geogen/config.json and the browser shows ”✓ GeoGen CLI authorized”.Login flags
Examples
Credential resolution order
For any command (other thanlogin), the CLI resolves credentials in this order. The first match wins:
1
CLI flag
2
Environment variable
3
Config file
The key written by
geogen login, stored at ~/.geogen/config.json (chmod 600 on POSIX).Logout
Clears the stored credentials:Inspect resolved config
geogen config prints the effective configuration and where each value came from:
Config file format
~/.geogen/config.json is plain JSON:
Multiple workspaces
Eachgeogen login mints a new API key bound to whichever workspace you pick on the consent screen. To switch which workspace the CLI talks to, you have two options:
Security notes
The browser-based flow is designed so your API key never leaves your machine in plain text any longer than necessary:- The local HTTP listener binds to
127.0.0.1only (not exposed on your network). - The listener accepts callbacks from only the configured dashboard origin (CORS-locked).
- A cryptographically random
statetoken is exchanged through the URL. Any callback with the wrong state is rejected, defeating local-process impersonation. - The listener shuts down immediately after receiving the key, or after a 5-minute timeout.
~/.geogen/config.json (chmod 600). If that’s not acceptable for your environment, use GEOGEN_API_KEY env var injection from a secrets manager instead.

