Auth
geni login
Sign the CLI in to your General Input account through a browser device-code flow.
geni login [flags]Prints (and tries to open) a one-time approval URL. You approve in the browser and pick a workspace; the CLI saves a runner-session token to ~/.config/geni/runner-session.json. Every later geni command runs as your account, against the active workspace.
Output
· Opening https://web.generalinput.com/cli/login?code=A4B2-9F1C
· Approve in your browser to continue.
✓ Authenticated as jack@generalinput.com
✓ Active workspace: acme (Acme Inc.)
· Session saved to ~/.config/geni/runner-session.jsonFlags
| Flag | Notes |
|---|---|
--server <url> | API base URL for this login. Precedence: this flag, then $GENI_API_URL, then apiUrl from geni config, then the default cloud URL. Whichever wins is locked into the session file. |
--workspace <slug> | After approval, re-bind the session to this workspace instead of the one the browser picker chose. For CI and scripted setups. |
The session is bound to its server
The token is minted against one API URL and stored with it, so pointing the CLI at a different server means logging out and back in:
geni logout
geni login --server http://localhost:4111geni config set apiUrl refuses to change the URL while a session is bound to a different one, for the same reason.
Failure modes
| Exit | Meaning |
|---|---|
5 | The login was declined in the browser. Run geni login again and approve. |
1 | The device code expired (codes live about ten minutes), or a parallel login consumed it. |
4 | --workspace named a slug the account does not belong to. The message lists the real ones. |
Switch the active workspace later with geni workspace switch.