Reputation: 5954
Is there a way to get a list of npm packages owned by a user?
Something like this: https://www.npmjs.com/~npm but in json from the command line or api
Upvotes: 5
Views: 622
Reputation: 5885
You could try npm's own search:
npm search maintainer:kvz
It took me a while to find what the possible search keywords are but they are but they are documented here:
Search Syntax | Description |
---|---|
scope:types | Show/filter results that belong to the @types scope |
author:sindresorhus | Show/filter results in which sindresorhus is the author |
maintainer:sindresorhus | Show/filter results in which sindresorhus is qualifier as a maintainer |
keywords:gulpplugin | Show/filter results that have gulpplugin in the keywords (separate multiple keywords with commas, you may also exclude keywords e.g. |
not:deprecated | Exclude deprecated packages from the results |
not:unstable | Exclude packages whose version is < 1.0.0 |
not:insecure | Exclude packages that are insecure or have vulnerable dependencies (as per nsp) |
is:deprecated | Show/filter is deprecated packages |
is:unstable | Show/filter packages whose version is < 1.0.0 |
is:insecure | Show/filter packages that are insecure or have vulnerable dependencies (as per nsp) |
boost-exact:false | Do not boost exact matches, defaults to true |
score-effect:14 | Set the effect that package scores have for the final search score, defaults to 15.3 |
quality-weight:1 | Set the weight that quality has for the each package score, defaults to 1.95 |
popularity-weight:1 | Set the weight that popularity has for the each package score, defaults to 3.3 |
maintenance-weight:1 | Set the weight that the quality has for the each package score, defaults to 2.05 |
Upvotes: 2
Reputation: 5516
You could install npm-user-packages-cli globally.
$ npm install --global npm-user-packages-cli
Then you can do:
$ npm-user-packages <username>
I've used it locally, and it does exactly what you asked.
Upvotes: 3
Reputation: 2975
if you want to list the packages installed globally, you can use npm list -g --depth=0
Not sure if it's what you are asking, you will tell me in comment
If you want the list of npm package on npm.js it will be like that. You just need to change the name of the user https://www.npmjs.com/~ehsalazar
But you can't do it fron npm cli. At best, by curl
Upvotes: 0