Google account login

From Open-Curiosity/gini-agent · View interactive version

Google account login is an AI agent skill from the GitHub repository Open-Curiosity/gini-agent. Sign a Google account into its own gws config dir and register it (tagged). Used by google-workspace-setup; runs the OAuth login + records the account.

How to use this skill

Skill file

Google Account Login

Signs one Google account into its own gws config dir and registers it as a tagged account. One OAuth client (held by the google-workspace-oauth connector) can authorize many accounts — each lives in its own config dir selected via GOOGLE_WORKSPACE_CLI_CONFIG_DIR. This skill is the login step for that multi-account model.

This skill is normally invoked by google-workspace-setup, not called directly by users. Run it only after the google-workspace-oauth connector exists (so the client id/secret are injected into the script's env).

It ships one script, scripts/account-login.ts, invoked through skill_run:

skill_run {
  skill: "google-account-login",
  script: "account-login",
  args: { tag: "personal", services: ["drive","gmail","calendar","docs","sheets","meet","forms"] }
}

The script mints a gini-managed config dir under ~/.gini/google-accounts/<id>, runs gws auth login (it opens the user's browser to the Google consent screen and waits for them to finish), then confirms the session and registers the tagged account with the local gateway. The user's default browser pops automatically — sign-in is a human-in-the-loop step; never type the user's email or password. The consent URL always carries prompt=select_account, so Google shows the account chooser instead of silently auto-grabbing whatever account the browser is already signed into.

Arguments (stdin JSON)

Result (stdout JSON)

On success:

{ "ok": true, "id": "gacct_ab12cd34", "tag": "personal", "email": "me@example.com",
  "configDir": "/Users/me/.gini/google-accounts/gacct_ab12cd34",
  "scopes": ["https://www.googleapis.com/auth/gmail.modify", "..."] }

On failure: { "ok": false, "error": "<reason>" } (and a non-zero exit). Common reasons: "gws never printed the consent URL", "Login did not produce a valid session.", "No signed-in Google session in the default gws config dir to adopt.", or the gateway's register error.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.