-
Notifications
You must be signed in to change notification settings - Fork 0
gws‐cli
Mambo edited this page May 19, 2026
·
11 revisions
brew install googleworkspace-cli
# https://docs.cloud.google.com/sdk/docs/downloads-homebrew?hl=ko
brew install gcloud-cli
🍺 gcloud-cli was successfully installed!❯ gcloud init
Welcome! This command will take you through the configuration of gcloud.
❯ gcloud auth list
Credentialed Accounts
ACTIVE ACCOUNT
* mambo@xxx.com
To set the active account, run:
$ gcloud config set account `ACCOUNT`
❯ gcloud config list
[core]
account = mambo@xxx.com
disable_usage_reporting = True
project = xxx❯ gws auth setup
Run `gws auth login` now? [Y/n]: y
{
"account": "mambo@xxx.com",
"apis_enabled": 0,
"apis_failed": [],
"apis_skipped": 0,
"client_config": "/Users/mambo/.config/gws/client_secret.json",
"message": "Setup complete! Starting `gws auth login`...",
"project": "xxx",
"status": "success"
}
✅ Setup complete! Starting `gws auth login`...
Open this URL in your browser to authenticate:
https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive%20https://www.googleapis.com/auth/spreadsheets%20https://www.googleapis.com/auth/gmail.modify%20https://www.googleapis.com/auth/calendar%20https://www.googleapis.com/auth/documents%20https://www.googleapis.com/auth/presentations%20https://www.googleapis.com/auth/tasks%20https://www.googleapis.com/auth/pubsub%20https://www.googleapis.com/auth/cloud-platform%20openid%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile&access_type=offline&redirect_uri=http://localhost:64644&response_type=code&client_id=xxx.apps.googleusercontent.com&prompt=select_account+consent
Using keyring backend: keyring
{
"account": "mambo@xxx.com",
"credentials_file": "/Users/mambo/.config/gws/credentials.enc",
"encryption": "AES-256-GCM (key in OS keyring or local `.encryption_key`; set GOOGLE_WORKSPACE_CLI_KEYRING_BACKEND=file for headless)",
"message": "Authentication successful. Encrypted credentials saved.",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/documents",
"https://www.googleapis.com/auth/presentations",
"https://www.googleapis.com/auth/tasks",
"https://www.googleapis.com/auth/pubsub",
"https://www.googleapis.com/auth/cloud-platform",
"openid",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"
],
"status": "success"
}gws auth login --scopes="https://www.googleapis.com/auth/contacts.other.readonly,https://www.googleapis.com/auth/directory.readonly,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.readonly"
Open this URL in your browser to authenticate:
https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/contacts.other.readonly%20https://www.googleapis.com/auth/directory.readonly%20https://www.googleapis.com/auth/drive%20https://www.googleapis.com/auth/spreadsheets%20https://www.googleapis.com/auth/chat.messages.create%20https://www.googleapis.com/auth/chat.spaces%20https://www.googleapis.com/auth/chat.spaces.readonly%20https://www.googleapis.com/auth/chat.messages%20https://www.googleapis.com/auth/chat.messages.readonly%20openid%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile&access_type=offline&redirect_uri=http://localhost:55017&response_type=code&client_id=xxx.apps.googleusercontent.com&prompt=select_account+consent
Using keyring backend: keyring
{
"account": "mambo@xxx.com",
"credentials_file": "/Users/mambo/.config/gws/credentials.enc",
"encryption": "AES-256-GCM (key in OS keyring or local `.encryption_key`; set GOOGLE_WORKSPACE_CLI_KEYRING_BACKEND=file for headless)",
"message": "Authentication successful. Encrypted credentials saved.",
"scopes": [
"https://www.googleapis.com/auth/contacts.other.readonly",
"https://www.googleapis.com/auth/directory.readonly",
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/chat.messages.create",
"https://www.googleapis.com/auth/chat.spaces",
"https://www.googleapis.com/auth/chat.spaces.readonly",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.readonly",
"openid",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"
],
"status": "success"
}