gws-gmail-watch by googleworkspace/cli
npx skills add https://github.com/googleworkspace/cli --skill gws-gmail-watch前提条件: 请先阅读
../gws-shared/SKILL.md了解身份验证、全局标志和安全规则。如果该文件缺失,请运行gws generate-skills命令来创建它。
监控新邮件并将其以 NDJSON 格式流式输出
gws gmail +watch
| 标志 | 是否必需 | 默认值 | 描述 |
|---|---|---|---|
--project | — | — | 用于 Pub/Sub 资源的 GCP 项目 ID |
--subscription |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| — |
| — |
| 现有的 Pub/Sub 订阅名称(跳过设置步骤) |
--topic | — | — | 已授予 Gmail 推送权限的现有 Pub/Sub 主题 |
--label-ids | — | — | 用于过滤的 Gmail 标签 ID,以逗号分隔(例如:INBOX,UNREAD) |
--max-messages | — | 10 | 每次拉取批次的最大消息数 |
--poll-interval | — | 5 | 两次拉取之间的间隔秒数 |
--msg-format | — | full | Gmail 消息格式:full, metadata, minimal, raw |
--once | — | — | 拉取一次后退出 |
--cleanup | — | — | 退出时删除已创建的 Pub/Sub 资源 |
--output-dir | — | — | 将每条消息写入此目录下的单独 JSON 文件 |
gws gmail +watch --project my-gcp-project
gws gmail +watch --project my-project --label-ids INBOX --once
gws gmail +watch --subscription projects/p/subscriptions/my-sub
gws gmail +watch --project my-project --cleanup --output-dir ./emails
--cleanup 标志,Pub/Sub 资源将持久化以便重新连接。每周安装量
7.8K
代码仓库
GitHub 星标数
22.5K
首次出现
2026年3月4日
安全审计
安装于
codex7.6K
opencode7.6K
gemini-cli7.6K
github-copilot7.6K
cursor7.5K
amp7.5K
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Watch for new emails and stream them as NDJSON
gws gmail +watch
| Flag | Required | Default | Description |
|---|---|---|---|
--project | — | — | GCP project ID for Pub/Sub resources |
--subscription | — | — | Existing Pub/Sub subscription name (skip setup) |
--topic | — | — | Existing Pub/Sub topic with Gmail push permission already granted |
--label-ids | — | — | Comma-separated Gmail label IDs to filter (e.g., INBOX,UNREAD) |
--max-messages | — | 10 | Max messages per pull batch |
--poll-interval | — | 5 | Seconds between pulls |
--msg-format | — | full | Gmail message format: full, metadata, minimal, raw |
--once | — | — | Pull once and exit |
--cleanup | — | — | Delete created Pub/Sub resources on exit |
--output-dir | — | — | Write each message to a separate JSON file in this directory |
gws gmail +watch --project my-gcp-project
gws gmail +watch --project my-project --label-ids INBOX --once
gws gmail +watch --subscription projects/p/subscriptions/my-sub
gws gmail +watch --project my-project --cleanup --output-dir ./emails
Weekly Installs
7.8K
Repository
GitHub Stars
22.5K
First Seen
Mar 4, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex7.6K
opencode7.6K
gemini-cli7.6K
github-copilot7.6K
cursor7.5K
amp7.5K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装