Make your .NET console applications beautiful and interactive with EasyConsole! This library provides an enhanced set of console UI components and utilities.
dotnet add package ImGajeedsEasyConsole
using ImGajeedsEasyConsole.Components;
EConsole.WriteLine("Hello World", new Color(ConsoleColor.Green));
// Single line with color
EConsole.WriteLine("Success!", new Color(ConsoleColor.Green));
// Set color for multiple lines
EConsole.SetColor(new Color(ConsoleColor.Blue));
EConsole.WriteLine("This text is blue");
EConsole.WriteLine("This one too!");
var password = EConsole.ReadPassword("Enter password: ");
var answer = EConsole.BoolQuestion("Would you like to continue?");
var options = new[] {
"Start Game",
"Settings",
"Exit"
};
var selectedIndex = EConsole.SelectOption(options);
var fields = new[] {
"Username",
"Email",
"Location"
};
var values = EConsole.Form(fields);
Color Class// Set foreground color only
var color = new Color(ConsoleColor.Blue);
// Set both foreground and background
var color = new Color(ConsoleColor.White, ConsoleColor.DarkBlue);
// Get current colors
var currentColor = EConsole.GetColor();
// Set new colors
EConsole.SetColor(new Color(ConsoleColor.Green));
// Reset to default
EConsole.ResetColor();
// Write without line break
EConsole.Write("Loading...", new Color(ConsoleColor.Yellow));
// Write with line break
EConsole.WriteLine("Complete!", new Color(ConsoleColor.Green));
// Simple input
var name = EConsole.ReadLine("Enter your name: ");
// Single key input
var key = EConsole.ReadKey();
// Secure password input
var password = EConsole.ReadPassword("Password: ");
// Email input with validation
var email = EConsole.ReadEmail("Email: ");
// Get/Set cursor position
EConsole.CursorTop(0);
var left = EConsole.CursorLeft();
// Clear specific line
EConsole.ClearLine(5);
// Clear entire screen
EConsole.Clear();
// Overwrite line contents
EConsole.OverwriteLine(3, "New content");
var fields = new[] {"Name", "Email", "Phone"};
var values = EConsole.Form(fields);
var options = new[] {"Option A", "Option B", "Option C"};
var selected = EConsole.SelectOption(options);
var isValid = EConsole.IsValidEmail("user@example.com");
var verified = EConsole.OptVerification(
toEmail: "user@example.com",
fromEmail: "your-app@gmail.com",
appPassword: "your-google-app-password"
);
Contributions are welcome! Feel free to submit issues and pull requests.
This project is licensed under the MIT License - see the license file for details.
Have questions? Contact me on Discord: @ImGajeed76
Made with ❤️ by Oliver Seifert
EasyConsole is A .NET library for beautiful and interactive console applications with colorful UI components, forms, menus, and secure input handling.. It is built with C# and maintained by Oliver Seifert.
EasyConsole is primarily written in C# (100% of the codebase).