swyxio/cli-cheatsheet is an open-source project on GitHub with 618 stars. helpful libraries for *building* CLIs. Not a list of CLIs.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
this list is now archived - look inside https://github.com/sw-yx/brain if you would like an updated list! thank you.
cli-cheatsheet
helpful libraries and resources for building Node.js CLIs. Not a list of CLIs.
I put together a 90 minute Egghead.io Course and Workshop on how to put these tools together, if you like video learning. I also make some money if you watch those videos if you want to help :)
CLI Design Thinking
12 Factor CLI Apps (Blogpost, Talk): Jeff Dickey's list of requirements for UX.
CLI Guidelines (Guide, Source): An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day.
The Poetics of CLI Command Names: Command naming anti-patterns and excellent names
CLI State Machines (Gist): My little thoughts on state management
Add a dry run mode for expensive commands like gatsby dry-run
The Art of Command Line
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. See also import-jsx
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 Vercel, used by vercel, ncc, micro, serve, and many others. Key Feature: tiny
cac: Built by Egoist, used by create-nuxt-app and many others.
Pastel for React-ink - used in Twilio https://www.twilio.com/blog/building-conference-cli-in-react
New: see CLUI https://blog.repl.it/clui
Inspiration from other languages - the http://charm.sh/ universe.
https://www.npmjs.com/package/jest-validate from Jest but not Jest specific
Loading config from json, rc file, etc*
https://github.com/DavidWells/configorama
https://github.com/davidtheclark/cosmiconfig Find and load configuration from a package.json property, rc file, or CommonJS module. Check searchPaths to implement XDG spec compliance.
replaces https://github.com/dominictarr/rc, an old rc-file finder with some different design choices
don't need but nice to know: https://www.npmjs.com/package/read-package-json
Beware the race condition when you check if file exists and then open it. the file could be deleted in betwee. instead, just open the file and handle the error if it doesnt exist.
Loading/Storing config from a persistent store
⚠️ Be aware of the XDG spec. Sindre's libraries use env-paths to get paths compliant with this.
https://github.com/sindresorhus/conf simple config storing (maybe try conf-cli to manipulate if needed) the successor to configstore
https://github.com/jonschlinkert/data-store conf like datastore but in the shclinkerverse
🌟Input
https://npm.im/enquirer (recommended)
combine with https://www.npmjs.com/package/fuzzy for fuzzy matching
https://npm.im/inquirer
https://npm.im/prompts
https://npm.im/email-prompt
Stdin Parsing
https://npm.im/get-stdin (eg when you want to receive pipe results cat mydata.json | mycli)
Argument Parsing
https://npm.im/meow
https://npm.im/arg
https://npm.im/minimist (hasn't been updated in a while though)
https://www.npmjs.com/package/cliclopts
⚠️ Your framework may come with parsing built in
Input/Stdin/Argument Processing
make sure to also normalize inputted stuff before you compare
https://npm.im/cross-spawn (also a cross platform solution to node's spawn and spawnSync)
https://npm.im/execa (recommended)
execa best practices:
use preferLocal: true
try not to mix streams and promises. use stdio: 'inherit' to pipe stdout/stderr up
avoid shell: true unless absolutely necessary
Remember Windows users for cross-platform nodejs (Guide). e.g. dont execute pkg.json or shell commands with single quotes instead of escaped double quotes
Sometimes processes can spawn processes. This is troublesome for watch/reload features. Kill them all with tree-kill.
You'll probably also use these in conjunction with port monitors (e.g. the process you're working with opens a port, like CRA for Netlify Dev):
writing large files: https://www.npmjs.com/package/write-file-atomic
navigating node_modules using the same package npm uses: https://github.com/npm/arborist/
Icons & Coloring
https://npm.im/chalk (recommended - also see Related Packages)
https://npm.im/kleur
https://npm.im/cfonts
https://npm.im/tinycolor2 (some interesting APIs, handy with React Ink)
https://npm.im/log-symbols (colored xplatform unicode symbols for success/info/warning/error)
https://npm.im/figures (Unicode symbols with Windows CMD fallbacks)
https://npm.im/gradient-string VERY nice color gradient text
Note that you may want to offer the option to FORCE_COLOR in CI logging.
PrettyPrinting
https://npm.im/pretty-bytes
https://www.npmjs.com/package/prettyjson
https://www.npmjs.com/package/concordance
there are also react based renderers
react ink
https://github.com/Yomguithereal/react-blessed
Boxing
https://www.npmjs.com/package/term-size Get Terminal Size
https://npm.im/boxen
https://www.npmjs.com/package/sign-bunny
Tables
https://www.npmjs.com/package/cli-table
https://www.npmjs.com/package/cli-ux#clitable
https://www.npmjs.com/package/ascii-table
Banners
https://github.com/patorjk/figlet.js - helps sets width dependent on terminal size
Debug Logging
https://www.npmjs.com/package/debug (note that you might not need this, Node's inbuilt util.debuglog does a lot of the same h/t @stefanjudis)
https://github.com/winstonjs/winston
https://github.com/pinojs/pino
https://github.com/klaussinani/signale
https://github.com/pimterry/loglevel
https://github.com/log4js-node/log4js-node
https://github.com/nuxt/consola
https://github.com/baryon/tracer
https://github.com/trentm/node-bunyan
React Native CLI has very simple logging with verbose mode you can still with just chalk dependency
In Github Issue Templates, tell your users to report versions: https://www.npmjs.com/package/envinfo
You often also find specialized logger tools for each domain, like @dazn/lambda-powertools-logger for AWS Lambda, but at their core they all support the core pattern of Log Levels DEBUG, INFO, WARN and ERROR.
Plugin/Release Management
https://www.npmjs.com/package/live-plugin-manager
https://www.npmjs.com/package/pacote (used in npm cli)
https://www.npmjs.com/package/gh-release-fetch (very low level pull from github)
https://www.npmjs.com/package/require-package-name (get package names as if local files were modules)
https://www.npmjs.com/package/semantic-release
⚠️ None of these are offline-first. Keen on finding one that respects offline first.
https://github.com/sindresorhus/clean-stack Removes the mostly unhelpful internal Node.js entries.
https://github.com/tapjs/stack-utils Captures and cleans stack traces
node-cleanup - add a callback for when Node is terminated
Serving Files
https://github.com/lukejacksonn/servor zero dependency fileserver focused on SPA usecase
https://www.npmjs.com/package/serve general local fileserver utility
https://github.com/lukeed/sirv/tree/master/packages/sirv-cli lukeed's alternative to serve
Misc
https://npm.im/stmux for tmux like UI
https://www.npmjs.com/package/cli-ux general Heroku CLI utils including OS notification
https://github.com/jeroenouw/cgx Generate all the recommended files (pre-filled) for the Github community standards. (Issue templates, code of conduct, etc)
https://github.com/vercel/pkg packaging as executable (so no requirement for node or npm)
TopGit's last sync did not record any GitHub topics for swyxio/cli-cheatsheet. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on swyxio/cli-cheatsheet?
The most recent commit recorded on swyxio/cli-cheatsheet was 4.9 years ago, based on the GitHub push timestamp. The repository has 20 forks — one of the better signals of community interest.
How many stars does swyxio/cli-cheatsheet have?
swyxio/cli-cheatsheet has 618 GitHub stars — refresh the page for the live number, or check github.com/swyxio/cli-cheatsheet. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is swyxio/cli-cheatsheet open source?
Yes — swyxio/cli-cheatsheet ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/swyxio/cli-cheatsheet.
Where can I see swyxio/cli-cheatsheet in action?
The project maintains a homepage at https://mobile.twitter.com/swyx/status/1127431451559985152. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about swyxio/cli-cheatsheet?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/swyxio/cli-cheatsheet is the definitive source.
Read full README in the tab above.
Curious whether cli-cheatsheet is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about cli-cheatsheet.