BUILDING CLI TOOLS WITH NODEJS
summary
Claims that a full CLI slide deck runs on core Node only and actually works: a terminal‑in‑terminal that is responsive and watches files, built with process.stdout.write for cursor control, readline for key events, child_process exec/spawn for commands (exec buffers output until completion; spawn streams in real time), fs sync where needed, ANSI color codes, and packaged via npm link/npm publish with a shebang and bin mapping. Argument parsing proves surprisingly hairy (32 lines) and command‑injection is a real risk.
AI-written summary · about
chapters (21)
- 0:00Start
- 2:08Building Ci Tools with Node Js
- 4:34Building Cli Tools in Node Js
- 6:55Why You Should Be Building Command Line Tools in Node Js
- 10:03Where Do You Get Started
- 12:50Output
- 14:05Stdouts Js
- 15:30Colors
- 16:47Code Colors Js
- 17:10Replace Line
- 20:37Question Script
- 23:57Shell Commands
- 25:57Run Commands Using Exec
- 27:42Processing Arguments
- 31:03Write to a File
- 32:46Watch Files
- 34:58Write File
- 36:53Add a Bin Parameter
- 37:42Npm Link
- 41:03Nodepty
- 41:47Summary
related talks
34mBuilding Interactive npm Command Line Modules
30mCLI Tools for All the Things
26mBuilding Great CLI Experiences in Node
28mWriting command-line interfaces (CLIs) with React. Wait, what? Yeah!
22mZero-dependency CLI Applications with Node.js
30mWrite CLI applications with Node.js like it’s 2023
33mMaking The Terminal Great Again
26mZero-dependency CLIs with Node.js
