~/talk

Command-Line Applications in Ruby: Design Patterns and Best...

Talkat RubyConf 2026 · 2026-07-14..07-16· [ruby, ai-assisted-development]
slides:none on file

Practical patterns for building Ruby CLIs: keep the executable thin in the exe directory, return explicit exit codes (control‑C -> 130), separate standard out from stderr for machine output, and offer CLI, library, REPL and MCP server interfaces so agents can avoid repeated startup. Uses OptionParser for flags, formatter registry as lambdas, subprocess handling with open3.capture3 (or array args to avoid shells), and real examples—cov-loupe and wifi-wand—already implemented as CLI/library/servers and extended successfully to Ubuntu.

AI-written summary · about

  1. 0:00Introduction
  2. 4:56High cohesion and low coupling
  3. 10:35Designing executable scripts
  4. 17:58Error handling and UX
  5. 21:48Running external commands
  6. 25:42Adding a ripple shell
  7. 28:10Documentation and interfaces
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.