~/talk

Zero-dependency CLIs with Node.js

Talkat CascadiaJS 2022 · 2022-08-30..09-02· [nodejs]
slides:none on file

Node.js now makes zero-dependency CLIs practical by adding parseArgs (node:util) for structured flag parsing, a global fetch built on undici and web streams for concise HTTP requests, and a built-in test runner plus recursive fs APIs (mkdir -p, rm -rf, experimental cp, pending recursive readdir). Example: a git-blast utility that replaces git blame emails with Twitter handles shrinks from 30+ lines using http/streams boilerplate to under 10 lines with fetch, showing real savings.

AI-written summary · about

  1. 0:00Start
  2. 5:33Why Build CLI Apps with Node.js?
  3. 6:30Dependencies
  4. 9:26What's New in Node.js?
  5. 10:05New Syntax
  6. 11:13Argument Parsing
  7. 18:13Life Before Fetch
  8. 21:28Test Runner
  9. 22:46Recursive Filesystem Operations
  10. 24:42What's Next?
~/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.