You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**SharpConsoleUI** is a modern .NET 9 TUI framework that combines Spectre.Console's rich markup with true multi-window capabilities. **Cross-platform from the ground up.** Each window can run on its own dedicated thread, updating independently without blocking others. **Build beautiful UIs with familiar [markup] syntax everywhere.** No complex styling APIs, just `[bold red]text[/]` and it works. The double-buffered console driver built on .NET's native Console API eliminates flicker and ensures smooth rendering. **Any Spectre.Console widget (Tables, BarCharts, Trees, Panels) works as a window control.** Wrap any `IRenderable` and it just works. Direct CharacterBuffer access with PreBufferPaint/PostBufferPaint hooks lets you build custom rendering, visual effects, or even games (the Snake example renders its canvas this way). Fluent builders for windows, controls, and layouts.
16
+
**SharpConsoleUI** is a multi-window TUI framework for .NET 9 that combines Spectre.Console's rich markup with true overlapping window capabilities. Cross-platform (Windows, Linux, macOS).
17
17
18
-
> **Note:** This project is still in early days — work in progress and not production-stable yet. Feedback and contributions welcome.
18
+
-**Multi-window with per-window threads** — each window updates independently without blocking others
19
+
-**Spectre.Console markup everywhere** — just `[bold red]text[/]` and it works, no complex styling APIs
20
+
-**Any Spectre.Console widget works as a control** — Tables, BarCharts, Trees, Panels — wrap any `IRenderable`
21
+
-**Double-buffered, flicker-free rendering** with dirty region tracking
22
+
-**30+ built-in controls** — buttons, lists, trees, tables, text editors, dropdowns, menus, tabs, and more
23
+
-**Compositor effects** — PreBufferPaint/PostBufferPaint hooks for custom rendering, transitions, or even games
24
+
-**Fluent builders** for windows, controls, and layouts
19
25
20
26
**Visit the project website: [nickprotop.github.io/ConsoleEx](https://nickprotop.github.io/ConsoleEx/)**
21
27
@@ -27,10 +33,6 @@
27
33
28
34
*SharpConsoleUI in action - rich controls, multiple windows, smooth gradients, real-time updates, and full-screen capabilities*
29
35
30
-
## Development Notes
31
-
32
-
SharpConsoleUI was initially developed manually with core windowing functionality and double-buffered rendering. The project evolved to include modern features (DOM-based layout system, fluent builders, plugin architecture, theme system) with AI assistance. Architectural decisions and feature design came from the project author, while AI generated code implementations based on those decisions. The development process involved code generation, review sessions, debugging, and manual refinements. This collaborative approach enabled rapid iteration on complex features while maintaining architectural coherence.
|**Advanced**| SpectreRenderableControl (wraps any Spectre.Console `IRenderable`), ProgressBarControl, TerminalControl |
124
104
125
105
## API Usage
126
106
@@ -650,7 +630,7 @@ See the [Compositor Effects Guide](https://nickprotop.github.io/ConsoleEx/docfx/
650
630
651
631
**Status**: Fixed. On Unix, SharpConsoleUI bypasses .NET's Console infrastructure entirely using raw libc I/O for both input (`read` from stdin fd 0) and output (`write` to stdout fd 1). The terminal is put into raw mode via `tcgetattr`/`tcsetattr`, and `Console.Out` is redirected to `/dev/null` to prevent any .NET runtime code from touching terminal settings. This eliminates the echo leak at its root.
652
632
653
-
**Root cause**: .NET's `ConsolePal.Unix` calls `tcsetattr`on virtually every `Console.*` access — not just `ReadKey`, but also `SetCursorPosition`, `CursorVisible`, `WindowWidth`, and even `OutputEncoding`. Each call briefly toggles the ECHO flag, creating windows where raw ANSI sequences leak to the screen.
633
+
**Root cause**: .NET's `ConsolePal.Unix` calls `tcsetattr`when `Console.ReadKey`/`KeyAvailable` is used, briefly toggling the ECHO terminal flag. During these brief windows, raw ANSI input sequences (especially mouse reports) leak to the screen as visible garbage characters.
654
634
655
635
**Solution approach inspired by [Terminal.Gui v2](https://github.com/gui-cs/Terminal.Gui)**, which solved the same problem by avoiding all .NET Console APIs on Unix. The fix can be disabled via `ConsoleWindowSystemOptions(UseDirectAnsi: false)` to fall back to .NET Console APIs if needed.
656
636
@@ -700,15 +680,17 @@ ConsoleEx/
700
680
│ ├── Helpers/ # Utility classes
701
681
│ ├── Drivers/ # Console abstraction layer
702
682
│ └── Themes/ # Theming system
703
-
├── Examples/ # Example applications
683
+
├── Examples/ # 20 example applications
704
684
│ ├── DemoApp/ # Comprehensive demo
705
685
│ ├── ConsoleTopExample/ # System monitoring dashboard
706
686
│ ├── FullScreenExample/ # Full screen demo
707
687
│ ├── PluginShowcaseExample/# Plugin system demo
708
-
│ ├── AgentStudio/ # Advanced agent demo
709
-
│ ├── MultiDashboard/ # Multi-window dashboard
710
-
│ ├── MenuDemo/ # Menu system demo
711
-
│ └── BorderStyleDemo/ # Border style demo
688
+
│ ├── SnakeGame/ # Snake game (compositor effects)
**Do not use `Console.WriteLine()`, `Console.Write()`, or console logging providers** — they corrupt the UI rendering. Use the built-in `LogService` or file-based logging instead.
777
706
778
707
## License
779
708
780
709
This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details.
781
710
782
711
## Acknowledgments
783
712
784
-
- Built on [Spectre.Console](https://github.com/spectreconsole/spectre.console) for rich console output
785
-
-Inspired by traditional GUI frameworks adapted for console applications
713
+
- Built on [Spectre.Console](https://github.com/spectreconsole/spectre.console) for rich console rendering
714
+
-Unix raw I/O approach inspired by [Terminal.Gui v2](https://github.com/gui-cs/Terminal.Gui)
786
715
787
716
## Documentation
788
717
789
718
Detailed documentation is available in separate guides:
790
719
791
-
-**[Configuration Guide](docs/CONFIGURATION.md)** - Complete system configuration reference
792
-
-**[Status System](docs/STATUS_SYSTEM.md)** - Status bars, window task bar, and Start Menu
793
-
-**[Controls Reference](docs/CONTROLS.md)** - Complete guide to all 25+ UI controls
720
+
-**[Examples Gallery](docs/EXAMPLES.md)** - All examples with screenshots
721
+
-**[Fluent Builders](docs/BUILDERS.md)** - WindowBuilder and control builder APIs
722
+
-**[Controls Reference](docs/CONTROLS.md)** - Complete guide to all 30+ UI controls
794
723
-**[Built-in Dialogs](docs/DIALOGS.md)** - File pickers, folder browsers, and system dialogs
724
+
-**[Configuration Guide](docs/CONFIGURATION.md)** - Complete system configuration reference
795
725
-**[Theme System](docs/THEMES.md)** - Built-in themes, custom themes, and runtime switching
796
-
-**[Plugin Development](docs/PLUGINS.md)** - Creating custom plugins and using the plugin architecture
797
726
-**[State Services](docs/STATE-SERVICES.md)** - Window state, focus, modal, and notification services
798
-
-**[Fluent Builders](docs/BUILDERS.md)** - WindowBuilder and control builder APIs
727
+
-**[Plugin Development](docs/PLUGINS.md)** - Creating custom plugins and using the plugin architecture
728
+
-**[Compositor Effects](docs/COMPOSITOR_EFFECTS.md)** - Buffer manipulation, transitions, and visual effects
729
+
-**[Portal System](docs/PORTAL_SYSTEM.md)** - Floating portals and overlay system
-**[Status System](docs/STATUS_SYSTEM.md)** - Status bars, window task bar, and Start Menu
799
733
800
734
## Links
801
735
@@ -812,9 +746,14 @@ Real-world applications built with SharpConsoleUI:
812
746
|---------|-------------|
813
747
|**[ServerHub](https://github.com/nickprotop/ServerHub)**| A terminal-based control panel for Linux servers and homelabs. Features 14 bundled widgets for monitoring CPU, memory, disk, network, Docker containers, systemd services, and more. Supports custom widgets in any language and context-aware actions. |
814
748
|**[LazyNuGet](https://github.com/nickprotop/lazynuget)**| A terminal-based NuGet package manager for .NET solutions. Search, install, update, and manage NuGet dependencies across projects with multi-source support, dependency tree visualization, and cross-platform binaries. |
749
+
|**[LazyDotIDE](https://github.com/nickprotop/lazydotide)**| A lightweight console-based .NET IDE with LSP IntelliSense, built-in terminal, and git integration. Works over SSH, in containers, anywhere you have a console. |
815
750
816
751
*Using SharpConsoleUI in your project? Open a PR to add it to this list!*
817
752
753
+
## Development Notes
754
+
755
+
SharpConsoleUI was initially developed manually with core windowing functionality and double-buffered rendering. The project evolved to include modern features (DOM-based layout system, fluent builders, plugin architecture, theme system) with AI assistance. Architectural decisions and feature design came from the project author, while AI generated code implementations based on those decisions.
756
+
818
757
---
819
758
820
759
**Made for the .NET console development community**
0 commit comments