google-chat

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Chat

Google Chat

Lightweight Google Chat integration with standalone OAuth authentication. No MCP server required.
⚠️ Requires Google Workspace account. Personal Gmail accounts are not supported.
轻量级Google Chat集成,支持独立OAuth认证。无需MCP服务器。
⚠️ 需要Google Workspace账户。 不支持个人Gmail账户。

First-Time Setup

首次设置

Authenticate with Google (opens browser):
bash
python scripts/auth.py login
Check authentication status:
bash
python scripts/auth.py status
Logout when needed:
bash
python scripts/auth.py logout
通过Google进行身份验证(将打开浏览器):
bash
python scripts/auth.py login
检查身份验证状态:
bash
python scripts/auth.py status
需要时退出登录:
bash
python scripts/auth.py logout

Commands

命令

All operations via
scripts/chat.py
. Auto-authenticates on first use if not logged in.
bash
undefined
所有操作通过
scripts/chat.py
执行。如果未登录,首次使用时将自动进行身份验证。
bash
undefined

List all spaces you're a member of

列出你加入的所有空间

python scripts/chat.py list-spaces
python scripts/chat.py list-spaces

Find a space by name

通过名称查找空间

python scripts/chat.py find-space "Project Alpha"
python scripts/chat.py find-space "Project Alpha"

Get messages from a space

获取某个空间的消息

python scripts/chat.py get-messages spaces/AAAA123 --limit 10
python scripts/chat.py get-messages spaces/AAAA123 --limit 10

Send a message to a space

向某个空间发送消息

python scripts/chat.py send-message spaces/AAAA123 "Hello team!"
python scripts/chat.py send-message spaces/AAAA123 "Hello team!"

Send a message with file attachment

发送带文件附件的消息

python scripts/chat.py send-message spaces/AAAA123 "Here's the report" --attachment /path/to/file.pdf
python scripts/chat.py send-message spaces/AAAA123 "Here's the report" --attachment /path/to/file.pdf

Send a direct message

发送私信

python scripts/chat.py send-dm user@example.com "Hey, quick question..."
python scripts/chat.py send-dm user@example.com "Hey, quick question..."

Send a DM with file attachment

发送带文件附件的私信

python scripts/chat.py send-dm user@example.com "Please review" --attachment /path/to/file.pdf
python scripts/chat.py send-dm user@example.com "Please review" --attachment /path/to/file.pdf

Find or create DM space with someone

查找或创建与某人的私信空间

python scripts/chat.py find-dm user@example.com
python scripts/chat.py find-dm user@example.com

List threads in a space

列出某个空间中的线程

python scripts/chat.py list-threads spaces/AAAA123
python scripts/chat.py list-threads spaces/AAAA123

Create a new space with members

创建包含成员的新空间

python scripts/chat.py setup-space "New Project" user1@example.com user2@example.com
undefined
python scripts/chat.py setup-space "New Project" user1@example.com user2@example.com
undefined

Space Name Format

空间名称格式

Google Chat uses
spaces/AAAA123
format. Get space names from
list-spaces
or
find-space
.
Google Chat使用
spaces/AAAA123
格式。可通过
list-spaces
find-space
获取空间名称。

Token Management

令牌管理

Tokens stored securely using the system keyring:
  • macOS: Keychain
  • Windows: Windows Credential Locker
  • Linux: Secret Service API (GNOME Keyring, KDE Wallet, etc.)
Service name:
google-chat-skill-oauth
Automatically refreshes expired tokens using Google's cloud function.
令牌通过系统密钥环安全存储:
  • macOS:Keychain
  • Windows:Windows Credential Locker
  • Linux:Secret Service API(GNOME Keyring、KDE Wallet等)
服务名称:
google-chat-skill-oauth
通过Google云函数自动刷新过期令牌。