Zero-dependency CLI Applications with Node.js
summary
Node 18 adds concrete APIs that let CLIs drop npm packages: node:util.parseArgs parses flags (booleans, shorts, errors on wrong forms), global fetch does HTTP via undici and Web Streams, and node:test provides sync/async tests and a runner. fs.mkdir, fs.rm and experimental fs.cp support recursive make/delete/copy (rm mirrors rimraf behavior). An example project called bad installs packages, adds deps to package.json and removes node_modules — it works as a proof of concept and relies on these built-ins.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:02What are dependencies
- 2:28Why zero dependencies
- 2:50What are CLI apps
- 4:15New Node.js features
- 7:26Parsing arguments with util.parseArgs
- 10:37Using fetch in Node.js
- 12:23Node.js test runner
- 14:31Recursive file operations
- 17:39Future Node.js ideas
- 20:05Building a package manager
- 21:48Future plans for BAD








