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

scohen
Lexical Lexical is a next-generation language server for the Elixir programming language. Features Context aware code completion As-you...
New
seancribbs
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
treble37
Just looking for a little feedback on a tiny helper library I built - Sometimes I find the need to convert maps with atom keys to maps...
New
pkrawat1
Presenting Aviacommerce, open source e-commerce platform in Elixir Aviacommerce is an open source e-commerce platform in Elixir. We at...
New
josevalim
EDIT: since Ecto 3.0 final version is out, this post was amended to use the final versions in the instructions below. Hi everyone, We a...
New
asiniy
Hey there! I wrote a download elixir package which does exactly what its name about - an easy way to download files. I saw solutions ...
New
benlime
I created a new library GitHub - benvp/ex_cva: Class Variance Authority for Elixir which aims to make it very easy to define different va...
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
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
William
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Sub Categories:

We're in Beta

About us Mission Statement