Show HN: NPM Scripts Deck – Run NPM scripts from Stream Deck with dynamic button
github.comI built a VSCode extension that auto-generates Stream Deck buttons from your package.json. Press to run, press again to cancel. Supports monorepos and multiple VSCode windows — buttons always follow the active file's context.
To make this work, I also built Stream Deck Integration, a framework that handles VSCode–Stream Deck communication. A notable aspect is its multi-instance coordination. VSCode has no way for multiple windows to talk to each other, so the framework uses a Leader/Follower pattern over WebSocket. The first instance becomes Leader, later ones connect as Followers. If the Leader closes, a Follower promotes itself with a randomized delay to avoid port conflicts.
The framework is extensible — if you want to build a provider for Docker, Git, or anything else, you only implement single-instance logic. Multi-instance coordination is handled by Stream Deck Integration.
No physical Stream Deck? You can try it with Elgato's free Virtual Stream Deck.
No comments yet.