Building Great CLI Experiences in Node
summary
A practical guide to building CLIs using the oclif CLI framework that Heroku and Salesforce use (also adopted by Apollo, Netlify, Appify), with a demo generating a multi-command project in TypeScript using Mocha and Axios to implement a stars command that lists GitHub stargazers. Covers six of the “12 CLI factors”: good help and generated web docs, prefer flags to args, consistent version flags, correct stdout/stderr handling, rich error objects with code/title/fix/URL, and optional spinners/OS notifications for long tasks.
AI-written summary · about
chapters (18)
- 0:00Intro
- 3:16CLI Framework
- 3:49TypeScript
- 4:33Outline
- 4:49The 12Factor App
- 5:35CLI Factors
- 5:50CLI Help
- 7:11Show Help
- 8:49Completion
- 9:21Flag Values
- 10:06Version
- 10:56Streams
- 12:59Handle Things Going Wrong
- 14:39Be Fancy
- 16:00OS Notifier
- 16:40Dont be Fancy
- 17:27Demo
- 19:20Questions
related talks
30mCLI Tools for All the Things
45mBUILDING CLI TOOLS WITH NODEJS
40mBuilding a personal CLI
25mReinventing the CLI with Go
16mBuilding an interactive CLI app in Elixir
33mCLI-Driven Developer Experience: The Secret Ingredient of an Aligned Team
26mBetter API DX with a CLI
13mBuilding a Service Oriented CLI: Best Practices
