gws-events-subscribe by googleworkspace/cli
npx skills add https://github.com/googleworkspace/cli --skill gws-events-subscribe前提条件: 阅读
../gws-shared/SKILL.md了解身份验证、全局标志和安全规则。如果该文件缺失,请运行gws generate-skills来创建它。
订阅 Workspace 事件并将其作为 NDJSON 流式输出
gws events +subscribe
| 标志 | 必需 | 默认值 | 描述 |
|---|---|---|---|
--target | — | — | Workspace 资源 URI(例如,//chat.googleapis.com/spaces/SPACE_ID) |
--event-types |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| — |
| — |
| 要订阅的 CloudEvents 类型,以逗号分隔 |
--project | — | — | 用于 Pub/Sub 资源的 GCP 项目 ID |
--subscription | — | — | 现有的 Pub/Sub 订阅名称(跳过设置) |
--max-messages | — | 10 | 每次拉取批次的最大消息数(默认:10) |
--poll-interval | — | 5 | 拉取间隔秒数(默认:5) |
--once | — | — | 拉取一次后退出 |
--cleanup | — | — | 退出时删除创建的 Pub/Sub 资源 |
--no-ack | — | — | 不自动确认消息 |
--output-dir | — | — | 将每个事件写入此目录下的单独 JSON 文件 |
gws events +subscribe --target '//chat.googleapis.com/spaces/SPACE' --event-types 'google.workspace.chat.message.v1.created' --project my-project
gws events +subscribe --subscription projects/p/subscriptions/my-sub --once
gws events +subscribe ... --cleanup --output-dir ./events
--cleanup,Pub/Sub 资源将保留以供重新连接。[!CAUTION] 这是一个 写入 命令 — 执行前请向用户确认。
每周安装量
6.7K
代码仓库
GitHub 星标数
23.2K
首次出现
2026年3月4日
安全审计
安装于
codex6.5K
opencode6.4K
gemini-cli6.4K
cursor6.4K
github-copilot6.4K
kimi-cli6.4K
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Subscribe to Workspace events and stream them as NDJSON
gws events +subscribe
| Flag | Required | Default | Description |
|---|---|---|---|
--target | — | — | Workspace resource URI (e.g., //chat.googleapis.com/spaces/SPACE_ID) |
--event-types | — | — | Comma-separated CloudEvents types to subscribe to |
--project | — | — | GCP project ID for Pub/Sub resources |
--subscription | — | — | Existing Pub/Sub subscription name (skip setup) |
--max-messages | — | 10 | Max messages per pull batch (default: 10) |
--poll-interval | — | 5 | Seconds between pulls (default: 5) |
--once | — | — | Pull once and exit |
--cleanup | — | — | Delete created Pub/Sub resources on exit |
--no-ack | — | — | Don't auto-acknowledge messages |
--output-dir | — | — | Write each event to a separate JSON file in this directory |
gws events +subscribe --target '//chat.googleapis.com/spaces/SPACE' --event-types 'google.workspace.chat.message.v1.created' --project my-project
gws events +subscribe --subscription projects/p/subscriptions/my-sub --once
gws events +subscribe ... --cleanup --output-dir ./events
[!CAUTION] This is a write command — confirm with the user before executing.
Weekly Installs
6.7K
Repository
GitHub Stars
23.2K
First Seen
Mar 4, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex6.5K
opencode6.4K
gemini-cli6.4K
cursor6.4K
github-copilot6.4K
kimi-cli6.4K
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
79,900 周安装