RazorConsole  by RazorConsole

Build interactive .NET console apps with Razor

Created 3 months ago
1,577 stars

Top 26.3% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

RazorConsole empowers .NET developers to construct sophisticated, interactive console applications by leveraging familiar Razor syntax and the robust Spectre.Console library. It offers a component-based architecture, enabling rich UIs with data binding, event handling, and dynamic elements, thereby streamlining the development of advanced terminal interfaces and enhancing developer productivity.

How It Works

The project integrates the .NET Razor engine for UI component definition, akin to web development, with Spectre.Console for rendering and interactivity within the terminal. This approach facilitates a component-based architecture supporting data binding, event handling, and component lifecycles, allowing for complex, interactive UIs with managed focus, styling, and layout.

Quick Start & Requirements

  • Installation: Install the core package via dotnet add package RazorConsole.Core.
  • Project Setup: Projects require the Microsoft.NET.Sdk.Razor SDK in their .csproj file.
  • Prerequisites: .NET 8.0 or .NET 9.0.
  • Exploration: An interactive Component Gallery tool (dotnet tool install --global RazorConsole.Gallery) is available for hands-on component demonstration.
  • Examples: Complete sample applications are provided in the examples/ folder.

Highlighted Details

  • Component-Based UI: Develop console UIs using Razor components, supporting data binding, event handling, and lifecycle methods.
  • Interactive Elements: Features interactive components like buttons, text inputs, and selectors with automatic focus management.
  • Rich Component Library: Includes over 15 pre-built components for layout, input, display, and utilities, wrapping Spectre.Console constructs.
  • Hot Reload: Supports live UI updates without application restarts, accelerating development cycles.
  • Component Gallery: An interactive tool allows live demonstration and exploration of all available components.

Maintenance & Community

Issues can be filed via GitHub Issues. No specific community channels (like Discord/Slack) or prominent maintainer/sponsor information is detailed in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Compatible with .NET 8.0 and 9.0. The MIT license permits commercial use and integration into closed-source projects.

Limitations & Caveats

The interactive Component Gallery tool is currently in alpha (0.0.3-alpha.4657e6), suggesting potential instability or ongoing development. Repository cloning requires Git LFS to be installed for media and archive files.

Health Check
Last Commit

5 days ago

Responsiveness

Inactive

Pull Requests (30d)
15
Issues (30d)
8
Star History
39 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.