ausimian

ausimian

Garnish - A Terminal UI Framework for SSH based applications

Garnish is a Terminal UI Framework based on the Ratatouille view architecture, but adapted for Erlang’s ssh framework.

Sitting on :ssh - as an ssh_cli server channel - allows secure remote access to the Elixir app. The view architecture, shamelessly copied from Ratatouille, enables simple TUI apps to be built, typically for operator/admin experiences (which is the use case I have). Under the covers, the logical render of the view is translated into terminal escape sequences. This is also removes the need for the ex_termbox NIF that Ratatouille required.

I did diverge a little the app model, which I made a little more idiomatic from an OTP perspective, but the view modules and the render/1 callback are exactly as they were in Ratatouille.

This is the initial early release, expect some rough edges. EDIT: Notably, it only supports xterm-256color right now and is untested on other terminals, but it will pretty easy to add others, which I plan to do.

#ui

Most Liked

derek-zhou

derek-zhou

This is so cool! A modern foundation of text BBS and MUD, anyone? I had similar idea awhile back but got intimidated by the amount of work it would require. Thanks again for the library; I will use it in a future project.

Have you connected with the author of Ratatouille? It would make a lot of sense if you can work together to extract out the view layer as a separate library.

Another idea is to fuse the Mosh server with Garnish, so client can connect with mosh client instead of ssh to enjoy roaming, auto-reconnecting, and latency optimization. It will be a lot of work but the benefit is huge.

mlambie

mlambie

I’m using this library on two different projects at the moment, and wanted to share how helpful it’s been. Exposing a TUI dashboard over SSH is tremendously valuable, and I look forward to future developments!

arcanemachine

arcanemachine

Curious to see this project in action, but the Asciinema recording on the GitHub project page seems to have expired.

ausimian

ausimian

Oh I didn’t even realise that was a thing, thx for letting me know

ausimian

ausimian

Garnish is exactly the ratatouille view framework with some module renaming. I spoke to the author and he was happy to see the code reused.

The rendering code is more expensive than I’d like but it’s fine for a few users which is my use-case, so I’m unlikely to invest too much time chasing this down.

Where Next?

Popular in Libraries Top

marcuslankenau
I feel kind of stuck with the absence of a proper xml library for Elixir. Currently I use SweetXML which was ok for me more or less to pa...
New
mathieuprog
Hello :wave: Allow me to introduce you to Tz, an alternative time zone database support to Tzdata. Why another library? First and fore...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
blatyo
https://www.conduitframework.com/ The best overview for how things are tied together is this presentation. Modules and functions are pre...
New
riverrun
I’ve just released version 3 of Comeonin, a password hashing library. The following small changes have been made: changes to the NIF c...
New
aditya7iyengar
Rummage.Ecto and Rummage.Phoenix provide ways to perform Searching, Sorting and Pagination over Ecto queries and Phoenix collections. Fo...
New
Crowdhailer
I have been updating a library that allows you to pipe between functions that use the erlang result tuple convention. Assuming you have...
New
engineeringdept
I’ve just released the first version of Snap, an Elasticsearch client. It borrows ideas about application structure and process managemen...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
bryanjos
Hi, I wanted share a small library we at Revelry Labs made for rendering react components from the server side. There are instructions fo...
New

Other popular topics Top

albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

Sub Categories:

We're in Beta

About us Mission Statement