SNM combines the best features of corepack, fnm, and ni to provide:
- 📦 Unified management of Node.js, npm, pnpm, and Yarn versions
- 💡 Intelligent package manager auto-switching based on project configuration
- ✅ Automatic validation of package manager against
packageManager
field - 🔄 Seamless Node.js version switching based on
.node-version
file - 🌟 Enhanced CLI experience with CodeWhisperer (Fig) integration
- 🚀 Lightning-fast performance with Rust implementation
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash
The installer supports several configuration options:
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash -s -- --install-dir "./.snm"
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash -s -- --skip-shell
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash -s -- --release "0.0.1-27"
You can combine multiple options:
curl -fsSL https://raw.githubusercontent.com/sheinsight/snm/main/install.sh | bash -s -- --install-dir "./.snm" --skip-shell --release "0.0.1-27"
SNM can be customized through environment variables:
Variable | Default | Description |
---|---|---|
SNM_HOME_DIR | ~/ | Workspace directory |
Variable | Default | Description |
---|---|---|
SNM_NPM_REGISTRY_HOST | https://registry.npmjs.org | npm registry URL |
SNM_NODE_DIST_URL | https://nodejs.org/dist | Node.js download URL |
SNM_NODE_GITHUB_RESOURCE_HOST | https://raw.githubusercontent.com | GitHub resource host |
Variable | Default | Description |
---|---|---|
SNM_STRICT | false | Enable strict mode for package manager validation |
For detailed usage instructions and advanced configuration options, please visit our documentation.
We welcome contributions! Please see our Contributing Guide for details.
MIT License © 2024 SheinSight