SnapCLI 2.0.2-pre

This is a prerelease version of SnapCLI.
dotnet add package SnapCLI --version 2.0.2-pre                
NuGet\Install-Package SnapCLI -Version 2.0.2-pre                
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="SnapCLI" Version="2.0.2-pre" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SnapCLI --version 2.0.2-pre                
#r "nuget: SnapCLI, 2.0.2-pre"                
#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.
// Install SnapCLI as a Cake Addin
#addin nuget:?package=SnapCLI&version=2.0.2-pre&prerelease

// Install SnapCLI as a Cake Tool
#tool nuget:?package=SnapCLI&version=2.0.2-pre&prerelease                

SnapCLI

Build Status NuGetNuGet Downloads

Quickly create POSIX-like Command Line Interface (CLI) applications with a simple metadata API, built on top of the System.CommandLine library.

NuGet Package

The library is available as a NuGet package:

Project Goal

While Microsoft's System.CommandLine library provides all the necessary APIs to parse command-line arguments, it requires significant effort to set up the code responsible for command-line handling before the program is ready to run. Additionally, this code can be difficult to maintain. For more context, see the Motivation page.

The goal of this project is to address these issues by providing developers with easy-to-use mechanisms, while retaining the core functionality and features of System.CommandLine.

This library enables developers to quickly create POSIX-like CLI applications by automatically managing command-line commands and parameters using the provided metadata. This simplifies the development process and allows developers to focus on their application logic.

Additionally, it streamlines the creation of the application's help system, ensuring that all necessary information is easily accessible to end users.

The inspiration for this project came from the DragonFruit project, which was a step in the right direction to simplify the usage of System.CommandLine but has significant limitations.

Documentation

Visit the Documentation page to get started with SnapCLI’s APIs.

Examples

There are several samples provided to demonstrate various ways to use the library.

.NET Framework Support

Supported frameworks can be found on the SnapCLI NuGet page. The goal is to maintain the same level of support as the System.CommandLine library.

License

This project is licensed under the MIT License. Some parts of this project are borrowed with modifications from DragonFruit under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SnapCLI:

Package Downloads
SnapCLI.DataAnnotations

This extension for SnapCLI library enables validation of command-line arguments based on data annotation attributes, ensuring that input meets specified criteria before executing the command.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.2-pre 0 11/29/2024
2.0.1-pre 41 11/13/2024
2.0.0-pre 52 11/13/2024
1.1.0-pre 48 10/11/2024
1.0.5-pre 48 9/26/2024
1.0.4-pre 48 9/23/2024
1.0.3-pre 89 9/21/2024
1.0.2-pre 67 9/14/2024
1.0.1-pre 50 9/14/2024
1.0.0-pre 52 9/13/2024

Fix args validation