Initial interactive mode
@Morishiri when you have the time it would be nice if you could let me know if everything looks OK like this; feature-wise I tested most things with the normal CLI, the interactive mode and the GUI and everything worked fine.
(couldn't request a review the normal way because you own this pull request)
Reviewing this again from the viewpoint of our current master branch, I notice that the closehandler is used in several places. On master we don't use that pkg at all anymore, so I'll have to investigate if everything is still compatible or if this branch needs to be converted to a new approach.
Everything works and I don't see any obvious flaws. I lack the experience for judging whether the way it works could lead to complications down the line, so let me know if this needs to be rewritten for that reason.