Pretty output with rich
textualize/rich is a modern library for formatting shell output that we recommend using with jeeves
.
Installation
It will be installed as a dependency of jeeves-shell
.
Rich example
jeeves.py
import rich
def hi(name: str):
"""Greet the user."""
rich.print(f'Hello [red]{name}[/red]!')
⇒
↦
j hi John
Hello John!
(Well, this output does not actually convey the effect because rich
outputs shell markup that's ignored when converting to HTML… Just trust me — it will be red in the terminal, I assure you!)