BindOpen.Commands 1.1.13

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

BindOpen.Commands

BindOpen logo

Github release version

BindOpen is a framework that allows to build widely-extended applications. It enables you to enhance your .NET projects with custom script functions, connectors, entities, and tasks.

About

BindOpen.Commands is a straightforward and comprehensive API for manipulating command-line arguments and handling related tasks.

Install

To get started, install the BindOpen.Commands module you want to use.

Note: We recommend that later on, you install only the package you need.

From Visual Studio

Module Instruction
BindOpen.Commands PM> Install-Package BindOpen.Commands
BindOpen.Commands.Abstrations PM> Install-Package BindOpen.Commands.Abstrations

From .NET CLI

Module Instruction
BindOpen.Commands > dotnet add package BindOpen.Commands
BindOpen.Commands.Abstrations > dotnet add package BindOpen.Commands.Abstrations

Get started

Define command options

Options are defined using BindOpen metadata, allowing for rich descriptions, default values, types, and validation rules.

 var options = BdoCommands.NewOption(
        "sample",
        BdoCommands.NewOption("version")
            .WithAliases("version", "--version", "-v")
            .WithLabel(LabelFormats.NameSpaceValue)
            .WithDataType(DataValueTypes.Text)
            .AsRequired()
            .WithDescription("Display the version of the application.")
            .Execute(() => ShowVersion())
        ,
        BdoCommands.NewOption("path")
            .WithLabel(LabelFormats.OnlyValue)
            .WithDataType(DataValueTypes.Text)
            .AsRequired()
            .WithTitle("_path")
            .WithDescription("The path.")
    )
    .WithDescription("Sample shows you the way to simply specify the options of your application.");

Parse arguments

var scope = BdoScoping.NewScope();
var parameters = scope.ParseArguments(args, options);

Check parameters against option definitions

var log = BdoLogging.NewLog();

var scope = BdoScoping.NewScope();
var parameters = scope.ParseArguments(args, options, log: log);

// Parsing outputs are stored in the log object

Invoke tasks dynamically

var parameters = SystemData.Scope.ParseArguments(args, options);
await parameters.InvokeAsync(q => q.GetData<string>("run") == "A", async () => { await TaskA(); });

Automatically generate help

var scope = BdoScoping.NewScope();
var help = scope.GetHelpText(options);

Trace.WriteLine(help);

License

This project is licensed under the terms of the MIT license. See LICENSE.

Packages

This repository contains the code of the following Nuget packages:

Package Provision
BindOpen.Commands Core package
BindOpen.Commands.Abstrations Interfaces and enumerations

The atomicity of these packages allows you install only what you need respecting your solution's architecture.

All of our NuGet packages are available from our NuGet.org profile page.

Other repos and Projects

BindOpen.Hosting enables you to integrate a BindOpen agent within the .NET service builder.

BindOpen.Logging provides a simple and multidimensional logging system, perfect to monitor nested task executions.

A full list of all the repos is available as well.

Documentation and Further Learning

BindOpen Docs

The BindOpen Docs are the ideal place to start if you are new to BindOpen. They are categorized in 3 broader topics:

  • Articles to learn how to use BindOpen;
  • Notes to follow our releases;
  • Api to have an overview of BindOpen APIs.

BindOpen Blog

The BindOpen Blog is where we announce new features, write engineering blog posts, demonstrate proof-of-concepts and features under development.

Feedback

If you're having trouble with BindOpen, file a bug on the BindOpen Issue Tracker.

Donation

You are welcome to support this project. All donations are optional but are greatly appreciated.

Please donate

Product 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.13 109 8/17/2025
1.1.12 108 1/9/2025
1.1.11 174 1/29/2024
1.1.10 136 1/22/2024