A simple facility for lua to control other programs via PTYs.
$ luarocks install lpty
This is a simple wrapper around unix PTYs. PTYs can be opened, lua controls the master side of the PTY. Programs can be started with the client side of those PTYs as their controlling terminals.