AnyCli 1.0.0

dotnet add package AnyCli --version 1.0.0
                    
NuGet\Install-Package AnyCli -Version 1.0.0
                    
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="AnyCli" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AnyCli" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="AnyCli" />
                    
Project file
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 AnyCli --version 1.0.0
                    
#r "nuget: AnyCli, 1.0.0"
                    
#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 AnyCli@1.0.0
                    
#: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=AnyCli&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=AnyCli&version=1.0.0
                    
Install as a Cake Tool

AnyCli

License: MIT .NET 10 .NET 11 AOT Ready GitHub Stars

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 NuGet Details
AnyCli NuGet Downloads Core framework for building CLI applications.
AnyCli.SpectreConsole NuGet Downloads Styled output, tables, markup, and rich rendering capabilities.

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 and executable commands with subcommands
  • Custom value parsers
  • Custom default value providers
  • Dependency injection support
  • Typed enum exit codes
  • Typed global options
  • Interceptor middleware
  • Full async and cancellation support for commands, parsers, default value providers 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.038 ns 9.055 ns 0.010 0 B
2 AnyCli 938.176 ns 936.620 ns 1.000 1304 B
3 XenoAtom.CommandLine 2,408.991 ns 2,363.591 ns 2.568 2992 B
4 System.CommandLine 3,636.054 ns 3,644.886 ns 3.876 4848 B
4 CliFx 3,638.897 ns 3,632.763 ns 3.879 4392 B
5 Spectre.Console.Cli 103,231.980 ns 103,131.182 ns 110.037 45646 B

Cold start (JIT)

Rank Framework Mean Median Ratio
1 ConsoleAppFramework 57.86 ms 57.82 ms 0.55
2 XenoAtom.CommandLine 91.64 ms 91.63 ms 0.87
3 System.CommandLine 96.08 ms 96.10 ms 0.91
4 CliFx 103.14 ms 103.13 ms 0.98
4 AnyCli 105.23 ms 105.06 ms 1.00
5 Spectre.Console.Cli 202.43 ms 202.02 ms 1.92

Cold start (NativeAOT)

Rank Framework Mean Median Ratio
1 XenoAtom.CommandLine 9.795 ms 9.751 ms 0.87
2 ConsoleAppFramework 10.780 ms 10.545 ms 0.96
2 CliFx 11.111 ms 11.118 ms 0.99
2 AnyCli 11.212 ms 11.084 ms 1.00
3 System.CommandLine 13.388 ms 13.173 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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 0 12/1/2026
1.0.0-rc.23 53 11/30/2026
1.0.0-rc.22 65 11/29/2026
1.0.0-rc.21 63 11/29/2026
1.0.0-rc.20 63 11/29/2026
1.0.0-rc.19 69 11/28/2026
1.0.0-rc.18 71 11/28/2026
1.0.0-rc.17 71 11/28/2026
1.0.0-rc.16 67 11/27/2026
1.0.0-rc.15 69 11/27/2026
1.0.0-rc.14 69 11/21/2026
1.0.0-rc.13 66 11/21/2026
1.0.0-rc.12 61 11/21/2026
1.0.0-rc.11 74 11/21/2026
1.0.0-rc.10 117 11/20/2026
1.0.0-rc.9 102 11/20/2026
1.0.0-rc.8 73 11/16/2026
1.0.0-rc.7 74 11/14/2026
1.0.0-rc.6 66 11/13/2026
1.0.0-rc.5 62 11/13/2026
Loading failed