AdvancedConsolePro 1.0.4
dotnet add package AdvancedConsolePro --version 1.0.4
NuGet\Install-Package AdvancedConsolePro -Version 1.0.4
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="AdvancedConsolePro" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AdvancedConsolePro" Version="1.0.4" />
<PackageReference Include="AdvancedConsolePro" />
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 AdvancedConsolePro --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AdvancedConsolePro, 1.0.4"
#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 AdvancedConsolePro@1.0.4
#: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=AdvancedConsolePro&version=1.0.4
#tool nuget:?package=AdvancedConsolePro&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
π¨ AdvancedConsole
AdvancedConsole ist ein modernes .NET 8 Utility-Paket fΓΌr stylische Konsolenanwendungen.
Es kombiniert Farben, UI-Elemente, Animationen und Logging in einer einzigen, leichten Bibliothek.
β¨ Features
π¨ Colors & Styling
- ANSI + Windows VT support
- Inline color tags (
[red]error[/]
,[bg=blue][white]text[/]
) - Fluent API (
Styled.WithForeground(...).Bold().WriteLine(...)
)
π¦ UI Components
- Boxes (
BoxStyle.Single
,Double
,Rounded
) - Figlet mini-font banners
- Tables & Trees
- Sections, Word-wrap, Indentation
- Boxes (
π Prompts
- Yes/No questions
- Input with default & validation
- Masked password input
- Single-Select & Multi-Select menus
π Progress & Status
- ProgressBar
- Spinner
- StatusLine
- Timers (measure execution time)
π Animations
- Marquee scrolling text
- Gradient text
- Shimmering text (new!)
π Window & Sound
- Resize helpers
- Region clear
- BeepSuccess / BeepError
π Logging
- Log capture to file
- ILogger extensions (
LogSuccess
,LogWarningBox
,LogErrorBox
)
π¦ Installation
dotnet add package AdvancedConsole
Target framework: .NET 8.0
Keine AbhΓ€ngigkeiten auΓer Microsoft.Extensions.Logging.Abstractions
.
π Quickstart
using AdvancedConsole;
// Section & Figlet
TextLayout.Section("Demo");
Figlet.Write("ADV CONSOLE", ConsoleColor.Cyan);
// Info lines
ColorWriter.WriteLineInfo("This is info");
ColorWriter.WriteLineSuccess("This is success");
ColorWriter.WriteLineWarning("This is warning");
ColorWriter.WriteLineError("This is error");
// Inline tags
ColorWriter.WriteTaggedLine("Inline [green]green[/], [red]red[/], [bg=blue][white]white on blue[/][/]");
// Prompts
bool go = Prompt.YesNo("Continue?");
string name = Prompt.Input("Your name", defaultValue: "Ben");
string pw = Prompt.Password("Enter password");
var choice = Prompt.Select("Pick one", new[] { "Alpha", "Bravo", "Charlie" });
// Progress & spinner
using (var pb = new ProgressBar("Working...", 30))
{
for (int i = 0; i <= 100; i += 10)
{
pb.Report(i / 100.0, $"Progress {i}%");
await Task.Delay(120);
}
}
π Animations
// Marquee scrolling
await Animation.Marquee("Scrolling text β", width: 30, ms: 80, loops: 1);
// Gradient text
Animation.GradientText("Hello Gradient", ConsoleColor.Cyan, ConsoleColor.Magenta);
// Shimmering text
await Animation.Shimmer(
text: "ADVANCED CONSOLE",
baseColor: ConsoleColor.DarkGray,
highlightColor: ConsoleColor.White,
window: 5,
ms: 40,
loops: 2);
π Tables & Trees
new Table()
.WithHeaders("Id", "Name", "Score")
.AddRow("1", "Alice", "12")
.AddRow("2", "Bob", "37")
.WithBorderColor(ConsoleColor.DarkCyan)
.Write();
var root = new TreeNode("root");
root.Add("bin").Add("debug");
var src = root.Add("src");
src.Add("ConsoleX");
TreeRenderer.Write(root);
π Logging
using Microsoft.Extensions.Logging;
ILogger logger = LoggerFactory.Create(b => b.AddConsole()).CreateLogger("demo");
logger.LogSuccess("Operation succeeded");
logger.LogWarningBox("Something looks odd...");
logger.LogErrorBox("Something failed", new Exception("Boom!"));
// Capture console to file
LogCapture.Start("output.log");
Console.WriteLine("This line is also written to output.log");
LogCapture.Stop();
π οΈ Roadmap
- π¨ TrueColor (24-bit RGB) ANSI support
- π Multi-progress bar
- π Async prompt API
- π΅ Cross-platform sound effects
π License
MIT Β© Ben Sowieja Feel free to use in commercial and open-source projects.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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.
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.