Build a CLI with Elixir
Elixir Mix ships with built-in CLI support, called escript
. From the docs:
An escript is an executable that can be invoked from the command line. An escript can run on any machine that has Erlang/OTP installed and by default does not require Elixir to be installed, as Elixir is embedded as part of the escript.
Yesterday I built a CLI that reads an input file, does some calculations, and prints a result. For me, CLIs are often the mark of a fully-realized project, and I appreciate how the Elixir community treats CLIs as a first-class idea.
In lieu of a longer explanation, here are the docs:
Tweet