Use rich
Drop the custom progress bar.
Can potentially show logs in pager, etc.
I think having an option to enable verbose & pretty output on a per-operation/fact level would be a nice feature.
I created a little FactBase mixin for logging output in a Rich way.
I find it super useful for one-off fact runs as eye-balling some text/object in Pyinfra's output was hard and error-prone, especially for facts returning multiple lines/items.
Optionally it will display a syntax highlighted code block with information relevant to gathering the fact – e.g. an SQL query behind a fact or lines matched with FindInFile.
See some examples:
And for highlighting stdout from vital operations:
Would be happy to help on this if there's interest in having something like this.
This is part of our collection of operations/facts/tasks for installing, configuring and managing Oracle Databases. Was thinking of open sourcing it once it's battle tested enough.