Workes.ConsoleSystem
0.1.0
dotnet add package Workes.ConsoleSystem --version 0.1.0
NuGet\Install-Package Workes.ConsoleSystem -Version 0.1.0
<PackageReference Include="Workes.ConsoleSystem" Version="0.1.0" />
<PackageVersion Include="Workes.ConsoleSystem" Version="0.1.0" />
<PackageReference Include="Workes.ConsoleSystem" />
paket add Workes.ConsoleSystem --version 0.1.0
#r "nuget: Workes.ConsoleSystem, 0.1.0"
#:package Workes.ConsoleSystem@0.1.0
#addin nuget:?package=Workes.ConsoleSystem&version=0.1.0
#tool nuget:?package=Workes.ConsoleSystem&version=0.1.0
Workes.ConsoleSystem
Workes.ConsoleSystem is an engine-neutral .NET package for building an in-game or tool-facing console around one shared chronological history.
It provides the console root, configuration, logging facade, entry model, command registration and execution, command parsing and validation, stateless autocomplete, structured failures, and semantic command output.
Highlights
- Create one
ConsoleManagerto coordinate console state. - Configure parsing, history, optional formatting, and execution defaults through
ConsoleManagerOptions. - Configure autocomplete path behavior for whole-path or dot-segment completion.
- Write log messages into a bounded shared chronological
ConsoleHistory. - Keep bounded command input history separate from the rendered console entry stream.
- Register immutable command definitions without binding the package to a specific UI or engine.
- Execute registered commands through one manager-owned runtime flow.
- Parse registered commands into structured success/failure results and typed command state.
- Validate parsed commands against option rules and typed constraints.
- Get stateless autocomplete candidates for paths, flags, options, and command-provided values.
- Branch on package-wide structured failures instead of parsing messages.
- Return semantic command output with plain text derivation and style IDs.
- Opt into package-managed markup, themes, and Unity/Godot formatters when a host wants them.
Installation
Install the package from NuGet:
dotnet add package Workes.ConsoleSystem --version 0.1.0
Or add a package reference:
<PackageReference Include="Workes.ConsoleSystem" Version="0.1.0" />
The package targets .NET Standard 2.1.
Quick Example
using Workes.ConsoleSystem.Commands;
using Workes.ConsoleSystem.Core;
using Workes.ConsoleSystem.Entries;
var console = new ConsoleManager();
console.LogInformation("Console ready.");
console.RegisterCommand(new CommandBuilder("noclip")
.SuccessOutputInline("Noclip enabled.", defaultStyle: "Success")
.Execute(ctx => new CommandResult())
.Build());
if (!console.TryExecuteCommand("noclip", out CommandResult result))
{
Console.WriteLine(result.Failure!.Message);
}
foreach (var entry in console.History.Entries)
{
if (entry is LogEntry log)
{
Console.WriteLine($"[{log.Level}] {log.Message}");
}
}
See the Quick Start for the beginner-first walkthrough.
Documentation
Start here:
Focused guides:
- ConsoleManager
- Configuration
- Console History
- Console UI Integration
- Command History
- Command Registration
- Command Execution
- Command Parsing
- Command Validation
- Command Autocomplete
- Failure Handling
- Command Results And Output
- Formatting
See the Changelog for release history and migration-sensitive changes.
The repository also contains executable examples under tests/Examples for logging/history, command execution, formatting, and autocomplete.
License
Workes.ConsoleSystem is available under the MIT License.
| 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. 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. |
| .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. |
-
.NETStandard 2.1
- 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 |
|---|
First public release of the engine-neutral console MVP: ConsoleManager, bounded history, logging, command registration, parsing, validation, synchronous execution, autocomplete, structured failures, semantic command output, and optional Unity/Godot/plain text formatting.