-
Notifications
You must be signed in to change notification settings - Fork 675
Description
Use Case
I manage multiple Google Workspace accounts from the same machine:
- Work email (org domain)
- Personal Gmail
- Client/project-specific accounts
With gws, I can only authenticate one account at a time. In practice, I need to hit different APIs with different accounts in the same workflow — e.g., read email from work account, update a sheet owned by a personal account, check calendar on a client domain.
Current Workaround
Manually swapping GOOGLE_WORKSPACE_CLI_CONFIG_DIR or GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE env vars per command, which is fragile and breaks automation.
Proposed Solution
Support named profiles/accounts, similar to how aws configure --profile or gcloud config configurations work:
# Login with named accounts
gws auth login --account work
gws auth login --account personal
# Use per-command
gws gmail users messages list --account work --params '{"userId": "me"}'
gws sheets spreadsheets get --account personal --params '{"spreadsheetId": "..."}'
# Or set a default
gws auth default workWhy This Matters
For AI agent workflows especially, the agent often needs to operate across accounts (e.g., read from one Google Sheet owned by account A, send an email via account B). A first-class multi-account model would make gws viable as the single Google CLI for power users and agent systems.
Great project — excited to see this evolve!