Unfortunately nexpect seems to be incompatible with interactive cli programs that require user input, e.g. Yeoman. (sendline is not an option here, as I don't know what choices the user will make).
Could this possibly be implemented with Readline?
Also: somewhat relevant SO.