initial commit with code

this seems to work well enough. parsing colored text not supported, and
might never be. Otherwise seems to work ok. Code quality could be
improved though.