fuelen

fuelen

Owl - A toolkit for writing command-line user interfaces

Hey folks!

Want to present a toolkit for writing command-line user interfaces.

It provides a convenient interface for

  • colorizing text using tags
  • input control with validations and casting to various data types
  • select/multiselect controls, inspired by AUR package managers
  • editing text in ELIXIR_EDITOR
  • wrapping multiline colorized data into ASCII boxes
  • printing palette colors
  • progress bars, multiple bars at the same time are supported as well
  • live-updating of multiline blocks
  • working with virtual device which partially implements The Erlang I/O Protocol and doesn’t conflict with live blocks.

Here is an asciicast:
asciicast

Source code
Docs

Most Liked

fuelen

fuelen

Owl v0.6.0 has been released :tada:

The biggest change in this release is an ability to render tables.
Tables are highly customizable, they work with Owl.Data.t() which allows colorizing even different chars inside a cell, not just a whole cell like in other libraries. Input expects a list of maps, and this structure allows autodetection of columns. There is sorting and filtering of columns, ability to specify max width for entire table (I wanted this for iex helpers :slight_smile:) and for individual columns. And other minor but nice things :slight_smile:
asciicast

fuelen

fuelen

Owl v0.13.0 released :tada:

Owl now supports clickable hyperlinks in terminal output via OSC 8 sequences. You can wrap text with the {:hyperlink, "https://url"} tag using Owl.Data.tag/2:

"Docs" |> Owl.Data.tag(hyperlink: "https://hexdocs.pm/owl") |> Owl.IO.puts()
josevalim

josevalim

Creator of Elixir

Owl looks awesome! I loved the demos with asciinema, the logo, and especially the examples directory!

fuelen

fuelen

Owl v0.3.0 has been released :tada:

fuelen

fuelen

There were a couple of small releases for which I didn’t post updates here.

Owl v0.11.0 has been released today! :tada:

The major update here is that Owl.Data.from_ansidata/1 has been deprecated in favour of a more convenient Owl.Data.from_chardata/1. The latter can handle output from the CLI utilities as is without additional transformations:

filename = "README.md"
{output, 0} = Owl.System.cmd("bat", [filename, "--color=always", "--style=plain"])

output
|> Owl.Data.from_chardata()
|> Owl.Box.new(title: Owl.Data.tag(filename, :yellow), border_tag: :light_blue)
|> Owl.IO.puts()

Also, a new Owl.TrueColor module has been added in order to handle more colors produced by external CLI utilities.

Where Next?

Popular in Announcing Top

phcurado
Zoi is a new schema validation library for Elixir. It’s inspired by Zod from the JavaScript ecosystem, bringing a similar functional API...
New
ananthakumaran
An ExUnit formatter to visualize test execution and find bottlenecks in your test suite. I created a small library called ex_unit_spa...
New
fteschke
Announcing: playwright_ex A simple Elixir client for the Playwright node.js server. Automate browsers like Chromium, Firefox, Safari an...
New
rahultumpala
Hello Elixir community, I work primarily on Java and other object oriented programming languages and often found it difficult to read an...
New
johantell
Ever struggled with mocking external HTTP services in Elixir tests? Found yourself writing brittle mocks that don’t catch real-world enco...
New
mindreframer
ElixirProto: Protobuf-Inspired Serialization for Elixir Events I wanted to have an Elixir-native serialization for events, that also supp...
New
Asd
Hi, I am happy to release the Repatch library for mocking and patching implementation in tests and anywhere else. It brings new possibili...
New
brainlid
LangChain is short for Language Chain. An LLM, or Large Language Model, is the “Language” part. This library makes it easier for Elixir a...
New
sevensidedmarble
Announcing Live Toast: a replacement toast/flash component for Phoenix LiveView, heavily inspired by the look of Sonner (the amazing toas...
New
waseigo
I saw this LinkedIn post: *Can your programming language do this? This is a macro in Clojure called `dotrace`. When you surround a pie...
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement