Zero-dependency CLIs with Node.js
summary
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
chapters (10)
- 0:00Start
- 5:33Why Build CLI Apps with Node.js?
- 6:30Dependencies
- 9:26What's New in Node.js?
- 10:05New Syntax
- 11:13Argument Parsing
- 18:13Life Before Fetch
- 21:28Test Runner
- 22:46Recursive Filesystem Operations
- 24:42What's Next?
related talks
22mZero-dependency CLI Applications with Node.js
30mCLI Tools for All the Things
34mBuilding Interactive npm Command Line Modules
45mBUILDING CLI TOOLS WITH NODEJS
26mBuilding Great CLI Experiences in Node
28mWriting command-line interfaces (CLIs) with React. Wait, what? Yeah!
02h 24mHow to Node.js - Part 2
30mWrite CLI applications with Node.js like it’s 2023
