LiveView style API
Build terminal views with mount/2, render/1, handle_event/3, assigns, function components, attributes, and slots.
Elixir terminal UI
A TUI library with a LiveView-inspired API for building Elixir terminal applications without third-party NIFs.
mix run examples/counter.exs
Install
Breeze ships its own template runtime and formatter for `~H` terminal templates, so you can keep a familiar Elixir workflow.
def deps do
[
{:breeze, "~> 0.5.1"}
]
end
Mix.install([{:breeze, "~> 0.5.1"}])
defmodule Demo do
use Breeze.View
def mount(_opts, term) do
{:ok, assign(term, counter: 0)}
end
def render(assigns) do
~H"""
<box style="w-screen h-screen bg">
<box style="text-primary bold">Breeze counter</box>
<box style="text-accent bold">Counter: {@counter}</box>
</box>
"""
end
def handle_event(_, %{"key" => "ArrowUp"}, term) do
{:noreply,
assign(term, counter: term.assigns.counter + 1)}
end
def handle_event(_, %{"key" => "ArrowDown"}, term) do
{:noreply,
assign(term, counter: term.assigns.counter - 1)}
end
end
Breeze.Example.run(view: Demo)
Features
Build terminal views with mount/2, render/1, handle_event/3, assigns, function components, attributes, and slots.
Use Breeze's own ~H sigil and template runtime with familiar HEEx-style assigns, loops, conditionals, and slots.
Add scroll_y, scroll_x, or scroll modifiers to terminal regions that need stable keyboard-driven navigation.
Reach for list, dropdown, tabs, markdown, scroll, panel, modal, and table blocks instead of rebuilding common TUI patterns.
Breeze is built on Termite and BackBreeze, keeping the rendering model focused on real terminal applications.
Exercise views with Breeze.Test, render fixed terminal sizes, dispatch input, and assert terminal output.
Built-in blocks
Built for iteration
Inspect view trees, assigns, focus, styles, rendered fragments, themes, and application logs from a separate Breeze session.
Watch and recompile changed view modules during development without restarting your terminal application.
Inspect crashes in a dedicated terminal view with selectable stack frames, file and line details, copyable diagnostics, and restart controls.
Testing and deployment
Run examples directly from Mix for counters, forms, modal flows, docs browsers, themes, and games.
Serve Breeze apps over SSH so each connecting client gets an isolated terminal session backed by Termite.SSH.
Use the Breeze.HTMLFormatter plugin to format ~H templates alongside normal Elixir code.