Skip to content
helpful libraries for *building* CLIs. Not a list of CLIs.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Added recommended files for the Github community standards with 'cgx'… Jun 6, 2019
CODE_OF_CONDUCT.md Added recommended files for the Github community standards with 'cgx'… Jun 6, 2019
CONTRIBUTING.md Added recommended files for the Github community standards with 'cgx'… Jun 6, 2019
LICENSE
README.md Merge pull request #10 from styfle/patch-1 Jun 7, 2019

README.md

cli-cheatsheet

helpful libraries and resources for building Node.js CLIs. Not a list of CLIs.

CLI Design Thinking

  • 12 Factor CLI Apps (Blogpost, Talk): Jeff Dickey's list of requirements for UX.

  • Heroku CLI Style Guide (Guide, Talk, Talk): Heroku's CLI Style Guide.

  • CLI State Machines (Gist): My little thoughts on state management

Frameworks

  • Commander: Built by TJ, used in create-react-app, vue-cli, and many others. Key feature: pluggability. Vorpal is another framework inspired by Commander and is seeking maintainers
  • Oclif: Built by Heroku, used in Heroku and Salesforce CLI's. Key feature: pluggability.
  • Sade: Built by lukeed, used in tsdx. Key feature: lightweight?
  • Gluegun: Built by Infinite Red, used in Ignite and AWS Amplify. Key feature: templating/filesystem
  • Ink: Built by Vadim & Sindre. Key Feature: React Components and Yoga Layout.
  • Scritch: Built by Jamie, used at Eventbrite. Key Feature: compose multiple scripts regardless of language into one CLI.
  • Yargs: Built by bcoe, used by webpack-cli, mocha, react-native, nyc, and 14,343 other modules.
  • arg: Built by ZEIT, used by now, ncc, micro, serve, and many others. Key Feature: tiny

Utility Libraries

Update Management/Nagging

Context/Config

Context from filesystem/PATH

Loading/Storing config

⚠️ Be aware of the XDG spec. Sindre's libraries use env-paths to get paths compliant with this.

🌟Input

Argument Parsing

⚠️ Your framework may come with parsing built in

Command execution

Spinners

Templating

🌟Output

Coloring

Boxing

Tables

Banners

*Debug Logging

Plugin/Release Management

⚠️ None of these are offline-first. Keen on finding one that respects offline first.

Misc

Beginner Tutorials

You can’t perform that action at this time.