5 ms·
Terminal.Gui – Cross Platform Terminal UI Toolkit for .NET
- copperx 4y agoI love TUIs, mainly because they emphasize keyboard control. This looks much more usable than directly using ncurses!!!
- LandR 4y agoUsed this in a project last week, works really well. I like the calculated positioning system and docs with examples of all the controls!
- tomcam 4y agoBy the creator of Mono, the first prominent multi platform .NET clone, Xamarin, a forms package (both acquired by Microsoft), and tons of work on GNOME.
- encryptluks2 4y agoThere are so many Go and Rust TUI apps that I've used that look so much better than this. This reminds me of something straight out of MS-DOS. I've also yet to find a single .NET application that wasn't sluggish on Linux. Jellyfin, Emby, Jackett, etc all take like 5 seconds to start while Go apps take a few milliseconds.
- fuzzzerd 4y agoProbably the JIT, I expect this will improve with ahead of time compiling in the newer dotnet sdks.
- ripley12 4y agoFWIW, whenever I've profiled startup of .NET apps the JIT is pretty fast to start up. The only times I've noticed slow startup on recent .NET versions is with WPF apps, and that seems to be mostly because WPF does so much work on startup.
- zigzag312 4y agoIf I'm not mistaken, use of reflection on startup is a major contributor to slow startup. NativeAOT is both JIT free and reflection free.
- neonsunset 4y agoNativeAOT has multiple reflection compatibility modes because most code bases rely on it one way or another. Reflection-free mode works in a limited set of scenarios but greatly reduces the binary size since the compiler and linker can reason much better about which parts of the code they can trim away during compilation.
- zigzag312 4y agoI didn't know about reflection compatibility modes. Thanks! I hope source generators will eventually replace reflection from most libraries, so that reflection-free mode can become more mainstream.
- oaiey 4y agoI am looking right now for terminal ui toolkit. Can you elaborate on these in Go/Rust?
- encryptluks2 4y agoSo for Rust... Zellij, gitui, taskwarrior-tui, to name a few. For Go... cointop is one app I can think of off the top of my head. Bubbletea is an excellent framework: https://github.com/charmbracelet/bubbletea https://github.com/charmbracelet/bubbletea
- oaiey 4y agoOh I am so sorry. I just realized you mentioned "apps" not terminal frameworks. My apologies for creating effort. I think the choice of using blue background is a really horrible one :) Bubble tea seems in a slightly different space .. more like Python rich or .NETs spectre.console.
- selykg 4y ago> Oh I am so sorry. I just realized you mentioned "apps" not terminal frameworks. LOL... I just went and googled all of these and was like "why am I seeing apps... I want the actual dev libraries so I could build my own apps" Guess this explains why I was so confused.
- andrewstuart 4y ago>>There are so many Go and Rust TUI apps that I've used that look so much better than this. Like what?
- ripley12 4y agoI write a lot of .NET software that runs on Linux and for console apps, startup is generally comparable to Go - the impact of the JIT on startup times is greatly exaggerated in my experience. I'm less familiar with startup times for ASP.NET services, maybe that's the difference.
- bitwize 4y agoIt's from Miguel de Icaza, the creator of Midnight Commander. Of course it looks like MS-DOS. That's the whole point.
- masterofmisc 4y agoI actually kinda like the style but maybe thats just the nostalgia talking!
- viraptor 4y agoThese are pretty big servers with quite a few features. I haven't seen comparable implementations in go. Are you comparing them to go apps of similar complexity? Also, I'm not sure what you count as startup specifically, but are you sure they're not just doing valid work up front? Servers would normally optimise responses vs startup time.
- sandreas 4y agoThank you! I'm currently using spectre.console[1] for my audio tagger[2] but although it supports "live" refreshing [3], this one seems better to build a real UI and less simple command line app centric. Maybe I'll give it a try for the next TUI project on my list ;) [1]: https://spectreconsole.net/ https://spectreconsole.net/ [2]: https://github.com/sandreas/tone https://github.com/sandreas/tone [3]: https://spectreconsole.net/live/ https://spectreconsole.net/live/
- oaiey 4y agoA big caveat of Terminal.Gui is that it currently only work full screen. Which is not for everyone. I find myself exactly split between spectre.console and terminal.gui for that reason. There is an issue on topic in Terminal.Gui.
- lewispollard 4y agoWhat do you mean exactly by full screen? I imagine that like most terminal applications you could just use tmux to put it in a pane.
- oaiey 4y agoAh. Yes, that may work but I am more like: i activate the program and then use the next ten lines in the terminal to display my 3 input boxes and not all 20 lines the terminal can use. And when I exit the program I am still in the session above and below.
- lewispollard 4y agoAh, is that a Windows thing? I've never done that in Linux, I think, without tmux or something.
- oaiey 4y agoNope it is not. It should be terminal thing in general. On a much more abstract way, Microsoft tries something similar by embedding apps (as in Excel) to be hosted in Teams (aka chat).
- longrod 4y agoLooks like I am installing Windows. One thing that has kept me away from getting into .NET terminal & desktop apps is the binary size. Even a hello world app is quite big compared to Go, Rust etc.
- kevingadd 4y agoThis confuses me - I have a .net app with useful functionality that I wrote in 2007 and it's a 24kb EXE file with no dependencies other than the runtime. Are you using heavy weight libraries/packages?
- lewispollard 4y ago> it's a 24kb EXE file with no dependencies other than the runtime Presumably they're publishing it as a framework independent binary, which includes the runtime
- viraptor 4y agoYou've got a few options. 1. Every windows 10 these days will have .net framework 4.8, so you can ship just your app. If you're going core, you could try .net 7 and assembly trying + ReadyToRun - I'm not sure how much that's saving but it's supposed to be much better than .net 6 which failed in that case.
- asabla 4y agoWell it depends on how you publish your application. Example: dotnet publish -c Release -r linux-x64 --self-contained -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:DebugType=None -p:DebubSymbols=false Will produce a single file which (with only Hell world) is around 62MB. While: dotnet publish -c Release -r linux-x64 --no-self-contained -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:DebugType=None -p:DebubSymbols=false (Notice --no-self-contained), will produce a single file which should be around 146KB. So it all comes down to including the whole runtime or not while publishing. And then there is AOT (Ahead of time) option for the upcoming .Net 7, which will reduce self-contained files significantly. Ref: https://devblogs.microsoft.com/dotnet/announcing-dotnet-7-preview-3/#prepare-your-apps-for-native-aot https://devblogs.microsoft.com/dotnet/announcing-dotnet-7-pr...
- ossusermivami 4y agoI swear console tui libraries has been all the rage lately, seems like since we went beyond ncurses or [newt](https://en.wikipedia.org/wiki/Newt_(programming_library) https://en.wikipedia.org/wiki/Newt_(programming_library)) there is a new renaissance of tui based software and libraries
- oaiey 4y agoI think many devs are really sick of writing 200 hours on 50 files with 20 tools for achieving 2 input boxes. There is a wish for simplicity in UI building no framework can offer (including the terminal ones).
- bob1029 4y agoThis is us. We had a conversation last week about how much boilerplate bullshit is required to get our biz UI to the users eyeballs. We are going to investigate developing some domain specific language / fluent interface to accelerate our efforts. Something like this constrained terminal UI experience could be exactly what we need to enable this path sooner than later. My current alternative is to handcraft a bunch of parameterized HTML UI components.
- oaiey 4y agoI went down to bare basics in my thoughts: what do we need for an exchange between machines and brains: data bidirectional and commands from human to machine. A surface is basically data + commands. Add some minimalistic styling free horizontal, vertical and z-level stacking plus some stereotypes and you can meaningful interact. The trick now is: rendering in fancy UI can be either provided by a designer (the old dream) or by an AI/algorithm depending on the actual UI (voice, screen, small screen, console, ...) either by smartness or by learning from how the users arrange the output. But never by the program/developer itself. When you look at the scifi designs .. you will realize: very simple UI (ok they never cover complex shit, but at least they have an idea how to simple do stuff)
- 4y ago
- masterofmisc 4y agoDoes this gui framework, work with the old windows Command Prompt or do you need to use the new Windows Terminal? I am just wondering for running on servers that dont have the new Terminal yet.
- hestefisk 4y agoLooks awesome. Now to reimplement Midnight Commander in C#…
- qwerty456127 4y agoSo lovely OMG. I love TUIs. I once discovered a DOS version of Visual Basic - that was so cool. If this is something like WPF but for cross-platform .Net console then I feel so excited I can hardly even think...
- ciupicri 4y agoWas it Visual Basic or QBasic?
- qwerty456127 4y agoI mean VisualBasic for DOS. It was exactly what one would expect a VisualBasic to be - a visual draw-and-click RAD IDE for pseudographic windowed event-driven TUI apps. It apparently was rather exotic while QuickBasic/QBasic were very well known.
- UltraViolence 4y agoI don't see the need for this. Character based UI's have long since disappeared from mainstream and here de Icaza is spending time and effort creating a mouse-based character UI?
- CyMonk 4y agothere is also a port of the "original": https://github.com/magiblot/tvision https://github.com/magiblot/tvision A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.