Hello, I don't know if a standalone console lyx2tex (maybe with lyx2lyx) is too farfetched...
I can imagine (myself, for instance) trying to convert a lyx document to latex, withouth having to install/execute a full-fledged LyX. Maybe stripping down all the display code is too much, but having the lexer should simplify the task... Cheers, Luis.