Amberletters is a console automation framework, similar to the classic utility Expect. You give it a command to execute, and tell it which outputs or events to expect and how to respond to them.