Fuzzy list anything with npm package, i.e. dependencies, installs, scripts, profile.
npmlist
or npl
(npl
for the sake of typing) fuzzifies all the lists it can find about a npm module using ipt
, making it easier for search and execution. Its default feature is local dependencies listing, but can be changed with feature flags. It has clear advantages over painfully slow and cluttered npm list
:
- Selecting a package on fuzzy list will automatically trigger
npm info <package>
npl -t
gives a quick refresher on the recent global installsnpl -g
finds and prints global modules as fancy asbrew list
, and more than 10x faster thannpm list -g
npl -s
lists and triggers npm scripts better thannpm run-script
- A replacement for
npm list --depth=0 --local
and other annoyingly longnpm list --@#$%
commands with assumed configurations - No need to leave terminal just for glancing at a package's npm profile
$ npm install -g @hankchanocd/npmlist
Usage: npl [option] [name]
Fuzzy list anything with npm package
Options:
-v, --version output the version number
-l, --local list local dependencies, which is also the default feature
-g, --global list global modules
-d, --details include details to each dependency, but disable the default fuzzy mode
-t, --time show the latest global installs
-s, --scripts list/execute npm scripts
-a, --all a flavor flag that shows all available information on any feature flag
-F, --no-fuzzy disable the default fuzzy mode and resort to stdout
-h, --help output usage information
More than 10x faster than npm list -g
$ npl -g
? (Use arrow keys or type to search)
├── @angular/cli@6.2.4
├── aerobatic-cli@1.1.4
A quick refresher on what the heck it's installed/upgraded globally in the recent past
$ npl -t
? (Use arrow keys or type to search)
@hankchanocd/npmlist 10-5 21:29
semantic-release 10-5 8:5
Somewhat similar to ntl
$ npl -s
express@4.16.4
? run (Use arrow keys or type to search)
build: babel src/ -d build/ --quiet
test: mocha
npl
fetches the module's latest version by default, unless a version is specified
$ npl express
express@4.16.4 Dependencies:
? (Use arrow keys or type to search)
├── accepts@1.3.5
├── array-flatten@1.1.1
Fuzzy mode is turned on in most cases, except for --details
, where fuzzy is not optimal for multi-line text. You can also opt for --no-fuzzy
to turn off the default fuzzy mode.
$ npl -t --no-fuzzy
$ npl -g --no-fuzzy
$ npl -s --no-fuzzy
Applied to both local dependencies and global installs
$ npl --details
$ npl -g --details
Build a Web or CLI tool on top of npl
's API.
To perform unit tests and integration tests, simply run npm test
.
2018-Oct-16: Fuzzy mode is now enabled by default. It can be turned off by --no-fuzzy
.
2018-Oct-18: Give up on trying to pipe output to less
. Nodejs simply does not have good control of TTY.
2018-Oct-19: Speed up npmlist -g
10x than npm list -g
2018-Oct-20: npmlist
can also be accessed via npl
2018-Oct-21: The first official API guide released.
2018-Oct-29: Add autocomplete.
npl
started off as a bunch of CLI aliases on top of npm list
and npm info
, but grew larger quickly. It's now very effective at checking a package's dependencies. Saying all these means we are not afraid of expanding npl
features beyond the current realm.
The roadmap for npl
now focuses on presenting a quick and concise report on terminal with minimal commands (it means no sub-commands), freeing developers from the burden of constant switching between terminal and browser. See Wiki for npl
's code architecture, developments rules, and styles. See here on how to contribute.
If you like the idea of fuzzy list, check out ruyadorno's ipt
.