ConsoleHero 0.5.0

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

// Install ConsoleHero as a Cake Tool
#tool nuget:?package=ConsoleHero&version=0.5.0                

ConsoleHero

This project started as a lightweight Menu organizer. It's turned into a static data, architecture engine. It still makes menus easily but it also allows you to quickly spin up and mock architecture for any project.

DI and Source Gen

You get basic DI without any additonal lines of Code. Label a class with the [Singleton] attribute and it becomes a single, globally seen object. Any other [Singleton] class can accept a Singleton in it's constructor and everything fits together.

Additionally, using the new IContent<T> interface along it's companion INamed interface, gives you a simple way to have global access to all your static data.

Allowing you to do something like this from anywhere in your code:

Creature goblin = GlobalSettings.Get<Creatures>().Goblin;

Ideally you'd use the DI feature to pass the Creatures Singleton to other Singletons at runtime, but GlobalSettings.Get works as a less performant alternative that won't crash with circular dependancies.

Video Examples Coming SOON!

Star or Watch this repo to stay up to date. I'll be creating example videos and additional content soon. It's honestly quite amazing how simple you can quickly mock up architecture. Or even convert existing projects to use ConsoleHero.

Types of Nodes

The backbone of the library. Menus take a fluent approach to options and do all the heavy lifting with console printing and handling for you. Invalid inputs, numbering the options, coloring the text and formalizing everything into a neat, fluent builder.

Paragraph

A simple way to store text information. No more Console.Writeline peppering your codebase. Create a few paragraphs and call them intuitively from another Node.

Request

The obvious input requirement. Menus only get you so far. Eventually you need to request a string from the user like their name or a date. Or how many iterations to loop. This is where requests come in. Quickly create an intuitive user end-point with a few lines of fluent code.

Tune

Who doesn't like a beep or audio queue in their menus? Uses enums and a builder to make note generation intuitive. You can still include custom frequencies but more often then not, you're using a quick Quarter B note or a Half D.

Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.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
0.5.0 42 1/23/2025
0.4.8 45 1/22/2025
0.4.7 62 1/21/2025
0.4.6 64 1/21/2025
0.4.5 60 1/20/2025
0.4.4 67 1/20/2025
0.4.3 60 1/20/2025
0.4.2 66 1/20/2025
0.4.1 59 1/20/2025
0.3.10 67 1/16/2025
0.3.9 57 1/13/2025
0.3.8 59 1/13/2025
0.3.7 57 1/13/2025
0.3.6 63 1/13/2025
0.3.5 142 12/5/2024
0.3.4 100 12/5/2024
0.3.3 98 12/4/2024
0.3.2 98 12/4/2024
0.3.1 95 12/3/2024
0.3.0 101 12/3/2024
0.2.1 96 11/14/2024
0.2.0 101 11/14/2024
0.1.7 91 11/5/2024
0.1.6 97 11/5/2024
0.1.5 93 11/4/2024
0.1.4 97 10/28/2024
0.1.3 100 10/27/2024
0.1.2 91 10/24/2024
0.1.1 92 10/23/2024
0.1.0 96 10/23/2024
0.0.6 98 10/13/2024
0.0.5 104 10/11/2024