PromptPlus 4.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package PromptPlus --version 4.1.0
NuGet\Install-Package PromptPlus -Version 4.1.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="PromptPlus" Version="4.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PromptPlus --version 4.1.0
#r "nuget: PromptPlus, 4.1.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 PromptPlus as a Cake Addin
#addin nuget:?package=PromptPlus&version=4.1.0

// Install PromptPlus as a Cake Tool
#tool nuget:?package=PromptPlus&version=4.1.0

Welcome to PromptPlus

Interactive command-line toolkit for .NET Core with powerful controls and commands to create professional console applications.

All controls input/filter (except Masked input) using GNU Readline Emacs keyboard shortcuts.

PromptPlus Supports 4/8/24-bit colors in the terminal with auto-detection of the current terminal's capabilities and automatic color conversion.

Visit the official page for complete documentation of PromptPlus

PromptPlus was developed in C# with the netstandard2.1, .NET 6 and .NET 7 target frameworks.

What's new in V4.1.0

  • New Control : Table<T> , Display/Select data in a grid/table
    • Main features :
      • More than 100 layout combinations
      • Navigation by row and columns
      • Scroll the table when it is larger than the screen
      • Split text when it is larger than the column size
      • Automatic header and column completion
      • Color customization of each element
      • Search for data filtered by columns
      • Formatting by column or by data type definition
  • Improvement commands with default values ​​(all controls)
  • Bug fixed: grouped item ordering. The sort option will be ignored
    • Affeted Controls : Select/MultiSelect
  • Bug fixed: 'AcceptInput' method causes failure by not allowing navigation keys to be selected.
    • Affeted Controls : AddtoList/Input
  • Improvement : Direct writes to standard error output stream
    • New Commands : OutputError()
  • New feature: Escaping format characters color
    • Global property : IgnoreColorTokens
    • New Commands : EscapeColorTokens()/AcceptColorTokens()
  • New feature: Group items in the select control
  • New feature: Add separator line in the select control

Special thanks to ividyon for suggesting improvements and actively participating in this release

PromptPlus Controls - Sample Usage

//ASCII text banners
PromptPlus
    .Banner("PromptPlus v4.0")
    .Run(Color.Yellow,BannerDashOptions.DoubleBorderUpDown);

//MaskEdit DateTime
var mask = PromptPlus.MaskEdit("input", "MaskEdit DateTime input")
    .Mask(MaskedType.DateTime)
    .DescriptionWithInputType(FormatWeek.Short)
    .Culture("en-us")
    .AcceptEmptyValue()
    .Run();

if (!mask.IsAborted)
{
    PromptPlus.WriteLine($"You input with mask is {mask.Value.Masked}");
    PromptPlus.WriteLine($"You input without mask is {mask.Value.Input}");
}    

//INPUT
var input = PromptPlus
    .Input("Input sample")
    .Default("foo")
    .Run();

if (!input.IsAborted)
{
    PromptPlus.WriteLine($"You input is {input.Value}");
}

//AnyKey
var kp = PromptPlus
    .KeyPress()
    .Config(cfg => cfg.HideAfterFinish(true))
    .Spinner(SpinnersType.DotsScrolling)
    .Run();

Supported platforms

  • Windows
    • Command Prompt, PowerShell, Windows Terminal
  • Linux (Ubuntu, etc)
    • Windows Terminal (WSL 2)
  • macOS
    • Terminal.app

License

Copyright 2021 @ Fernando Cerqueira

This project is licensed under the MIT License

Credits

PromptPlus includes code from other software released under the MIT license:

  • Spectre.Console, Copyright (c) 2020 Patrik Svensson, Phil Scott, Nils Andresen.
  • Sharprompt, Copyright (c) 2019 shibayan.
  • xmldoc2md, Copyright (c) 2022 Charles de Vandière.
  • FIGlet, Copyright (c) 2014 Philippe AURIOU
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 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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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 PromptPlus:

Package Downloads
PromptPlusCommandDotNet

Integration with the Command DotNet package with interactive command-line for toolkit for C# with powerful controls and commands.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.2.0 330 11/14/2023
4.1.0 255 10/4/2023
4.0.5 271 9/15/2023
4.0.4 232 8/7/2023
4.0.3 138 7/31/2023
4.0.2 156 7/25/2023
4.0.1 144 7/21/2023
4.0.0 154 7/20/2023
3.3.3 1,049 2/26/2023
3.3.2 241 2/24/2023
3.3.1 215 2/23/2023
3.3.0 218 2/22/2023
3.2.2 238 2/16/2023
3.2.1 244 2/14/2023
3.2.0 278 1/20/2023
3.1.0 282 1/16/2023
3.0.0 559 1/28/2022
2.1.0 1,407 11/11/2021