Fuzzy search npm modules with
fzf
npm-fzf
, also called npf
, fuzzy search npm modules with fzf
, creating a more fulfilling search experience at terminal.
(Must): npf
requires Node 8 for runtime or above.
(Highly Recommended): fzf
is used heavily by npf
. If fzf
is not installed, npf
will default to a much less capable sibling, node-fzf
- fzf
's implementation in Node.
$ npm install -g npm-fzf
Usage: npf [option] [name]
Fuzzy search npm modules with fzf
Options:
-v, --version output the version number
# Feature flags
-l, --local list local dependencies, which is also the default feature
-g, --global list global modules
-t, --time show the latest global installs
-s, --scripts list/execute npm scripts
# Flavor flags
-d, --details include details to each dependency, but disable the default fuzzy mode
-a, --all a flavor flag that shows all available information on any feature flag
-P, --no-preview disable the default fzf preview mode
-F, --no-fuzzy disable the default fuzzy mode and resort to stdout
-h, --help output usage information
$ npf -g
A quick refresher on what the heck it's installed/upgraded globally in the recent past
$ npf -t
$ npf -s
Fetch the module's latest version by default, unless a version is specified
$ npf express
Preview mode uses fzf --preview
underneath and is turned on in most cases by default. You can also opt for --no-preview
to turn off the default preview mode.
$ npf -t --no-preview
$ npf -g --no-preview
$ npf -l --no-preview
$ npf express --no-preview
Fuzzy mode is by default on. You can also opt for --no-fuzzy
to turn it off.
$ npf -t --no-fuzzy
$ npf -g --no-fuzzy
Applied to both local dependencies and global installs
$ npf --details
$ npf -g --details
To perform unit tests and integration tests, simply run npm test
. (Need Help)
2018-Nov-15: v1
published.
If you have a suggestion, leave it in Issues for discussion first. I will reply in no more than 3 days. See here on how to contribute.
fzf
empowers many features that would otherwise be hard to imagine. If you haven't of fzf
, check out junegunn's fzf
. Check out my Dotfiles to see more use cases of fzf
.