Skip to content
ctxshiftPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Clinex

Terminal User Interfaces over SSH for Phoenix applications.

Clinex brings LiveView-like development to the terminal, with ~T templates, flexbox layout via Taffy/Rustler, and efficient ANSI diff rendering.

Features

  • LiveView-compatible architecture: Same callbacks (mount/3, handle_event/3, handle_info/2)
  • ~T sigil: Declarative TUI templates with components like <.box>, <.text>, <.input>
  • Flexbox layout: CSS-like positioning via Taffy (Rust NIF)
  • Efficient rendering: Only changed content is re-rendered using ANSI escape sequences
  • SSH transport: Secure terminal access with public key and password authentication

Installation

Add clinex to your dependencies in mix.exs:

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

Quick Start

defmodule MyApp.DashboardTUI do
  use Clinex.Live

  def render(assigns) do
    ~T"""
    <.box border="rounded" padding={1}>
      <.text color="green">Status: {@status}</.text>
    </.box>
    """
  end

  def mount(_params, _session, socket) do
    {:ok, assign(socket, status: "online")}
  end
end

Add to your supervision tree:

children = [
  {Clinex.SSH.Daemon, port: 2222, router: MyApp.ClinexRouter}
]

Connect via SSH:

ssh localhost -p 2222

Documentation

Documentation can be generated with ExDoc and published on HexDocs.

mix docs

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages