Matthias77.CliUi 1.0.17

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

// Install Matthias77.CliUi as a Cake Tool
#tool nuget:?package=Matthias77.CliUi&version=1.0.17

CliUI - a simplified command line (interface) user interface

How does it work

It maintains a dictionary with complete command lines as keys and actions/priority as values. New commands can be added as a result of a command and also commands can be removed.

When idle, the loop waits for available keypresses and then locks Console.Out. If a lock can be obtained, it will display the list of commands that match. A cursor can be used to select a command. By pressing enter, the command is carried out in the foreground. The command itself can start a background task.

Programming it

One obtains an instance of the CmdLineUi.Instance. One can then add commands using the Add function before entering CommandLoop.

Using it

After the program starts, it enters the CommandLoop. After pressing the first key, the UI presents a limited list of commands that contain the key. Further keypresses further limits the list only containing commands that have those keys in that order. Once can use the cursor keys to select the right command.

Locking Console.Out

Background jobs must not interfere with a user dialog from another command. Hence, output should only happen, when the user interface is idle.

A lock might be obtained, once the UI is idle again. But then the keystrokes might have been used and nothing needs to be processed.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.
  • .NETStandard 2.0

    • No dependencies.

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.19 238 10/23/2023
1.1.18 111 10/18/2023
1.1.17 120 10/11/2023
1.1.16 127 10/6/2023
1.1.15 119 10/2/2023
1.1.14 112 9/30/2023
1.1.13 106 9/23/2023
1.1.12 99 9/23/2023
1.1.11 100 9/23/2023
1.1.10 111 9/23/2023
1.1.9 119 9/23/2023
1.1.8 117 9/23/2023
1.1.7 105 9/23/2023
1.1.6 115 9/23/2023
1.1.5 113 9/23/2023
1.1.4 105 9/19/2023
1.1.3 103 9/18/2023
1.1.2 108 9/18/2023
1.1.1 107 9/18/2023
1.1.0 111 9/18/2023
1.0.18 130 9/15/2023
1.0.17 121 9/15/2023
1.0.16 121 9/11/2023
1.0.15 111 9/11/2023
1.0.14 135 9/9/2023
1.0.13 121 9/9/2023
1.0.12 118 9/6/2023
1.0.11 114 9/3/2023
1.0.10 121 9/2/2023