npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

npm-keep-me-logged-in

v1.2.1

Published

Keeps you logged in to npm registry so you don't have to run `npm login` every day

Readme

🔐 npm-keep-me-logged-in

CI npm version License Buy me a coffee

Stop running npm login every day. Create long-lived npm access tokens (up to 90 days) and stay logged in to npm without daily authentication prompts.

npx npm-keep-me-logged-in

The Problem

Since npm deprecated classic tokens, npm login tokens now expire after just 2 hours. If you use private npm packages, you're forced to re-authenticate multiple times per day. This is especially frustrating for developers working with private registries and organization packages.

This tool fixes the npm login expiration problem by creating proper granular access tokens that last up to 90 days - no more daily npm login prompts.

How It Works

This is a transparent wrapper around official npm commands. It automates what you could do manually:

  1. Runs npm login to create a fresh session
  2. Discovers your organizations from published packages
  3. Prompts you to configure the token (name, expiration, organizations, 2FA bypass)
  4. Runs npm token create with your chosen settings (npm handles password/2FA)
  5. Optionally updates ~/.yarnrc.yml with the new token

Your credentials never leave your machine. Everything happens locally using official npm CLI commands.

Security & Privacy

  • Open source - Full code transparency
  • No data collection - Everything runs locally
  • No password storage - Passed directly to npm's official prompt
  • No file access - Only reads ~/.npmrc if you choose to update Yarn config
  • Official npm commands - Uses the same npm token create you'd use manually
  • Timestamped backups - Config files are backed up before modification

Requirements

  • Node.js 18+
  • npm 11+ (for granular token CLI support)
  • 2FA enabled on your npm account

Quick Start

Fix your npm login expiration issues in under a minute:

npx npm-keep-me-logged-in

The interactive CLI guides you through:

  • Token name - Default: npm-keep-me-logged-in-YYYY-MM-DD
  • Expiration - Choose 7, 30, 60, or 90 days (recommended: 90)
  • Organizations - Auto-detected from your published packages
  • 2FA bypass - Optional (not recommended for security)
  • Yarn config - Automatically update ~/.yarnrc.yml (optional)

What You Get

Long-lived npm authentication tokens with:

  • 90-day expiration - Stop logging in daily
  • Read/write access to all your packages
  • Organization support - Works with private org packages
  • Yarn compatibility - Auto-configures Yarn Berry if needed
  • Automatic renewal - Just run again when token expires

Notes

  • If a token with the same name exists, a random suffix is added (e.g., npm-keep-me-logged-in-2026-01-19-a3f)
  • Config backups are saved as ~/.npmrc.backup.TIMESTAMP and ~/.yarnrc.yml.backup.TIMESTAMP
  • You can manage tokens at npmjs.com/settings/~/tokens

License

MIT - This tool is not affiliated with npm, Inc.