Skip to content
Latchkey

npm star: Usage & Output

Mark packages as favorites on your registry account.

npm star records a package as a favorite under your registry account; npm unstar removes it, and npm stars lists what you (or another user) have starred.

What it does

star and unstar toggle a favorite flag on your account for the named package - purely a personal bookmark, with no effect on installs or publishing. npm stars [user] lists the starred packages for you or a given username.

Common usage

Terminal
npm star lodash             # favorite a package
npm unstar lodash           # remove the favorite
npm stars                   # list your starred packages

Common error: star requires auth

npm star fails with ENEEDAUTH because starring is tied to a logged-in account. It is an interactive convenience, not a CI operation - authenticate first if you really need it in a script, but it almost never belongs in a pipeline.

Terminal
npm whoami                  # must be logged in to star

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →