Building an interactive CLI app in Elixir
summary
Argues that CLIs should be first‑class in Elixir and shows concrete tooling and pitfalls: use Licenser style mix tasks, IO.gets/IO.puts with IO.ANSI for colored output, and OptionParser for argument parsing; avoid hand‑rolled parsers. Covers releases using distillery commands instead of escripts, redirecting stdout vs stderr, returning proper exit codes (0/1) with System.halt, and prefer flag-based inputs over prompts for automation so CI (example CircleCI) and pipes with jq keep working.
AI-written summary · about
chapters (18)
- 0:00Intro
- 0:11LifeSensor
- 1:27Agenda
- 1:40Why CLI
- 2:56Composability
- 5:07Developer Experience
- 6:07CLI tools in Elixir
- 6:26API Docs
- 7:28Option Parse
- 8:27Demo
- 9:26Complicated
- 9:39Question
- 10:58Common commands
- 12:59User prompts
- 14:05Exit codes
- 14:59Summary
- 15:30Further Resources
- 16:04Outro
related talks
32mWriting Command Line Applications with Elixir
37mLet's Make Better Command Line Applications
25mReinventing the CLI with Go
26mBuilding Great CLI Experiences in Node
36mCLI applications & TDD: Never write scripts again
30mCLI Tools for All the Things
48mKeynote Catalyse Change
42mUsing Ruby to Craft and Test Beautiful Command Line Applications
