1. Installation (optional)2. Create Alias3. Restart the terminal session4. Use the new npm help command!(extra) Use grep for larger projects
1. Installation (optional)
Install the “fx” package from npm globally. It’s a JSON Explorer UI in the terminal
npm i -g fx
if you wish to skip this step, replace all the instances of
fx with npx fx2. Create Alias
Create this alias in your terminal rc. For bash it will be
~/.bashrc and Zsh it will be ~/.zshrcalias npm-help="cat package.json | fx '.scripts'"
3. Restart the terminal session
Either close the terminal and repoen it, or run
source on teh file you just added the alias toex
source ~/.zshrc 4. Use the new npm help command!
> npm-help { "dev": "next", "dev:storybook": "npm run storybook", "build": "next build", "start": "next start", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook" }
(extra) Use grep for larger projects
> npm-help | grep 'storybook' "dev:storybook": "npm run storybook", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook"