Nice work! I maintain a library, cpp-readline [1], with a very similar API. The main difference is that relegates the REPL part to GNU readline. You do have the additional dependency, but on the other hand it automatically adds history and other nice-to-have features.
[1]: https://github.com/Svalorzen/cpp-readline