You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey team — wanted to share a clean Windows workaround I built for triggering local commands/scripts from Hex without fighting the hex.config.ts sandbox.
Instead of running processes inside QuickJS, a lightweight background Python watcher (watcher.pyw) tails %APPDATA%\hex\history.json (timestamp_ms + raw_text) and matches spoken phrases against an external commands.json registry to launch local executables. (Note: since this watches history.json externally rather than intercepting inside hex.config.ts, Hex will still paste the spoken text if a text-accepting window is focused—so it works best when dictating from the desktop/taskbar or with no text field focused.)
Why this works well on Windows
Zero changes to Hex — no hex.config.ts sandbox friction or permission prompts.
Resilient to deleted history entries — tracks timestamp_ms rather than assuming contiguous id sequences.
Dynamic hot-reloading — adding new commands or script triggers to commands.json takes effect immediately without restarting Hex or the watcher.
Change the the watcher.py to watcher.pyw if you dont want the terminal open, but with terminal open you do get to see the script work and catch the commands and everything. watcher.py
Thanks for the breakdown on how hex.config.ts transforms and execFile work in 3.0—that's really helpful context, especially knowing hex history --json is the stable interface going forward. Tailing history.json was just a simple starting point for me, so if that format changes, swapping the input over to hex history --json or whatever else is easy enough.
Being honest, TypeScript isn't really my specialty compared to Python and JSON—and keeping the command router external in Python + JSON is actually intentional for my workflow. The projects I work on range anywhere from game mods to full-blown custom programs, so having a flexible external setup fits best:
Cross-OS & tool-agnostic: Python and a plain JSON config run identically across Windows, Linux, and macOS without tying my command logic to TypeScript or a single app's internal runtime.
Live debugging & hot-swapping: Running watcher.py in a terminal gives me instant stdout/debugging feedback while I test triggers, and editing commands.json on the fly lets me wire up new actions without touching Hex config files.
What I'm launching most: Mostly local automation scripts, OBS/streaming controls (clips, scene switches, overlays), custom program hooks, and external game/mod bridges (like sending local triggers or RCON/IPC actions while gaming without alt-tabbing).
As far as design direction goes: a transform works well for power users who want to suppress text pasting, while native phrase-to-command mapping (backed by a simple JSON registry or CLI hook) would make it super accessible for gamers, streamers, and anyone relying on voice controls for accessibility without needing to write TypeScript. Happy to help test or share more feedback as you guys explore it!
Just wanted to follow up with a working pattern I put together on Windows in case it’s helpful for folks who aren't comfortable writing TypeScript—while keeping your transforms.ts flow completely untouched for power users.
How the Flow Works
Hex → Clipboard Only: Hex transcribes and copies to the clipboard without firing a paste event.
Python Gatekeeper (watcher.py): A lightweight Python script monitors clipboard updates and checks the text against a simple commands.json file:
If it matches a command: It clears the clipboard immediately and launches the mapped app/script—nothing ever leaks into an active window or game chat.
If it’s normal dictation: It triggers a native OS paste (Ctrl+V) so standard voice-to-text drops right wherever your cursor is.
Why This Works Well Alongside 3.0
Two Tiers for Different Skill Levels: Devs and power users keep the full synchronous control of transforms.ts, while everyday users, gamers, or admins get a zero-compile Python + JSON setup they can tweak in seconds.
Cross-OS Potential: On Windows, I replicated your native SendInput scan-code paste via built-in ctypes so games and terminals accept it reliably. The exact same Python/JSON pattern could easily map to CGEvent/osascript on macOS and xdotool/ydotool on Linux so all three platforms get parity without forcing everyone into a JS/TS runtime.
Happy to share the working Windows snippet if you guys ever want to look at it or adapt the paste layer for Linux and Mac!
Activity
thdxr commentedon Nov 13, 2026
you can do this inside hex instead, with nothing pasted.
hex.config.tsonly holds transformations nowexecFilefromnode:child_process, and return an empty string so nothing pastesexecFile, never build a shell command from dictated textthe history file format isn't promised and may change.
hex history --jsonis the stable output for outside tools.would a transform cover what you need, or do you want hex to recognize phrases itself, and what do you launch most?
— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
GhostDragon420 commentedon Nov 13, 2026
Thanks for the breakdown on how
hex.config.tstransforms andexecFilework in 3.0—that's really helpful context, especially knowinghex history --jsonis the stable interface going forward. Tailinghistory.jsonwas just a simple starting point for me, so if that format changes, swapping the input over tohex history --jsonor whatever else is easy enough.Being honest, TypeScript isn't really my specialty compared to Python and JSON—and keeping the command router external in Python + JSON is actually intentional for my workflow. The projects I work on range anywhere from game mods to full-blown custom programs, so having a flexible external setup fits best:
watcher.pyin a terminal gives me instant stdout/debugging feedback while I test triggers, and editingcommands.jsonon the fly lets me wire up new actions without touching Hex config files.As far as design direction goes: a transform works well for power users who want to suppress text pasting, while native phrase-to-command mapping (backed by a simple JSON registry or CLI hook) would make it super accessible for gamers, streamers, and anyone relying on voice controls for accessibility without needing to write TypeScript. Happy to help test or share more feedback as you guys explore it!
GhostDragon420 commentedon Nov 13, 2026
Just wanted to follow up with a working pattern I put together on Windows in case it’s helpful for folks who aren't comfortable writing TypeScript—while keeping your transforms.ts flow completely untouched for power users.
How the Flow Works
Why This Works Well Alongside 3.0
Happy to share the working Windows snippet if you guys ever want to look at it or adapt the paste layer for Linux and Mac!