SoftShell 0.2.3
dotnet add package SoftShell --version 0.2.3
NuGet\Install-Package SoftShell -Version 0.2.3
<PackageReference Include="SoftShell" Version="0.2.3" />
paket add SoftShell --version 0.2.3
#r "nuget: SoftShell, 0.2.3"
// Install SoftShell as a Cake Addin #addin nuget:?package=SoftShell&version=0.2.3 // Install SoftShell as a Cake Tool #tool nuget:?package=SoftShell&version=0.2.3
SoftShell
This free .NET Standard library provides a built-in command shell in your application for various monitoring or manipulation tasks.
Through a terminal interface, such as the console or Telnet (unencrypted!), it is possible to log in and get a shell-like experience with login, command prompt and various commands that can be issued.
Standard commands, such as 'help' and 'exit' exist and more will probably come. Each application can add custom commands or terminal interfaces.
Usage
When the user has signed in, a >
command prompt is shown. Commands can then be entered as in the following examples:
help
asm|more
env > variables.txt
exit
Integrating in your app
// Create the SoftShell host with core commands
using (var shellHost = new SoftShellHost(UserAuthentication.None)) // or create your own user authentication class
{
// Add your custom commands needing special construction
shellHost.AddCommand("myapp", "My Application", new MyCustomCommand1(someArgs));
shellHost.AddCommand("myapp", "My Application", new MyCustomCommand2(someArgs));
...
// Add your remaining custom commands having default constructors
shellHost.AddCommands("myapp", "My Application", Assembly.GetExecutingAssembly());
// Support both the console and Telnet terminals
using (var consoleListener = shellHost.AddTerminalListener(ConsoleTerminalListener.Instance))
using (var telnetListener = shellHost.AddTerminalListener(
new TelnetTerminalListener(IPAddress.Loopback, 23))) // localhost port 23 as example
{
// While your application runs...
}
}
See the ConsoleDemo1 application in the solution for further details.
Creating custom commands
Besides the core commands that come with SoftShell you can create your own custom commands.
Contribution
Any help developing this library is welcomed.
Ideas for additions and improvements:
- Additional commands
- New terminal interfaces (e.g. web, SSH)
- General improvements
- Documentation and demo projects
- Unit tests
- Publicity (blogs posts etc.)
Feature requests and bug reports
If you discover any bugs or have suggestions for improvements, please report them here.
Disclaimer
The library is under MIT License and provided as-is without any kind of warranty. See the LICENSE file for conditions.
Product | Versions 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. net9.0 was computed. 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. |
.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. |
-
.NETStandard 2.0
- System.Collections.Immutable (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Commands always in lowercase. Clearing screen now works.