engram
What if: TUI apps could update themselves without losing open file handles?
Status: proven innovation, used in plx
Updating plx used to be really annoying: every pane lost its live agents. You can recover them, but it's never perfect.
engram started as the fix for that, and it grew verifiable release channels and other perks that any TUI or CLI app can embed.
The core idea is simple: have a rock-stable piece of bootstrap code that doesn't need
to be updated often. This is the enboot package: it stays resident and holds copies of
the file descriptors the program hands to it (pty masters, sockets). To update, the
program replaces itself with execve, which keeps its PID and its child processes,
and then takes its descriptors back from enboot.
This is the best hot-swapping I've ever had. It truly feels like magic.