The CLI authenticates with the same workspace API keys as theDocumentation Index
Fetch the complete documentation index at: https://docs.geogen.io/llms.txt
Use this file to discover all available pages before exploring further.
/v1 REST API. The fastest way to get set up is the browser-based login flow. No copy-pasting keys.
Browser-based login (recommended)
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.
Pick a workspace
The dashboard shows a workspace picker. The CLI will only get access to the workspace you select.
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.Login flags
| Flag | Description |
|---|---|
--api-key <key> | Skip the browser flow and store this key directly (for scripts, CI, or when you already have a key). |
--device <name> | Override the device label used in the new key’s name. Defaults to your machine’s hostname. |
--no-browser | Start the local listener and print the auth URL, but don’t try to open a browser. Useful over SSH or in containers. Copy the URL to a browser on another machine. |
--base-url <url> | Override the API base URL (default: https://api.geogen.io). |
--dashboard-url <url> | Override the dashboard URL used for the consent page. By default it’s derived from --base-url: api.geogen.io → app.geogen.io. |
Examples
Credential resolution order
For any command (other thanlogin), the CLI resolves credentials in this order. The first match wins:
CLI flag
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.
Errors
| Symptom | Likely cause |
|---|---|
Login timed out after 300s. | Browser flow didn’t complete within 5 minutes. Re-run geogen login. |
Could not reach the CLI listener on your machine. | The browser tab is using a stale port and the CLI process already exited. Re-run geogen login. |
Callback state mismatch: refusing key. | Another process tried to send a key to the listener. Very unusual; re-run geogen login. |
Only workspace owners and admins can create API keys | The dashboard requires owner/admin role to mint API keys. Ask a workspace owner. |
Maximum of 5 API keys allowed per workspace. | Delete stale CLI: ... keys in Settings → API Keys, then retry. |
No API key found. | None of the three credential sources resolved a key. Run geogen login. |
Invalid API key format / HTTP 401 | Key was rejected by the server. Try geogen login again. |

