Create a script that creates a unique filename (based on date and time probably) stops the hdmi stream, calls cmv_snap3 and captures a raw12 file onto camera micro SD card, restarts HDMI live stream.
It might make sense to also capture metadata in a sidecar file (linearization LUTs and FPN correction settings, darkframe + row/col values)