ApplicationBuilderHelpers 4.1.88
See the version list below for details.
dotnet add package ApplicationBuilderHelpers --version 4.1.88
NuGet\Install-Package ApplicationBuilderHelpers -Version 4.1.88
<PackageReference Include="ApplicationBuilderHelpers" Version="4.1.88" />
<PackageVersion Include="ApplicationBuilderHelpers" Version="4.1.88" />
<PackageReference Include="ApplicationBuilderHelpers" />
paket add ApplicationBuilderHelpers --version 4.1.88
#r "nuget: ApplicationBuilderHelpers, 4.1.88"
#:package ApplicationBuilderHelpers@4.1.88
#addin nuget:?package=ApplicationBuilderHelpers&version=4.1.88
#tool nuget:?package=ApplicationBuilderHelpers&version=4.1.88
ApplicationBuilderHelpers
A .NET library for building command-line applications with a fluent API, dependency injection, and modular architecture.
- Targets:
net6.0โnet10.0ยท AOT compatible ยท Trimmable - Dependencies:
Microsoft.Extensions.Hosting,Microsoft.Extensions.DependencyInjection.Abstractions,AbsolutePathHelpers
Features
- ๐ฏ Command-based Architecture โ Command patterns with automatic argument parsing
- ๐ง Fluent Builder API โ Intuitive setup via method chaining
- ๐ Dependency Injection โ Full
Microsoft.Extensions.DependencyInjectionsupport - ๐๏ธ Modular Application Structure โ Reusable
ApplicationDependencymodules with lifecycle hooks - โ๏ธ Configuration โ .NET configuration integration with
@ref:reference values - ๐จ Attributes โ
[Command],[CommandOption],[CommandArgument]for declarative CLI definitions - ๐ฏ Sub-Commands โ Hierarchical commands via space-separated names
- ๐๏ธ Themable Help โ 5 built-in console color themes, configurable help width
- ๐งฉ Multiple Host Types โ
HostApplicationBuilder,WebApplicationBuilder, custom builders
Installation
dotnet add package ApplicationBuilderHelpers
Quick Start
// Program.cs
using ApplicationBuilderHelpers;
return await ApplicationBuilder.Create()
.AddApplication<CoreApplication>()
.AddCommand<GreetCommand>()
.RunAsync(args);
[Command(description: "Greet someone")]
public class GreetCommand : Command
{
[CommandArgument(Name = "name", Position = 0, Description = "Who to greet")]
public string Name { get; set; } = "World";
protected override ValueTask Run(ApplicationHost<HostApplicationBuilder> applicationHost, CancellationTokenSource cts)
{
Console.WriteLine($"Hello, {Name}!");
cts.Cancel();
return ValueTask.CompletedTask;
}
}
$ myapp Alice
Hello, Alice!
Core Concepts
Commands
Extend Command and override Run. Define options with [CommandOption] and positional arguments with [CommandArgument]. Commands can register their own services, middleware, and configuration โ they inherit the full ApplicationDependency lifecycle.
[Command("build", description: "Build the project")]
public class BuildCommand : Command
{
[CommandOption('v', "verbose", Description = "Enable verbose output")]
public bool Verbose { get; set; }
protected override async ValueTask Run(ApplicationHost<HostApplicationBuilder> applicationHost, CancellationTokenSource cts)
{
// ...build logic...
cts.Cancel();
}
}
ApplicationDependency
Group shared services and configuration into reusable modules:
public class CoreApplication : ApplicationDependency
{
public override void AddServices(ApplicationHostBuilder appBuilder, IServiceCollection services)
{
services.AddSingleton<IMyService, MyService>();
}
}
See Application Dependencies for the full lifecycle reference.
Sub-Commands
Use space-separated names for hierarchical commands. Try myapp deploy prod or myapp deploy prod rollback:
[Command("deploy prod", description: "Deploy to production")]
public class DeployProductionCommand : Command { /* ... */ }
Exit Codes
Throw CommandException to return a non-zero exit code from RunAsync:
throw new CommandException("Operation failed", exitCode: 1);
See Advanced Topics for more on sub-commands, custom host types, and error handling.
Architecture
โโโโโโโโโโโโโโโโโโโโโโโ
โ ApplicationBuilder โ โ Entry Point (fluent API)
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโผโโโโโโโ
โ Commands โ โ Command Registration (+ own lifecycle hooks)
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโผโโโโโโโโโโโ
โ Applications โ โ Application Modules (lifecycle hooks)
โโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโผโโโโโโโโโโโโ
โ Host Builder โ โ Host Configuration
โโโโโโโโฌโโโโโโโโโโโโ
โ
โโโโโโโโผโโโโโโโ
โ Services โ โ Dependency Injection
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโผโโโโโโโโโโโ
โ Middleware โ โ Request Pipeline
โโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโผโโโโโโโ
โ Execution โ โ Command Execution
โโโโโโโโโโโโโโโ
Documentation
| Guide | |
|---|---|
| Getting Started | Installation, first app, services |
| Commands | Attributes, options, arguments, lifecycle |
| Application Dependencies | Full lifecycle reference |
| Configuration & Themes | Fluent config, themes, @ref: system, help formatting |
| Custom Type Parsers | ICommandTypeParser / CommandTypeParser<T> |
| Advanced Topics | Sub-commands, host types, exit codes, error handling |
| API Reference | Complete public API surface |
Contributing
Contributions are welcome! Please submit a Pull Request.
License
MIT โ see the LICENSE file.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 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
- AbsolutePathHelpers (>= 0.3.110)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Hosting (>= 10.0.0)
-
net6.0
- AbsolutePathHelpers (>= 0.3.110)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Hosting (>= 10.0.0)
-
net7.0
- AbsolutePathHelpers (>= 0.3.110)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Hosting (>= 10.0.0)
-
net8.0
- AbsolutePathHelpers (>= 0.3.110)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Hosting (>= 10.0.0)
-
net9.0
- AbsolutePathHelpers (>= 0.3.110)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Hosting (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.1.89 | 21 | 6/17/2026 |
| 4.1.88 | 20 | 6/17/2026 |
| 4.1.87 | 29 | 6/17/2026 |
| 4.1.86 | 115 | 6/12/2026 |
| 4.1.85 | 30 | 6/12/2026 |
| 4.1.84 | 76 | 6/11/2026 |
| 4.1.83 | 34 | 6/11/2026 |
| 4.1.82 | 83 | 6/10/2026 |
| 4.1.81 | 38 | 6/10/2026 |
| 4.1.80 | 137 | 6/2/2026 |
| 4.1.79 | 90 | 5/29/2026 |
| 4.1.78 | 60 | 5/29/2026 |
| 4.1.77 | 91 | 5/27/2026 |
| 4.1.76 | 65 | 5/27/2026 |
| 4.1.75 | 155 | 5/19/2026 |
| 4.1.74 | 77 | 5/19/2026 |
| 4.1.73 | 80 | 5/18/2026 |
| 4.1.72 | 110 | 5/15/2026 |
| 4.1.71 | 78 | 5/15/2026 |
| 4.1.70 | 125 | 5/14/2026 |
## New Version
* Bump `application_builder_helpers` from `4.1.87` to `4.1.88`. See [changelog](https://github.com/Kiryuumaru/ApplicationBuilderHelpers/compare/application_builder_helpers/4.1.87...application_builder_helpers/4.1.88)
## What's Changed
* Bump Microsoft.Bcl.Memory from 9.0.0 to 9.0.14 by @dependabot[bot] in https://github.com/Kiryuumaru/ApplicationBuilderHelpers/pull/310
**Full Changelog**: https://github.com/Kiryuumaru/ApplicationBuilderHelpers/compare/build.20260617100616.11619ca...build.20260617101205.a4e4a17