xrepl/term

Build Status][gh-actions-badge]][gh-actions]
[![LFE Versions][lfe-badge]][lfe]
[![Erlang Versions][erlang-badge] [ Tags

Project Logo

A modern terminal control library for LFE

Features

Installation

Add to your rebar.config:

{deps, [
    {xrepl_term, {git, "https://github.com/xrepl/term.git", {branch, "main"}}}
]}.

Quick Start

;; Include colour macros
(include-lib "xrepl_term/include/colours.lfe")

;; Basic styling
(io:format "~s~n" (list (red! "Error: " (bold! "File not found"))))

;; Threading macro style
(clj:-> "Important Message"
  (bold!)
  (fg! 'cyan)
  (underline!)
  (list)
  (io:format "~s~n"))

;; Display image
(xrepl-term-graphics:render-file "chart.png" #m(width "80%"))

;; Create table
(xrepl-term-ui:table
  #m(headers '("Name" "Age" "City")
     rows '(("Alice" 30 "NYC")
            ("Bob" 25 "SF"))))

Documentation

See examples/ for more usage patterns.

License

Apache-2.0