Stream Deck Integration for a Command Center #294
egns-ai
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
|
This is impressive, especially since Clay doesn't actually expose a public WebSocket API yet. The fact that you built this on top of the internal communication layer shows real dedication. If you're open to sharing the code, I'd love to take a look. Seeing how you approached this could help us think about what a platform API could look like. I'm also planning to add a community projects section to the README. Would love to feature this there. Also, buying a mini PC just to run Clay made my day. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!
First, I want to say thanks to @chadbyte for making and maintaining this repo. I bought a mini PC solely to run Clay and connect from anywhere using Tailscale with MagicDNS. It's very convenient. I can work and debug from wherever I am, even when I'm away from my main computer. I do miss the Claude CLI, but I don't miss the overhead of initializing everything every morning and restarting my laptop just to clear old sessions before gaming.
Since everything is managed by WebSockets, I had an idea to use external buttons to manage sessions and surface notifications. I was originally going to connect an ESP32 with an external LCD display, but then I remembered I had an old Stream Deck lying around.
I went down the rabbit hole and built this out, though it could easily be adapted to macro keys if you prefer.
This works with a phone, iPad, or even a virtual device on your screen through the Stream Deck app. The free trial will eventually run out and cost $25/year, but for now I'm using it on both my phone and iPad simultaneously.
If there's interest, I'm happy to share the code, though right now it's tailored to my own workflow. In a perfect world, you just select a project/session and choose to voice type. Getting pretty close to Jarvis
What it does:
The Stream Deck plugin connects to Clay's WebSocket API and turns physical buttons into a live dashboard for managing all your projects, worktrees, and sessions at a glance. It supports multiple Stream Deck devices simultaneously — a small one as a "hub" showing an overview, and a larger one for detailed session management.
Hub device (small Stream Deck):
Detail device (large Stream Deck):
How it works:
It's a standard Elgato Stream Deck plugin (SDK v3) with a single action UUID placed on every key. The plugin renders dynamic SVG images (144x144px) for each button and handles all layout logic internally — no static icons.
The architecture is layered:
/info, then opens a WebSocket per project slug for real-time events (projects_updated,session_list,permission_request_pending,resultfor usage tracking,rate_limit)WorktreeOverviewLayout(flat grid with widget slots), the detail device getsSessionGridLayout(row-per-worktree). Layouts compute aButtonDeffor each grid positionDeviceRendererper device with independent caching and pulse animation timers. Only re-renders buttons whoseButtonDefactually changed. Pulsing buttons (processing, permissions) animate on a 500ms intervalCross-device communication is handled in the action's button press handler — pressing a project on the hub navigates the detail device to that worktree's row and focuses the browser window.
The whole thing bundles to a single ESM file via Rollup, lives inside the
com.clay.streamdeck.sdPlugin/package, and deploys by tarring it up on Linux (on my clay server) and pulling it down on the Windows machine (my main machine) running Stream Deck.Beta Was this translation helpful? Give feedback.
All reactions