Is there a package to construct TUI in Julia?


#1

Hi guys!

Is there any package to build text user interfaces in Julia?

I saw some NCurses wrappers but all old and does not seem to work anymore.

The good side of a TUI is that, just like UnicodePlots, it should work 100% of time even through ssh.


#2

#3

I saw that, but I want something complete like ncurses. So that we can have “full applications” in text mode. Something like midnight commander interface for example.


[WIP] Building text user interfaces in Julia using NCURSES
#4

One possibility is to create a Julia package which writes shell scripts such as this one


#5

Yeah that is a possibility…

However, wouldn’t it be nice to have a way to build simple TUIs natively? I will do some tests, maybe I can make a proof of concept.


#6

Of course it would be nice — someone just has to put in the work.

That said, supporting various terminals correctly is a nightmare — some are compliant, some aren’t, and a lot of workarounds are necessary. ncurses embodies a lot of accumulated knowledge about this, which a native library would have to replicate.

These days for anything more complicated than what is supported by TerminalMenus.jl I would simply go with a browser-based interface — much less work, and much more portable.


#7

Have a look at termbox: https://github.com/jgoldfar/Termbox.jl
It features a simpler API compared to ncurses.


#8

I see. So I will try to code yet another Ncurses wrapper that works on 1.0. All the others seem dead unfortunately


#9

I think what I said above may be a reason for this.


#10

but a wrapper to libncurses wouldn’t be much simpler? do you see any major problems of maintaining something like this?


#11

Depends on your budget for time and effort. A simple wrapper should not be too difficult, but a layer that interfaces more idiomatically with Julia could be more of a time investment. I don’t want to talk you out of it if you want to do this, just wanted to point out that the payoff/effort ratio may not make it the best choice for an UI.


#12

My use case seems very specific. I need to access workstations at my institute using ssh, and having a TUI to see and configure things for simulations would be very nice.