Promptly 1.0.4

dotnet add package Promptly --version 1.0.4
                    
NuGet\Install-Package Promptly -Version 1.0.4
                    
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="Promptly" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Promptly" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Promptly" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Promptly --version 1.0.4
                    
#r "nuget: Promptly, 1.0.4"
                    
#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.
#:package Promptly@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Promptly&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Promptly&version=1.0.4
                    
Install as a Cake Tool

Promptly

A modern, feature-rich C# library for building beautiful and interactive console applications with ease.

Overview

Promptly is a comprehensive toolkit designed to simplify console application development in C#. It provides a clean, organized set of utilities for creating professional-looking menus, handling user input, displaying progress indicators, and managing console output with style.

Features

  • Interactive Menus: Create styled menus with customizable appearance, disabled options, and flexible navigation
  • Input Validation: Robust input handling with type-safe readers and validation utilities
  • Progress Indicators: Multiple animation styles including dots, spinners, and progress bars
  • Message System: Colored output messages with support for success, warning, and error states
  • Utility Functions: Common console operations like screen clearing, confirmations, and pause prompts

Installation

NuGet

.NET CLI

dotnet add package Promptly

NuGet Package Manager

Install-Package Promptly

PackageReference (Manual)

Add this to your .csproj file:

<ItemGroup>
  <PackageReference Include="Promptly" Version="1.0.4" />
</ItemGroup>

Package URL: https://www.nuget.org/packages/Promptly/

Quick Start

using Promptly.UI;
using Promptly.Output;
using Promptly.Input;
using Promptly.Utilities;

namespace MyConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Common.ClearScreen("Welcome to My App");
            
            int choice = Menu.Show("Main Menu", new[] 
            { 
                "Start Process", 
                "View Settings", 
                "Help" 
            });
            
            switch (choice)
            {
                case 1:
                    MessageWriter.WriteSuccess("Process started!");
                    ProgressIndicator.ShowLoader("Processing");
                    break;
                case 2:
                    MessageWriter.WriteMessage("Opening settings...");
                    break;
                case 3:
                    MessageWriter.WriteMessage("Help documentation...");
                    break;
                case 0:
                    MessageWriter.WriteMessage("Goodbye!");
                    return;
            }
            
            Common.Continue();
        }
    }
}

Documentation

Basic Menu
int choice = Menu.Show("Choose an option", new[] { "Option 1", "Option 2", "Exit" });
Styled Menu with Configuration
MenuConfig config = new() 
{
    Style = MenuStyle.Boxed,
    TitleColor = ConsoleColor.Cyan,
    AllowEscape = true
};

int choice = Menu.Show("Settings Menu", options, config);
Advanced Menu with Descriptions
MenuOption[] options =
[
    new("Process Data", "Processes the uploaded data files"),
    new("Generate Report", "Creates a summary report"),
    new("Advanced Settings", "Configure advanced options") { IsEnabled = false }
];

int choice = Menu.Show("Advanced Menu", options);

Input Handling

Basic Input
string name = InputReader.ReadInput("Enter your name: ");
string age = InputReader.ReadInt("Enter your age: ", 1, 120);
string email = InputReader.ReadRequiredInput("Enter email: ");
Input Validation
if (InputValidator.IsValidEmail(email))
{
    MessageWriter.WriteSuccess("Valid email address!");
}

Progress Indicators

Simple Loader
ProgressIndicator.ShowLoader("Loading data");
Spinner Animation
ProgressIndicator.ShowSpinner("Connecting to server", 3000);
Progress Bar
for (int i = 0; i <= 100; i++)
{
    ProgressIndicator.ShowProgressBar(i, 100);
    Thread.Sleep(50);
}

Message Output

Colored Messages
MessageWriter.WriteSuccess("Operation completed successfully!");
MessageWriter.WriteWarning("This action cannot be undone.");
MessageWriter.WriteError("Connection failed. Please try again.");

Utility Functions

Screen Management
Common.ClearScreen("Application Header");
Common.Continue(); // Press any key to continue
User Confirmation
if (Common.Confirm("Are you sure you want to delete this file?"))
{
    // Perform deletion
}

Configuration Options

  • MenuStyle.None - No styling
  • MenuStyle.Simple - Simple separator lines
  • MenuStyle.Boxed - Unicode box characters
  • MenuStyle.Minimal - Minimal styling with underlines

Progress Styles

  • ProgressStyle.Dots - Animated dots
  • ProgressStyle.Spinner - Rotating spinner
  • ProgressStyle.Bar - Progress bar with percentage
  • ProgressStyle.Percentage - Percentage only

Message Types

  • MessageType.Info - Standard information
  • MessageType.Success - Success notifications
  • MessageType.Warning - Warning messages
  • MessageType.Error - Error notifications

Requirements

  • .NET 9.0 or later
  • C# 10.0 or later

Project Structure

Promptly/
├── Models/
│   └── MenuOption.cs
├── UI/
│   ├── Menu.cs
│   └── MenuStyles.cs
├── Input/
│   ├── InputReader.cs
│   └── InputValidator.cs
├── Output/
│   ├── MessageWriter.cs
│   └── ProgressIndicator.cs
└── Utilities/
    └── Common.cs

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Bradley Deans GitHub: @deans-bradley

Contributing

This project is currently closed to contributions. However, feel free to fork the repository for your own use and modifications.

Changelog

Version 1.0.4

  • Fix icon packaging path issue for NuGet package
  • Add Promptly icon to package

Version 1.0.3

  • Add Promptly icon to .csproj
  • Initial release with core functionality
  • Menu system with multiple styling options
  • Input validation and handling
  • Progress indicators and animations
  • Message output with color support
  • Common utility functions
Product Compatible and additional computed target framework versions.
.NET 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.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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
1.0.4 332 9/23/2025
1.0.0 204 9/23/2025