How latent-spaces/cled works
CLED is an ambient keyboard status daemon: it samples agent-tab state and machine load, maps them to key colors, and continually sends frames to an OpenRGB-controlled keyboard. The main runtime starts the tab monitor and owns the render loop; provider-specific logic distinguishes Claude and Codex sessions. The README also documents a Claude Code plugin launcher. Unsampled plugin implementation is represented only at its existing directory path; external state sources and services are shown where documented, without inferring internal calls beyond the excerpts.
Main entry points: agent_tabs.py Tab Monitor · cled.py Daemon Runtime · cled Plugin Launcher · rgb.py RGB Session
Components 17
Agent State
- Tab Monitor
src/cled/agent_tabs.py - Tab Detection
src/cled/agent_tabs.py - Claude Status
src/cled/agent_tabs.py - Codex Status
src/cled/agent_tabs.py
Daemon
- Plugin Launcher
plugin/skills/cled - Daemon Runtime
src/cled/cled.py
Rendering
- Frame Composer
src/cled/cled.py - RGB Mapping
src/cled/rgb.py
Keyboard Output
- RGB Session
src/cled/rgb.py
Other components
- Terminal User
- Claude Code User
- iTerm2 / macOS
- Claude Session Files
- Codex State
- System Metrics
- OpenRGB Server
- RGB Keyboard
Connections 17
- Terminal User → Daemon Runtime: starts
README.md - Claude Code User → Plugin Launcher: invokes
README.md - Plugin Launcher → Daemon Runtime: launches
README.md - Daemon Runtime → Tab Monitor: starts
src/cled/cled.py - Tab Monitor → Tab Detection: polls tabs
src/cled/agent_tabs.py - Tab Monitor → Claude Status: checks status
src/cled/agent_tabs.py - Tab Monitor → Codex Status: checks status
src/cled/agent_tabs.py - Tab Detection → iTerm2 / macOS: queries tabs
src/cled/agent_tabs.py - Claude Status → Claude Session Files: reads session
src/cled/agent_tabs.py - Codex Status → Codex State: resolves rollouts
src/cled/agent_tabs.py - Daemon Runtime → Frame Composer: runs renderer
src/cled/cled.py - Frame Composer → Tab Monitor: reads slots
src/cled/cled.py - Frame Composer → System Metrics: samples CPU/RAM
src/cled/cled.py - Frame Composer → RGB Mapping: builds frame
src/cled/cled.py - Daemon Runtime → RGB Session: runs render loop
src/cled/cled.py - RGB Session → OpenRGB Server: sets LED colors
README.md - OpenRGB Server → RGB Keyboard: controls
README.md