Skip to content

Conversation

@fischeti
Copy link
Contributor

@fischeti fischeti commented Jan 1, 2026

CLI Progress bars

Adds progress bars to bender actions that require longer network access. A taste is shown below*

bender

*some style changes have been done since this recording.

Implementation

The progress bars are rendered with the crate indicatif, that allows rendering of multiple progress bars at once. The state of the progress bars is extracted from the stderr output of the spawned git commands i.e. a separate task is spawned alongside git tasks to parse git output lines and update the progress bar state. I initially thought about adopting the git2 crate, which would have built in progress callbacks. However, this would have been a larger change and also poses some challenges since those git tasks are not asynchronous and also credential handling would be more complicated, which is why I opted for stderr parsing in the end.

Related Changes

todo

TODOs

  • Check output in log files (e.g. CI). In theory, this should work outside of the box.
  • Check more bender commands. I focused mostly on checkout, but others use the same underlying functions so there should not be an issue in theory.

@fischeti fischeti force-pushed the fischeti/progress-bar branch from 16b915a to 8b6b44e Compare January 2, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants