其他

lark-event

larksuite/cli

Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses.

  • 47万 次安装
  • 1.8万 星标
  • 收录于

安装命令

npx skills add https://github.com/larksuite/cli --skill lark-event

要点

Stream Lark/Feishu events as NDJSON with bounded runs and subprocess-safe exit contracts.

  • Consume real-time events (IM messages, reactions, chat changes, VC meetings, Minutes) via lark-cli event consume <EventKey>, with optional jq filtering and --max-events / --timeout bounds
  • Emits a stderr ready marker before stdout, supports stdin EOF for graceful shutdown, and reports exit reason (limit/timeout/signal/error) for reliable orchestration
  • One EventKey per process; use lark-cli event list and lark-cli event schema to discover keys and inspect output schemas before consuming
  • Requires lark-cli binary and Lark authentication configured via lark-shared skill; avoid kill -9 on processes with PreConsume hooks to prevent server-side subscription leaks

SKILL.md

Lark Events

Prerequisite: Read ../lark-shared/SKILL.md first for authentication, --as user/bot switching, Permission denied handling, and safety rules.

Core commands

Command Purpose
lark-cli event list [--json] List all subscribable EventKeys
lark-cli event schema <EventKey> [--json] Show an EventKey's params and output schema
lark-cli event consume <EventKey> [flags] Blocking consume; events → stdout NDJSON
lark-cli event status [--json] [--fail-on-orphan] Inspect the local bus daemon status
lark-cli event stop [--all] [--force] Stop the bus daemon

Common flags

Lark Events

Prerequisite: Read ../lark-shared/SKILL.md first for authentication, --as user/bot switching, Permission denied handling, and safety rules.

Core commands

Command Purpose
lark-cli event list [--json] List all subscribable EventKeys
lark-cli event schema <EventKey> [--json] Show an EventKey's params and output schema
lark-cli event consume <EventKey> [flags] Blocking consume; events → stdout NDJSON
lark-cli event status [--json] [--fail-on-orphan] Inspect the local bus daemon status
lark-cli event stop [--all] [--force] Stop the bus daemon

Common flags