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 🙏

© 2025 – Pkg Stats / Ryan Hefner

nodapt

v0.3.15

Published

A virtual node environment for node.js

Readme

English | 中文简体

Build Status Go Report Card Latest Version 996.icu Repo Size

Introduction

Nodapt (/noʊˈdæpt/) is a command-line tool designed to work with multiple Node.js versions. It automatically selects and uses the appropriate Node.js version to run commands based on the version constraints specified in the package.json file.

Background

When developing Node.js projects, it is common to switch between different Node.js versions. For example, Project A might require 16.x.y, while Project B uses 20.x.y.

However, traditional global version management tools (e.g., nvm) often fall short in meeting these needs due to the following issues:

  1. Limited cross-platform support: nvm is not very convenient to use on Windows.
  2. Pre-installation requirements: nvm requires pre-installing specific versions, which is not ideal for CI/CD environments.
  3. Lack of Monorepo support: In Monorepo setups, different subprojects may require different Node.js versions, which nvm cannot handle effectively.

To address these challenges, Nodapt was developed. It automatically selects and installs the appropriate Node.js version to run commands based on the version constraints in package.json.

Features

  • [x] Cross-platform support (Mac/Linux/Windows)
  • [x] Automatically select and install the appropriate Node.js version to run commands
  • [x] Support for running commands with a specified Node.js version
  • [x] Support for Node.js version constraints in package.json
  • [x] Monorepo project support
  • [x] CI/CD environment support
  • [x] Compatibility with other Node.js version managers (e.g., nvm, n, fnm)
  • [x] Support for opening a new shell session with the nodapt use <version> command

Usage

# Automatically select the appropriate Node.js version to run a command
$ nodapt node -v

# Run a command with a specified Node.js version
$ nodapt use ^18 node -v

# Specify a version range and open a new shell session
$ nodapt use 20

Integrating with Your Node.js Project

  1. Add Node.js version constraints to your package.json file:
+  "engines": {
+    "node": "^20.x.x"
+  },
  "scripts": {
    "dev": "vite dev"
  }
  1. Use the nodapt command to run scripts:
- yarn dev
+ nodapt yarn dev

Run nodapt --help to see more options.

Installation

Install via Cask (Mac/Linux/Windows)

$ cask install github.com/axetroy/nodapt
$ nodapt --help

Install via npm

$ npm install @axetroy/nodapt -g
$ nodapt --help

Uninstallation

$ nodapt clean
# Then remove the executable file or uninstall it via your package manager

Node.js Version Selection Algorithm

This section explains how nodapt behaves and selects the appropriate Node.js version when executed:

  1. Check if a package.json file exists in the current directory.
  2. If it exists:
    1. Check if the engines.node field specifies a version constraint:
      • If the currently installed version satisfies the constraint, use it directly.
      • If not, select the latest matching version from the remote list, install it, and then run the command.
    2. If engines.node is not specified, run the command directly.
  3. If package.json does not exist, run the command directly.

Similar Projects

License

This project is licensed under the Anti-996 License.