VInquirer 1.0.0

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

// Install VInquirer as a Cake Tool
#tool nuget:?package=VInquirer&version=1.0.0                

VInquirer

A collection of common interactive command line user interfaces.

image

Quick Start Example:

using VInquirer.Prompts;
using VInquirer.Validators;
using VInquirer;

// create input prompts and validators
var numbersOnly = new RegexValidator("^[0-9]*$");
var nameInput = new Input("name", "What is your name?");
var ageInput = new Input("age", "What is your age?", validator: numbersOnly);
var passwordInput = new PasswordInput("password", "What is the password?");

// create inquirer with input prompts
var inquirer = new Inquirer(nameInput, ageInput, passwordInput);

// takes user inputs

inquirer.Ask();

// display user inputs

foreach (var ans in inquirer.Answers())
{
    System.Console.WriteLine(ans);
}

Options Example:

using VInquirer.Prompts;
using VInquirer.Validators;
using VInquirer;

// create input prompts and validators
var options = new string[] { "Option 1", "Option 2" };
var listInput = new ListInput("option", "Which option?", options);
var sureInput = new InputConfirmation("confirm", "Are you sure?");

// create inquirer with input prompts
var inquirer = new Inquirer(listInput, sureInput);

// takes user inputs

inquirer.Ask();

// display user inputs

foreach (var ans in inquirer.Answers())
{
    System.Console.WriteLine(ans);
}

Custom Console Colors Settings Example:

using VInquirer.Prompts;
using VInquirer.Validators;
using VInquirer;


var settings = new InquirerSettings
{
    BackgroundColor = ConsoleColor.Black,
    DefaultTextColor = ConsoleColor.White,
    ErrorTextColor = ConsoleColor.Red,
    QuestionTextColor = ConsoleColor.Yellow,
    OptionTextColor = ConsoleColor.DarkGray,
    SelectedOptionTextColor = ConsoleColor.Cyan
};

// create input prompts and validators
var options = new string[] { "Option 1", "Option 2" };
var listInput = new ListInput("option", "Which option?", options,settings: settings);
var sureInput = new InputConfirmation("confirm", "Are you sure?",settings: settings with { QuestionTextColor = ConsoleColor.Cyan });

// create inquirer with input prompts
var inquirer = new Inquirer(listInput, sureInput);

// takes user inputs

inquirer.Ask();

// display user inputs

foreach (var ans in inquirer.Answers())
{
    System.Console.WriteLine(ans);
}

Product 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 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. 
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.0.0 182 7/1/2023