Library for writing text-based user interfaces