Lesson 7: Making command line applications with escript

Опубликовано: 26 Июль 2026
на канале: Alchemist Camp
1,415
19

Follow me on Twitter to get more tips and tutorials!   / alchemistcamp  

We use our new-found powers to create a command line application that can be run directly from the shell and can handle arguments. Since we've already made a word count utility way back in lesson 2, we'll use it as a starting point.

This lesson covers the basics of using mix and escript to make more robust command line applications. The challenge for next time is to implement a simple clone of Unix's "tail" command, its --lines flag and its -n alias.

Note: The word "native" was ill-chosen. Escript will let you run elixir programs directly from the command line, but they still run through the Erlang VM as opposed to being compiled for an x86 processor as with C or Rust.