ShellProgressBar 5.2.0

.NET Standard 1.3 .NET Framework 4.6.1
NuGet\Install-Package ShellProgressBar -Version 5.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package ShellProgressBar --version 5.2.0
<PackageReference Include="ShellProgressBar" Version="5.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ShellProgressBar --version 5.2.0
#r "nuget: ShellProgressBar, 5.2.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install ShellProgressBar as a Cake Addin
#addin nuget:?package=ShellProgressBar&version=5.2.0

// Install ShellProgressBar as a Cake Tool
#tool nuget:?package=ShellProgressBar&version=5.2.0


visualize (concurrent) progress in your console application

This is a great little library to visualize long running command line tasks.

.NET Core ready!

It also supports spawning child progress bars which allows you to visualize dependencies and concurrency rather nicely.

Tested on OSX

example osx

and Windows

example win cmd

(Powershell works too, see example further down)


Get it on nuget:


Usage is really straightforward

const int totalTicks = 10;
var options = new ProgressBarOptions
    ProgressCharacter = '─',
    ProgressBarOnBottom = true
using (var pbar = new ProgressBar(totalTicks, "Initial message", options))
    pbar.Tick(); //will advance pbar to 1 out of 10.
    //we can also advance and update the progressbar text
    pbar.Tick("Step 2 of 10"); 

Reporting progression

There are two ways to report progression. You can use the Tick() function as described above. Alternatively you can report progression through an IProgress<T> instance that you obtain by calling AsProgress<T>() on the progress bar object.

For a simple case where the progress type is a float value between 0.0 and 1.0 that represents the completion percentage, use progressBar.AsProgress<float>():

using ProgressBar progressBar = new ProgressBar(10000, "My Progress Message");
IProgress progress = progressBar.AsProgress<float>();
progress.Report(0.25); // Advances the progress bar to 25%

See IntegrationWithIProgressExample.cs and IntegrationWithIProgressPercentageExample.cs in the src/ShellProgressBar.Example/Examples directory for full examples.


Progress bar position

const int totalTicks = 10;
var options = new ProgressBarOptions
	ProgressCharacter = '─',
	ProgressBarOnBottom = true
using (var pbar = new ProgressBar(totalTicks, "progress bar is on the bottom now", options))
	TickToCompletion(pbar, totalTicks, sleep: 500);

By default the progress bar is at the top and the message at the bottom. This can be flipped around if so desired.


Styling changes

const int totalTicks = 10;
var options = new ProgressBarOptions
	ForegroundColor = ConsoleColor.Yellow,
	ForegroundColorDone = ConsoleColor.DarkGreen,
	BackgroundColor = ConsoleColor.DarkGray,
	BackgroundCharacter = '\u2593'
using (var pbar = new ProgressBar(totalTicks, "showing off styling", options))
	TickToCompletion(pbar, totalTicks, sleep: 500);

Many aspects can be styled including foreground color, background (inactive portion) and changing the color on completion.


No real time update

By default a timer will draw the screen every 500ms. You can configure the progressbar to only be drawn when .Tick() is called.

const int totalTicks = 5;
var options = new ProgressBarOptions
	DisplayTimeInRealTime = false
using (var pbar = new ProgressBar(totalTicks, "only draw progress on tick", options))
	TickToCompletion(pbar, totalTicks, sleep:1750);

If you look at the time passed you will see it skips 02:00


Descendant progressbars

A progressbar can spawn child progress bars and each child can spawn its own progressbars. Each child can have its own styling options.

This is great to visualize concurrent running tasks.

const int totalTicks = 10;
var options = new ProgressBarOptions
	ForegroundColor = ConsoleColor.Yellow,
	BackgroundColor = ConsoleColor.DarkYellow,
	ProgressCharacter = '─'
var childOptions = new ProgressBarOptions
	ForegroundColor = ConsoleColor.Green,
	BackgroundColor = ConsoleColor.DarkGreen,
	ProgressCharacter = '─'
using (var pbar = new ProgressBar(totalTicks, "main progressbar", options))
	TickToCompletion(pbar, totalTicks, sleep: 10, childAction: () =>
		using (var child = pbar.Spawn(totalTicks, "child actions", childOptions))
			TickToCompletion(child, totalTicks, sleep: 100);


By default children will collapse when done, making room for new/concurrent progressbars.

You can keep them around by specifying CollapseWhenFinished = false

var childOptions = new ProgressBarOptions
	ForegroundColor = ConsoleColor.Green,
	BackgroundColor = ConsoleColor.DarkGreen,
	ProgressCharacter = '─',
	CollapseWhenFinished = false



ProgressBar is great for visualizing tasks with an unknown runtime. If you have a task that you know takes a fixed amount of time there is also a FixedDurationBar subclass. FixedDurationBar will Tick() automatically but other then that all the options and usage are the same. Except it relies on the real time update feature so disabling that will throw.

FixedDurationBar exposes an IsCompleted and CompletedHandle


The initial implementation was inspired by this article.

And obviously anyone who sends a PR to this repository 👍

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1
.NET Framework net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen30 tizen40 tizen60
Universal Windows Platform uap uap10.0
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (9)

Showing the top 5 NuGet packages that depend on ShellProgressBar:

Package Downloads

This is a .NET Framework enhancement framework. Main features are Versioning, Finance, Currency, Foreign Exchange, Money, Pricing strategy, Telemetry, Composite Weighted Progress, Repository and Unity of Wok pattern implementation with Entity Framework Core, Network Connectivity Service and Triggering, Settings, Windows Registry configuration source, Azure Storage Repository, MongoDB Repository, NoDB Repository, Lingual and Regional Localization, Serialization, Rest Requester, Rest Repository, Dependency Injection, Composition Root Setup base classes.

Microsoft.CST.ApplicationInspector.Commands The ID prefix of this package has been reserved for one of the owners of this package by

Microsoft Application Inspector is a software source code analysis tool that helps identify and surface well-known features and other interesting characteristics of source code to aid in determining what the software is or what it does.


Package Description


All stryker mutation test logic is contained in this library. This package does not include a runner. Use this package if you want to extend stryker with your own runner.


Package Description

GitHub repositories (8)

Showing the top 5 popular GitHub repositories that depend on ShellProgressBar:

Repository Stars
A source code analyzer built for surfacing features of interest and other characteristics to answer the question 'What's in the code?' quickly using static analysis with a json based rules engine. Ideal for scanning components before use or detecting feature level changes.
Mutation testing for .NET core and .NET framework!
The world's simplest facial recognition api for .NET on Windows, MacOS and Linux
Fast, cross-platform and reliable multipart downloader with asynchronous progress events for .NET applications.
Unity client application for Nine Chronicles, a fully decentralized idle RPG powered by the community.
Version Downloads Last updated
5.2.0 20,612 6/7/2022
5.1.0 352,775 1/29/2021
5.0.0 375,605 2/23/2020
4.3.0 170,140 8/20/2019
4.2.0 174,684 8/25/2018
4.1.1 4,433 8/15/2018
4.0.0 47,070 11/12/2017
3.0.0 111,977 4/11/2016
1.2.0 17,394 8/26/2015
1.1.0 10,270 6/19/2014
1.0.0 6,709 11/14/2013