An early draft of an expect lib in D. http:// code.dl ang.org/ packages/ dexpect It includes a sample (and naive) binary implementation that can read simple expect script files at run time. I'll be using this in work for automating the testing of a CLI we're developing that has to run cross platform. There was no easy solution I could find online to do it, so I rolled my own. There's lots of improvements to be made to this, most notably unit testing and a proper script parser to control it. Will be working on those in the near future.