AnyCli 1.0.0-rc.14
dotnet add package AnyCli --version 1.0.0-rc.14
NuGet\Install-Package AnyCli -Version 1.0.0-rc.14
<PackageReference Include="AnyCli" Version="1.0.0-rc.14" />
<PackageVersion Include="AnyCli" Version="1.0.0-rc.14" />
<PackageReference Include="AnyCli" />
paket add AnyCli --version 1.0.0-rc.14
#r "nuget: AnyCli, 1.0.0-rc.14"
#:package AnyCli@1.0.0-rc.14
#addin nuget:?package=AnyCli&version=1.0.0-rc.14&prerelease
#tool nuget:?package=AnyCli&version=1.0.0-rc.14&prerelease
AnyCli is a source-generated, AOT-friendly command-line framework for .NET with typed command parameters.
Read the documentation for getting started, guides, and the API reference.
Philosophy
AnyCli is optimised for both utility and extensibility. It is mildly opinionated and suitable for building almost all types of CLI apps. If your use case isn't supported, please open an issue.
Packages
| Package | Version | Description |
|---|---|---|
AnyCli |
Core command-line framework and source generator. | |
AnyCli.SpectreConsole |
Spectre.Console integration for ANSI command output. |
Features
- AOT-compatible command registration and execution
- Source-generated parameter binding with no runtime reflection
- Typed positional arguments and named options
- Required, optional, variadic, collection, and defaulted parameters
- Nested command groups
- Custom value parsers
- Dependency injection support
- Typed enum exit codes
- Typed global options
- Interceptor middleware
- Cancellation support for async commands and interceptors
- Fully customisable help and error handling
- Built in internationalisation - localized error messages and help for English, French, German, Spanish, Brazilian Portuguese, Italian, and Dutch
- Configurable localization
- Optional Spectre.Console adapter for rich, styled terminal output and error messages (tables, markup, progress bars etc.)
Installation
dotnet add package AnyCli
For Spectre.Console integration:
dotnet add package AnyCli.SpectreConsole
Benchmarks
Environment: macOS Tahoe 26.2, Intel Core i7-9750H, 12 logical cores, .NET SDK 11.0.100, .NET 11.0.0, X64.
Invocation
| Rank | Framework | Mean | Median | Ratio | Allocated |
|---|---|---|---|---|---|
| 1 | ConsoleAppFramework | 9.034 ns | 8.737 ns | 0.009 | 0 B |
| 2 | AnyCli | 969.983 ns | 951.020 ns | 1.000 | 1320 B |
| 3 | XenoAtom.CommandLine | 2,234.497 ns | 2,250.428 ns | 2.311 | 2992 B |
| 4 | System.CommandLine | 3,858.519 ns | 3,907.955 ns | 3.990 | 4848 B |
| 5 | CliFx | 4,428.909 ns | 4,478.285 ns | 4.580 | 4392 B |
| 6 | Spectre.Console.Cli | 108,867.854 ns | 108,747.203 ns | 112.592 | 45646 B |
Cold start (JIT)
| Rank | Framework | Mean | Median | Ratio |
|---|---|---|---|---|
| 1 | ConsoleAppFramework | 62.80 ms | 62.32 ms | 0.56 |
| 2 | AnyCli | 113.17 ms | 114.48 ms | 1.00 |
| 2 | CliFx | 114.59 ms | 115.89 ms | 1.02 |
| 2 | XenoAtom.CommandLine | 118.06 ms | 117.32 ms | 1.05 |
| 2 | System.CommandLine | 127.33 ms | 125.16 ms | 1.13 |
| 3 | Spectre.Console.Cli | 216.18 ms | 216.13 ms | 1.92 |
Cold start (NativeAOT)
| Rank | Framework | Mean | Median | Ratio |
|---|---|---|---|---|
| 1 | AnyCli | 11.70 ms | 11.59 ms | 1.00 |
| 1 | XenoAtom.CommandLine | 12.22 ms | 11.73 ms | 1.05 |
| 1 | ConsoleAppFramework | 12.66 ms | 12.62 ms | 1.08 |
| 1 | CliFx | 13.77 ms | 13.71 ms | 1.18 |
| 1 | System.CommandLine | 14.05 ms | 13.78 ms | 1.20 |
Ranks are BenchmarkDotNet statistical ranks; ties indicate statistically similar results.
Kudos
Inspiration for the framework primarily comes from both ConsoleAppFramework and Spectre.Console.Cli.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. net11.0 is compatible. |
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AnyCli:
| Package | Downloads |
|---|---|
|
AnyCli.SpectreConsole
Spectre.Console adaptor for AnyCli command-line applications, including ANSI console output. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.14 | 0 | 11/21/2026 |
| 1.0.0-rc.13 | 0 | 11/21/2026 |
| 1.0.0-rc.12 | 0 | 11/21/2026 |
| 1.0.0-rc.11 | 45 | 11/21/2026 |
| 1.0.0-rc.10 | 99 | 11/20/2026 |
| 1.0.0-rc.9 | 84 | 11/20/2026 |
| 1.0.0-rc.8 | 63 | 11/16/2026 |
| 1.0.0-rc.7 | 63 | 11/14/2026 |
| 1.0.0-rc.6 | 61 | 11/13/2026 |
| 1.0.0-rc.5 | 56 | 11/13/2026 |
| 1.0.0-rc.2 | 64 | 11/10/2026 |
| 1.0.0-rc.1 | 61 | 11/9/2026 |