snm = corepack + fnm + ni .
- 📦 Node、Npm、Pnpm、Yarn Version Manager
- 💡 Use the right package manager
- ✅ Verify if package manager meets the 'packageManager' configuration
- 🌟 CodeWhisperer ( Fig ) Friendly
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash
--install-dir
Custom installation directory, default is ~/.snm
.
Example:
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash -s -- --install-dir "./.snm"
--skip-shell
Skip automatic configuration of shell environment variables .
If you install directory to /bin
directory, you may not need to configure shell environment variables.
Example:
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash -s -- --skip-shell
--force-install
Forcing the use of shell scripts for installation
Example:
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash -s -- --force-install
--version
Specify the installation version
Example:
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash -s -- --version "0.0.1-27"
Of course, you can combine multiple parameters. Example:
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash -s -- --install-dir "./.fnm" --skip-shell --version "0.0.1-27"
name | default | description |
---|---|---|
SNM_BASE_DIR | ~/.snm | Installation directory |
SNM_NODE_BIN_DIR | ~/.snm/bin | Node binary directory |
SNM_DOWNLOAD_DIR | ~/.snm/download | Download directory |
SNM_NODE_MODULES_DIR | ~/.snm/node_modules | Node modules directory |
name | default | description |
---|---|---|
SNM_NPM_REGISTRY_HOST | https://registry.npmjs.org | Npm host |
SNM_YARN_REGISTRY_HOST_KEY | https://registry.yarnpkg.com | Yarn registry , Used by less 2.0.0 |
SNM_YARN_REPO_HOST_KEY | https://repo.yarnpkg.com | Yarn registry , Used by greater 2.0.0 |
SNM_NODEJS_DIST_URL_KEY | https://nodejs.org/dist | Nodejs Host |
SNM_NODEJS_GITHUB_RESOURCE_HOST_KEY | https://raw.githubusercontent.com | Github resource host |
name | default | description |
---|---|---|
SNM_STRICT | false | strict mode |
SNM_NODE_INSTALL_STRATEGY | ask | Install Strategy , Optional ask |panic |auto |
SNM_PACKAGE_MANAGER_INSTALL_STRATEGY | ask | Install Strategy , Optional ask |panic |auto |
- snm node list
- snm node list-remote
- snm node install 20.11.1
- snm node uninstall 20.11.1
- snm node default 20.11.1
- snm node env
- snm npm list
- snm npm list-remote
- snm npm install 7.5.6
- snm npm uninstall 7.5.6
- snm npm default 7.5.6
- snm pnpm list
- snm pnpm list-remote
- snm pnpm install 6.7.5
- snm pnpm uninstall 6.7.5
- snm pnpm default 6.7.5
- snm yarn list
- snm yarn list-remote
- snm yarn install 1.22.10
- snm yarn uninstall 1.22.10
- snm yarn default 1.22.10
- snm fig-spec
- snm install
- snm ci
- snm add
- snm delete
- snm run
- snm dlx
- snm exec
-
snm query
-
snm bump
-
snm outdated
-
snm update
-
snm dedupe
-
corepack auto download
-
check valid package manager
-
execute package manager command
use cargo-nextest to run tests
for Mac:
curl -LsSf https://get.nexte.st/latest/mac | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
# Without --test-threads=1, test will fail
cargo nextest run --test-threads=1