Does anyone know how to implement a command line type user interface using twine?

Like a parser?
It’s been done before. I’ve even done one for the SpringThing this year (source code). Also see Post-Mortem for other examples.
It is doable, but not really recommended. SugarCube (and Twine in general) wasn’t really built for parser/input games. You’ll need to create your own library of verbs/nouns and combo for interaction and everything that comes pre-packaged in parser programs. It’s honestly easier to do with Adventuron/Inform/TADS than Twine…

3 Likes