pcharbon

pcharbon

A direct-mode Terminal UI framework for Elixir/BEAM, inspired by BubbleTea (Go) and Ratatui (Rust).

TermUI leverages BEAM’s unique strengths—fault tolerance, actor model, hot code reloading—to build robust terminal applications using The Elm Architecture.

Blue Theme Yellow Theme

Features

  • Elm Architecture - Predictable state management with init/update/view

  • Rich Widget Library - Gauges, tables, menus, charts, dialogs, and more

  • Efficient Rendering - Double-buffered differential updates at 60 FPS

  • Themable - True color RGB support (16 million colors)

  • Cross-Platform - Linux, macOS, Windows 10+ terminal support

  • OTP Integration - Supervision trees, fault tolerance, hot code reload

Installation

Add term_ui to your dependencies in mix.exs:

def deps do
  [
    {:term_ui, "~> 0.1.0"}
  ]
end

https://github.com/pcharbon70/term_ui

Showing Posts 1 to 10

kevinschweikert

kevinschweikert

I tried the dashboard example and the refresh did not update the view. Would that be caused by

because the state diff is the same?

pcharbon

pcharbon OP

Yes unfortunately (or fortunately) you cant see the refresh. The rendering process uses two ETS buffers and only render a diff of the previous buffer and the next. I actually spent time trying to figure out why the refresh did not work haha

Note: you can see the past refresh by changing the theme.

AndyL

AndyL

I was able to run all of your examples - no problems. Xubuntu 24.04, Ghostty, Elixir 1.19.3, Erlang 28.2.

(yeah the refresh on the dashboard was funky for me too…)

This looks like great work BRAVO.

fuelen

fuelen

Looks very good :+1:

Schultzer

Schultzer

This looks nice and clean!

pcharbon

pcharbon OP

Yeah looked like a good idea to have a refresh on the dashboard for some reason. I was not expectint to be useless haha. Glad that it all worked, you never know when you publish.

pcharbon

pcharbon OP

Thanks, there are more widgets I want to do and hopefully people can just contribute theirs.
I am considering adding a DSL or some templating sigil maybe.

ghannam80

ghannam80

this looks very nice. I had some monitoring for some legacy systems that is using scripting like tail/sed and grep to alert people about issues based on logs. I wonder if the same can be done using it "time to explore”.

pcharbon

pcharbon OP

You could probably easily transform your scripts to .exs and run them from inside the TUI. I could definitetly see an email library tied into it even. Its elixir so sky is the limit. If you ever make an interesting widget for it, share it back if you can.

pcharbon

pcharbon OP


TermUI v0.2.0

New Widgets

Basic Widgets:

  • TextInput - Single-line and multi-line text input with cursor movement

Overlay Widgets:

  • AlertDialog - Modal dialog for confirmations with standard button configurations
  • ContextMenu - Right-click context menu with keyboard and mouse support

Layout Widgets:

  • Viewport - Scrollable view with keyboard and mouse support
  • SplitPane - Resizable multi-pane layouts for IDE-style interfaces
  • TreeView - Hierarchical data display with expand/collapse

Input Widgets:

  • FormBuilder - Structured forms with validation and multiple field types
  • CommandPalette - VS Code-style command discovery with fuzzy search

Visualization Widgets:

  • BarChart - Horizontal/vertical bar charts for categorical data
  • LineChart - Line charts using Braille characters for sub-character resolution
  • Canvas - Direct drawing surface for custom visualizations

Data Streaming Widgets:

  • LogViewer - High-performance log viewer with virtual scrolling and filtering
  • StreamWidget - GenStage-integrated widget with backpressure support

BEAM Introspection Widgets:

  • ProcessMonitor - Live BEAM process inspection with sorting and filtering
  • SupervisionTreeViewer - OTP supervision hierarchy visualization
  • ClusterDashboard - Distributed Erlang cluster monitoring

Other Changes

  • Added usage_rules for AI assistant integration - see usage_rules | Hex
  • Added README documentation for all 25 example directories
  • Fixed mouse tracking cleanup on application exit
  • Fixed ToastManager rendering
  • Improved ContextMenu mouse support and hover highlighting
  • Various bug fixes and documentation improvements
— All posts loaded —

Where Next? Top

Trending in Announcing Top

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
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
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New

Other Trending Topics Top

mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
akoutmos
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews