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.

https://github.com/ausimian/garnish

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.

Last Post!

ausimian

ausimian

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

Where Next?

Popular in Announcing Top

Hal9000
Here is my first stab at this. README pasted below. https://github.com/Hal9000/elixir_random Comments and critiques are welcome. Thank...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54006 488
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 19834 141
New
tmbb
I’ve decided to create this topic to discuss optimization possibilities for something like Phoenix LiveView. I’ve created this topic unde...
144 10789 141
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
dominicletz
Hi, I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130286 1222
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement