# claude-code-event-listeners **Repository Path**: cgq/claude-code-event-listeners ## Basic Information - **Project Name**: claude-code-event-listeners - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-16 - **Last Updated**: 2026-06-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # claude-code-event-listeners Event-driven background task listeners for [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Replace polling with real event notifications. ![Demo](marketing/demo.gif) ## The Problem Claude Code uses a request-response model. When waiting for CI, log output, webhooks, or file changes, the typical approach is **polling**: sleep, check, repeat. This burns turns, wastes tokens, and feels janky. ## The Insight Claude Code's background task mechanism (`run_in_background: true`) provides genuine event-driven behavior: 1. A **background task** runs a blocking command that waits for an event 2. While waiting, **Claude does nothing** — no turns burned, no tokens spent 3. When the event occurs, the command exits and **Claude gets a ``** 4. Claude reads the output, reacts, and optionally re-subscribes This isn't polling dressed up. The OS does the blocking. Claude only wakes up when something actually happens. ``` ┌──────────────────────────┐ │ Background Task │ │ (event source script) │ │ │ Event source ───► │ Blocks until event ───► │ ──► Task completes (log, webhook, │ Outputs event data │ ↓ CI, file, ...) │ Exits cleanly │ Claude gets notified └──────────────────────────┘ reads output, reacts, starts new listener ``` ## Install ```bash # From the marketplace claude plugin marketplace add mividtim/claude-code-event-listeners claude plugin install el # Or load directly for a single session claude --plugin-dir /path/to/claude-code-event-listeners ``` ## Slash Commands ### Event Sources | Command | What it does | |---------|-------------| | `/el:log-tail [timeout] [max_lines]` | Tail a log file, return chunks of output | | `/el:webhook [port]` | One-shot HTTP server on localhost | | `/el:webhook-public [port] [name] [subdomain]` | One-shot HTTP server with ngrok tunnel (stable vanity URL with subdomain) | | `/el:ci-watch ` | Watch a GitHub Actions run until completion | | `/el:pr-checks ` | Watch all PR checks until they resolve | | `/el:file-change [--root dir] ...` | Watch file(s) for modifications (supports globs) | | `/el:context-sync [project-root]` | Watch CLAUDE.md and .claude/ docs for cross-session sync | | `/el:poll ` | Poll a command, fire when output changes | | `/el:listen ` | Run any blocking command as an event source | ### Management | Command | What it does | |---------|-------------| | `/el:list` | Show all available sources (built-in + user) | | `/el:register