CLI tool
spectreconsole/spectre.console avatar
spectreconsole/spectre.console

Spectre.Console: a .NET library for styled console output and tables

A .NET library that makes it easier to create beautiful console applications.

11,641 stars679 forksC#MIT

At a glance

What is it?
Spectre.Console is a .NET library for building styled cross-platform console applications, inspired by Python's Rich. It handles tables, markup and terminal colour downgrade, and it is the wrong tool when you need a full TUI.
Who is it for?
Adopt Spectre.Console if you are writing a .NET console tool or CLI and want tables, markup and colour handling without writing ANSI escape sequences yourself. Do not adopt it if you need a persistent full-screen TUI with panes that redraw in place, since the README describes tables, grids, panels and markup rather than a TUI framework.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The problem Spectre.Console solves for .NET CLI authors

Plain Console.WriteLine gives you a line of text and nothing else. Anything beyond that means hand-writing ANSI escape codes, tracking whether the current terminal supports 24-bit colour, and rebuilding table layout arithmetic every time a column changes. Spectre.Console targets that gap. The README describes it as a .NET library that makes it easier to create beautiful, cross platform, console applications, and names its inspiration directly: it is heavily inspired by the excellent Python library, Rich.

The audience is narrow and identifiable. You are writing a C# console application, a build tool, a migration runner or a CLI, and you want output that a human can read: aligned tables, coloured status lines, panels around warnings. The library ships as a NuGet package and targets .NET, so it fits projects already on the .NET toolchain rather than scripts in other languages.

One design decision worth noting early: the README lists written with unit testing in mind as a feature. That matters more than it sounds. Console formatting code is normally untestable because it writes straight to stdout. Spectre.Console's documentation points to a testable surface, which is the reason teams with strict CI requirements tend to pick it over ad-hoc escape codes.

Tables, markup and automatic colour downgrade

The feature list in the README is concrete. Spectre.Console supports tables, grids, panels, and a Rich inspired markup language. It supports the most common SGR parameters for text styling: bold, dim, italic, underline, strikethrough and blinking text. It supports 3/4/8/24-bit colors in the terminal, and the README states that the library will detect the capabilities of the current terminal and downgrade colors as needed.

That last sentence is the mechanism with the most practical weight. Rather than you deciding at build time whether to emit truecolor or fall back to 8-bit, the library inspects the terminal at runtime and reduces colour depth to something the terminal can render. The consequence is that you write one colour value and it survives the trip to Windows Terminal, to a CI log, and to a redirect into a file. The trade-off is that the output is no longer a pure function of your code, which is exactly why the testable surface mentioned above matters.

The markup language is the second mechanism. Instead of composing escape sequences, you write markup in the string and let the library parse it. Tables, grids and panels are separate renderables that compose, so a panel can contain a table and a table cell can contain styled markup. The repository's resources directory holds an example image, and the README points to a separate examples repository for working code rather than embedding samples.

Installing Spectre.Console from NuGet

The README gives one installation step: add the NuGet package to your project. Run this from the directory containing your project file, or add the package through your IDE's NuGet UI.

csharp
dotnet add package Spectre.Console

After the command completes, the package reference appears in your .csproj and the Spectre.Console namespace becomes available. The README does not pin a version in the install command, so you get the latest stable release unless you constrain it yourself.

From there, the README points to two places for actual usage: the project website at https://spectreconsole.net for detailed instructions, and a separate examples repository for code that shows the library in action. Those two sources are where the first real program comes from; the README itself does not embed a sample. What you should expect when you follow them is output built from renderables such as tables and panels, with styling written at whatever colour depth the terminal capability detection decided on. If you redirect that output to a file, expect the styling to be reduced depending on the detection result; the README describes downgrading colours, not stripping them.

This is the point where the library either fits your project or does not. If your console output is already a handful of log lines, the table renderer is more machinery than the problem needs.

Where Spectre.Console is the wrong choice

Spectre.Console renders output. It is not a full-screen TUI framework, and the README's feature list does not claim otherwise: tables, grids, panels and markup, plus SGR styling and colour depth handling. If your application needs persistent panes that redraw in place, mouse handling, focus management or a modal dialog stack, you are outside what the documented feature set covers, and you should look at a terminal UI toolkit instead of bending a renderable library into that shape.

The second limitation is environmental. Colour downgrade depends on detecting terminal capabilities, and detection is a heuristic. Under a CI runner, inside a container with a dumb terminal, or when output is piped to another process, the detected capability may not match what the eventual reader sees. The README does not document an override for that detection, so if your users report correct colours locally and flat colours in CI, that is the area to investigate first.

Third, the package brings a dependency. The README states that SixLabors.ImageSharp, a library which Spectre.Console relies upon, is licensed under Apache 2.0 when distributed as part of Spectre.Console, and that the Six Labors Split License covers all other usage. That is a distribution question, not a formatting question, but it belongs in the same decision.

Spectre.Console compared with System.CommandLine and Terminal.Gui

The two comparisons people search for have different answers, because they are not the same kind of tool.

System.CommandLine is Microsoft's command-line parsing library. It is about argument and option parsing, command hierarchies and invocation, not about rendering. Spectre.Console's own topics list includes cli-parser, and the README's feature list is about tables, grids, panels, markup and text styling. So the honest framing is that they overlap only at the edges: if your problem is parsing arguments, System.CommandLine is the direct fit; if your problem is presenting the result, Spectre.Console is. A project can use both, and the split is clean because one produces a parsed model and the other consumes values for display.

Terminal.Gui is a different comparison entirely. It is a terminal UI toolkit: the model is a window with views, not a stream of rendered output. Spectre.Console writes renderables to the console and moves on. That difference decides the choice for you. A one-shot report, a table of migration results, a progress display during a long task: Spectre.Console. A persistent interactive application with keyboard focus moving between controls: Terminal.Gui, because Spectre.Console's documented feature set does not include that.

The Rich comparison is the useful one for design intent. The README says Spectre.Console is heavily inspired by Rich, so if you know that Python library, you already know the shape of the API and the markup idea. The difference is the runtime and the ecosystem: Rich is Python, Spectre.Console is .NET, and the colour downgrade behaviour is implemented for .NET terminals.

Maintenance, releases and the licence you are actually shipping

The repository is not archived, and the last push was on 2026-09-19. Releases are frequent: 0.57.0 on 2026-06-11, 0.57.1 on 2026-06-24, and 0.57.2 on 2026-07-02. Note the version numbers. The project is still on 0.x, which in practice means the API can change between minor versions, so pinning the package version in your .csproj is a reasonable precaution rather than paranoia.

Upgrade cost is mostly the usual NuGet flow: bump the version, rebuild, fix any API changes. The README does not document a migration guide or a deprecation policy, so budget time for reading release notes rather than expecting a codemod. Because the library is used for output rather than for data or protocol handling, an upgrade that breaks formatting is visible immediately in your console, which shortens the feedback loop compared with libraries whose behaviour is buried in a request path.

On licensing: the README states that Spectre.Console is provided as-is under the MIT license. It also carries an explicit note about SixLabors.ImageSharp, which it relies upon: Apache 2.0 when distributed as part of Spectre.Console, and the Six Labors Split License for all other usage. If you redistribute the package or bundle its output in a commercial product, that second licence is the one to read with your legal team. Nothing here is legal advice; the point is that the MIT label on Spectre.Console does not by itself describe every dependency in the graph.

Editorial conclusion

Adopt Spectre.Console if you are writing a .NET console tool or CLI and want tables, markup and colour handling without writing ANSI escape sequences yourself. Do not adopt it if you need a persistent full-screen TUI with panes that redraw in place, since the README describes tables, grids, panels and markup rather than a TUI framework. Before committing, verify the terminal capability detection on the terminals your users actually run, and check the ImageSharp licence note in the README against how you distribute the package.

Frequently asked questions

What is Spectre.Console?

It is a .NET library for building cross-platform console applications, with tables, grids, panels, a Rich-inspired markup language and SGR text styling. The README states it is heavily inspired by the Python library Rich, and the documentation lives at spectreconsole.net.

How do I use Spectre.Console in a C# project?

Install the NuGet package with dotnet add package Spectre.Console. The README points to the project website for detailed instructions and to a separate examples repository for working code.

How does Spectre.Console compare with System.CommandLine?

They solve different problems. System.CommandLine is a command-line parsing library for arguments, options and command hierarchies, while Spectre.Console's documented feature set covers rendering: tables, grids, panels, markup and text styling. A project can use both, with one parsing input and the other presenting output.

What are the key differences between Spectre.Console and Terminal.Gui?

Terminal.Gui is a terminal UI toolkit built around windows and views, while Spectre.Console renders output such as tables, panels and styled text and then moves on. If you need persistent panes with focus handling, Spectre.Console's documented features do not cover that.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. spectreconsole/spectre.console on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/spectreconsole-spectre-console.svg)](https://hysenlabs.com/projects/spectreconsole-spectre-console)