Build Custom CLI Tooling with oclif and TypeScript

ClockIcon90m
typescriptTypeScript
>=3.3
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.8
74 people completed
Shawn Wang
By

Shawn Wang

I am an Infinite Builder and work on Developer Experience at Netlify. I love Learning in Public and helping people do the same.

Today, you can't do anything in JavaScript without bumping into a CLI.

Want to install a library? yarn add it. Want a React app? create-react-app. Want to format your JavaScript? prettier --write. Want your types checked? tsc. Bundling? Pick from webpack, rollup, or parcel. Deploying? now or netlify deploy.

CLI's are everywhere, and even if you don't write them, sooner or later you'll have to debug them.

This workshop serves as a comprehensive survey of the state of the art of CLI tooling for everyone looking to make an impact in open source, across their company, and even in their own productivity.

What you'll learn

  • CheckIconCreate a Simple CLI
  • CheckIconPass Args and flags to a CLI
  • CheckIconSet up testing for a CLI
  • CheckIconAdd filesystem state to a CLI
  • CheckIconScaffold boilerplates (e.g. templates)
  • CheckIconPolish the CLI with colors, spinners, etc.
  • CheckIconSpawn child processes so other CLIs can run
  • CheckIconControl logging & output from other processes
Shawn Wang
By

Shawn Wang

I am an Infinite Builder and work on Developer Experience at Netlify. I love Learning in Public and helping people do the same.

Illustration for Develop and Publish a Node.js CLI from Scratch

Develop and Publish a Node.js CLI from Scratch

Shawn Wang
Lesson
ClockIcon
7:19