SpectreConsoleLibrary2025 1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SpectreConsoleLibrary2025 --version 1.0.1
NuGet\Install-Package SpectreConsoleLibrary2025 -Version 1.0.1
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.
<PackageReference Include="SpectreConsoleLibrary2025" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SpectreConsoleLibrary2025" Version="1.0.1" />
<PackageReference Include="SpectreConsoleLibrary2025" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SpectreConsoleLibrary2025 --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SpectreConsoleLibrary2025, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SpectreConsoleLibrary2025@1.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SpectreConsoleLibrary2025&version=1.0.1
#tool nuget:?package=SpectreConsoleLibrary2025&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
Provides various methods for Spectre.Console listed below.
🔸 If pills may need to use SpectreConsoleHelpers.SetEncoding(); at start of a project to ensure proper UTF-8 encoding.
- Uses NET 9.0
- Spectre.Console library version 0.54.0
Pills
| Method Name | Description |
|---|---|
| ExitPrompt | Shows a “press any key to exit” prompt and waits for user input. |
| InfoPill | Displays an informational (blue) pill with specified alignment and optional text. |
| ErrorPill | Displays an error (red) pill with specified alignment and optional text. |
| ErrorPill | Displays an error pill alongside an exception message for detailed error output. |
| SuccessPill | Displays a success (green) pill with specified alignment and optional text. |
| WarningPill | Displays a warning (yellow) pill with specified alignment and optional text. |
| WindowTitle | Renders a centered, styled window title using a Spectre.Console info pill. |
User Interaction
| Method Signature | Description |
|---|---|
| ExitPrompt(Justify alignment = Justify.Center) | Displays a “press any key to exit” prompt and blocks until input. |
Console Configuration
| Method Signature | Description |
|---|---|
| SetEncoding() | Sets console input/output encoding to UTF-8 without a BOM. |
Diagnostics & Caller Info
| Method Signature | Description |
|---|---|
| PrintCyan(string? methodName = null) | Prints the calling method name in cyan using CallerMemberName. |
| PrintPink(string? filePath = null, string? methodName = null) | Prints project, file, and method name using pink/yellow formatting. |
Spectre.Console Markup Utilities
| Method Signature | Description |
|---|---|
| ConsoleEscape(this string sender) | Escapes Spectre.Console markup characters in a string. |
| ConsoleRemove(this string sender) | Removes Spectre.Console markup from a string. |
| PanelDisplay(string content, string title = "", Justify alignment = Justify.Center) | Displays content within a styled Spectre.Console panel with title and alignment. |
JSON Utilities
| Method Signature | Description |
|---|---|
| WriteJson(string json) | Writes a JSON string to the console with common syntax highlighting. |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Spectre.Console (>= 0.54.0)
- Spectre.Console.Json (>= 0.54.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Add several new methods and updated documentation