Install the “fx” package from npm globally. It’s a JSON Explorer UI in the terminal
npm i -g fx
<aside>
❕ if you wish to skip this step, replace all the instances of fx with npx fx
</aside>
Create this alias in your terminal rc. For bash it will be ~/.bashrc and Zsh it will be ~/.zshrc
alias npm-help="cat package.json | fx '.scripts'"
Either close the terminal and repoen it, or run source on teh file you just added the alias to
ex source ~/.zshrc
> npm-help
{
"dev": "next",
"dev:storybook": "npm run storybook",
"build": "next build",
"start": "next start",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
}
> npm-help | grep 'storybook'
"dev:storybook": "npm run storybook",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"