Atc.Console.Spectre
3.0.174
dotnet add package Atc.Console.Spectre --version 3.0.174
NuGet\Install-Package Atc.Console.Spectre -Version 3.0.174
<PackageReference Include="Atc.Console.Spectre" Version="3.0.174" />
<PackageVersion Include="Atc.Console.Spectre" Version="3.0.174" />
<PackageReference Include="Atc.Console.Spectre" />
paket add Atc.Console.Spectre --version 3.0.174
#r "nuget: Atc.Console.Spectre, 3.0.174"
#:package Atc.Console.Spectre@3.0.174
#addin nuget:?package=Atc.Console.Spectre&version=3.0.174
#tool nuget:?package=Atc.Console.Spectre&version=3.0.174
Atc.Console.Spectre
Target Framework: net9.0, net10.0
Extensions and utilities for building beautiful command-line applications using Spectre.Console. Provides factories and helpers that simplify creating CLI apps with logging, dependency injection, and rich terminal output.
Why Use This Library?
Building professional CLI applications with Spectre.Console requires setting up command apps, dependency injection, and logging. Atc.Console.Spectre streamlines this by providing:
- CommandAppFactory: Quick setup for Spectre.Console command applications
- ServiceCollectionFactory: Preconfigured dependency injection for CLI apps
- Logger Integration: Built-in console logger with Microsoft.Extensions.Logging
- Configuration Helpers: Easy setup for console logger configuration
- Reduced Boilerplate: Start building commands faster with less setup code
Perfect for:
- Building developer tools and CLI utilities
- Creating interactive console applications
- Command-line interfaces for automation scripts
- Tools requiring rich terminal output
- CLI apps with dependency injection
Installation
dotnet add package Atc.Console.Spectre
Target Framework
- .NET 9.0
Key Features
CommandAppFactoryfor creating Spectre.Console command applicationsServiceCollectionFactoryfor dependency injection setup- Console logger configuration and integration
- Support for Spectre.Console.Cli command pattern
- Built-in logging to console with structured output
- Configuration binding for console logger settings
Requirements
Key Dependencies
- Spectre.Console
- Spectre.Console.Cli
- Microsoft.Extensions.Logging
- Atc (foundation library)
Main Components
CommandAppFactory
Creates configured Spectre.Console command applications with dependency injection:
Create(IServiceCollection): Creates a command app with DI support
ServiceCollectionFactory
Creates service collections with preconfigured logging:
Create(ConsoleLoggerConfiguration): Sets up services with console logging
Code documentation
CommandAppFactory examples
Using Create(..)
Example with a minimal setup in the Program.cs with use CommandAppFactory.Create
public static class Program
{
public static Task<int> Main(string[] args)
{
var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.Build();
var consoleLoggerConfiguration = new ConsoleLoggerConfiguration();
configuration.GetSection("ConsoleLogger").Bind(consoleLoggerConfiguration);
var serviceCollection = ServiceCollectionFactory.Create(consoleLoggerConfiguration);
var app = CommandAppFactory.Create(serviceCollection);
app.Configure(config =>
{
config.AddCommand<HelloCommand>("hello")
.WithDescription("Say hello")
.WithExample(new[] { "hello Phil" });
config.AddCommand<LogCommand>("log")
.WithDescription("Write a log message")
.WithExample(new[] { "log Hello world" });
});
return app.RunAsync(args);
}
}
Contributing
Contributions are welcome! Please see the main repository README for contribution guidelines.
| 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 is compatible. 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. |
-
net10.0
- Atc (>= 3.0.174)
- Microsoft.Extensions.Logging (>= 10.0.9)
- Spectre.Console (>= 0.57.0)
- Spectre.Console.Cli (>= 0.55.0)
-
net9.0
- Atc (>= 3.0.174)
- Microsoft.Extensions.Logging (>= 10.0.9)
- Spectre.Console (>= 0.57.0)
- Spectre.Console.Cli (>= 0.55.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Atc.Console.Spectre:
| Package | Downloads |
|---|---|
|
Atc.Rest.ApiGenerator
Atc.Rest.ApiGenerator is a WebApi C# code generator using a OpenApi 3.0.x specification YAML file. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.174 | 47 | 6/24/2026 |
| 3.0.173 | 48 | 6/24/2026 |
| 3.0.172 | 48 | 6/24/2026 |
| 3.0.67 | 410 | 4/25/2026 |
| 3.0.46 | 211 | 4/15/2026 |
| 3.0.45 | 126 | 4/10/2026 |
| 3.0.44 | 113 | 4/9/2026 |
| 3.0.43 | 118 | 4/9/2026 |
| 3.0.41 | 118 | 4/9/2026 |
| 3.0.40 | 115 | 4/9/2026 |
| 3.0.18 | 759 | 2/9/2026 |
| 3.0.16 | 885 | 12/15/2025 |
| 3.0.12 | 271 | 11/28/2025 |
| 3.0.9 | 415 | 11/21/2025 |
| 3.0.8 | 354 | 11/14/2025 |
| 3.0.4 | 291 | 11/6/2025 |
| 2.0.562 | 666 | 9/4/2025 |
| 2.0.561 | 308 | 9/4/2025 |
| 2.0.560 | 312 | 9/3/2025 |
| 2.0.558 | 288 | 8/22/2025 |