Terminal UI helpers extracted from python click