From google-workspace
Configure and use the Google Workspace CLI (gws) for cross-product workflows — standup reports, meeting prep, weekly digests, and email-to-task pipelines across Gmail, Drive, Sheets, Docs, Calendar, and Chat.
npx claudepluginhub leolionart/claude-skills --plugin google-workspaceThis skill uses the workspace's default tool permissions.
`gws` là CLI thống nhất cho toàn bộ Google Workspace. Dùng skill này khi:
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
gws là CLI thống nhất cho toàn bộ Google Workspace. Dùng skill này khi:
Với các tác vụ đơn sản phẩm (Gmail, Drive, Sheets), dùng skill chuyên biệt: google-gmail, google-drive, google-sheets.
# npm (yêu cầu Node.js 18+)
npm install -g @googleworkspace/cli
# Homebrew
brew install googleworkspace-cli
# Kiểm tra cài đặt
gws --version
gws auth logingws auth setup # Nhập Client ID + Secret
gws auth login # Mở browser, chọn Google account
gws auth export # Xuất credentials để backup
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/service-account.json
gws drive files list # Test ngay
| Biến | Mục đích |
|---|---|
GOOGLE_WORKSPACE_CLI_TOKEN | Access token trực tiếp |
GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE | Đường dẫn credentials JSON |
GOOGLE_WORKSPACE_CLI_CLIENT_ID | OAuth Client ID |
GOOGLE_WORKSPACE_CLI_CLIENT_SECRET | OAuth Client Secret |
GOOGLE_WORKSPACE_CLI_CONFIG_DIR | Thư mục config (mặc định ~/.config/gws) |
GOOGLE_WORKSPACE_CLI_LOG | Log level (debug, info, warn, error) |
GOOGLE_WORKSPACE_CLI_PROJECT_ID | GCP Project ID |
# Tổng hợp email + calendar + tasks cho báo cáo standup hàng ngày
gws workflow +standup-report
# Tổng hợp agenda, tài liệu liên quan, lịch họp
gws workflow +meeting-prep
# Tóm tắt tuần: email quan trọng, files mới, events đã tham gia
gws workflow +weekly-digest
# Chuyển email thành task (kết hợp Gmail + Tasks/Chat)
gws workflow +email-to-task
# Thông báo file mới vào Google Chat space
gws workflow +file-announce
# Xem request/response schema của bất kỳ API method nào
gws schema drive.files.list
gws schema gmail.users.messages.send
gws schema sheets.spreadsheets.values.get
gws schema calendar.events.insert
# Xem request sẽ được gửi mà không thực thi
gws gmail +send --to test@example.com --subject "Test" --body "Hello" --dry-run
# Bật debug log
GOOGLE_WORKSPACE_CLI_LOG=debug gws drive files list
# Pagination toàn bộ kết quả
gws drive files list --params '{"pageSize": 100}' --page-all
| Code | Ý nghĩa |
|---|---|
0 | Thành công |
1 | API error |
2 | Auth error — kiểm tra credentials |
3 | Validation error — sai params |
4 | Discovery error — không lấy được API schema |
5 | Internal error |
GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE hoặc chạy lại gws auth login~/.config/gws/discovery-cache/ rồi thử lại~/.config/gws/.encryption_keyreferences/setup.md — Hướng dẫn cấp quyền OAuth chi tiết + lỗi thường gặp