Problem
Right now, every extrasuite user must go through a separate auth setup step — either install and configure a gateway server, or manually supply a service account JSON file. This friction is a barrier for users who are already authenticated with popular Google Workspace CLI tools like gws or gogcli, and just want to try the pull/diff/push workflow.
Desired behavior
extrasuite should resolve credentials in this order, automatically:
-
ExtraSuite server — if configured (via EXTRASUITE_SERVER_URL, --gateway, or ~/.config/extrasuite/gateway.json), use it. This gives you named agent identity and a full audit trail. Recommended for team deployments.
-
Service account file — if SERVICE_ACCOUNT_PATH or --service-account is set, use the SA key directly.
-
gws — if the user has configured gws, extrasuite picks up those credentials and authenticates against Google directly. No extra setup required. Relevant environment variables/files: GOOGLE_WORKSPACE_CLI_TOKEN, GOOGLE_WORKSPACE_CLI_CLIENT_ID + GOOGLE_WORKSPACE_CLI_CLIENT_SECRET, GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE, ~/.config/gws/client_secret.json.
-
gogcli — same idea for gogcli users. Relevant config: GOG_ACCESS_TOKEN, ~/.config/gogcli/credentials.json (platform-specific path).
-
Fail with a clear error message listing what to configure.
What "works automatically" means
- If a pre-obtained access token is available (
GOOGLE_WORKSPACE_CLI_TOKEN / GOG_ACCESS_TOKEN), use it immediately — no browser needed.
- If OAuth client credentials are found (client ID + secret from gws or gogcli config), extrasuite performs a one-time OAuth browser flow using those credentials, stores the resulting refresh token in its own secure keyring entry, and silently refreshes it on every subsequent run. The user sees a standard Google consent screen the first time only.
Trade-offs vs. the gateway
In gws/gogcli mode, operations happen under the user's own Google identity (the same account they used when setting up gws/gogcli). File edits in Google Drive will show as made by that person, not a named agent. For personal use and experimentation this is fine. Teams who want a distinct agent identity and strong audit trail should still configure the gateway server.
Scope of this issue
- Layered credential resolution in
CredentialsManager
- Reading gws and gogcli credential files from their documented, public config locations
- One-time OAuth dance using the discovered client credentials, with refresh token stored in extrasuite's own keyring
- Clear, actionable error messages when no auth method is found, including hints about what to configure
Problem
Right now, every extrasuite user must go through a separate auth setup step — either install and configure a gateway server, or manually supply a service account JSON file. This friction is a barrier for users who are already authenticated with popular Google Workspace CLI tools like gws or gogcli, and just want to try the pull/diff/push workflow.
Desired behavior
extrasuite should resolve credentials in this order, automatically:
ExtraSuite server — if configured (via
EXTRASUITE_SERVER_URL,--gateway, or~/.config/extrasuite/gateway.json), use it. This gives you named agent identity and a full audit trail. Recommended for team deployments.Service account file — if
SERVICE_ACCOUNT_PATHor--service-accountis set, use the SA key directly.gws — if the user has configured gws, extrasuite picks up those credentials and authenticates against Google directly. No extra setup required. Relevant environment variables/files:
GOOGLE_WORKSPACE_CLI_TOKEN,GOOGLE_WORKSPACE_CLI_CLIENT_ID+GOOGLE_WORKSPACE_CLI_CLIENT_SECRET,GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE,~/.config/gws/client_secret.json.gogcli — same idea for gogcli users. Relevant config:
GOG_ACCESS_TOKEN,~/.config/gogcli/credentials.json(platform-specific path).Fail with a clear error message listing what to configure.
What "works automatically" means
GOOGLE_WORKSPACE_CLI_TOKEN/GOG_ACCESS_TOKEN), use it immediately — no browser needed.Trade-offs vs. the gateway
In gws/gogcli mode, operations happen under the user's own Google identity (the same account they used when setting up gws/gogcli). File edits in Google Drive will show as made by that person, not a named agent. For personal use and experimentation this is fine. Teams who want a distinct agent identity and strong audit trail should still configure the gateway server.
Scope of this issue
CredentialsManager