Skip to content

rnmjs/jrm

Repository files navigation

JRM - JavaScript Runtime Manager

GitHub license

A fast and simple version manager for JavaScript runtimes and package managers. Alternative to FNM and Corepack.

  • Supported Runtimes: Node.js, Bun, Deno
  • Supported Package Managers: npm, Yarn, pnpm
  • Supported Platforms: macOS, Linux
  • Supported Shells: bash, zsh

✨ Features

  • 🚀 Fast & Lightweight — Written in TypeScript, bundled with esbuild
  • 🎯 Auto-Detection — Automatically detects versions from package.json
  • 📦 Version Range Support — Use semver ranges like node@>=20
  • 🌐 Custom Registry — Respects your npm registry configuration

🚀 Installation

# Linux/macOS (may require sudo)
curl -L "https://github.com/rnmjs/jrm/releases/latest/download/jrm-$(uname -s)-$(uname -m)" -o /usr/local/bin/jrm
chmod +x /usr/local/bin/jrm

See GitHub Releases for all platforms.

jrm --help

📖 Usage

1. Shell Setup

Add this to ~/.bashrc or ~/.zshrc, then restart your terminal:

eval "$(jrm env)"

2. Use Versions

# Specific versions (the -y flag skips the interactive confirmation prompt)
jrm use -y node@18
jrm use -y [email protected] [email protected]

node -v # 18.x.x
bun -v # 1.3.5
deno -v # 2.6.3

# Package manager versions
jrm use -y pnpm@9
jrm use -y [email protected]

pnpm -v # 9.x.x
yarn -v # 4.6.0

3. Project Configuration

With eval "$(jrm env)" enabled, JRM auto-detects versions and uses correct versions when you cd into a project. Configure versions using:

JRM config file (.jrmrc.json or jrm.config.json):

{
  "runtime": {
    "name": "node",
    "version": "^20.0.0"
  },
  "packageManager": {
    "name": "pnpm",
    "version": "9.0.0"
  }
}

Or package.json devEngines:

{
  "devEngines": {
    "runtime": {
      "name": "node",
      "version": "^20.0.0"
    },
    "packageManager": {
      "name": "pnpm",
      "version": "9.0.0"
    }
  }
}

Priority order: package.json devEngines > .jrmrc.json > jrm.config.json.

node -v # 20.x.x
pnpm -v # 9.0.0

4. Other Commands

# Install specific versions
jrm install node@20
jrm install [email protected] [email protected]

# List installed versions
jrm list
jrm list node
jrm list pnpm

# Uninstall a version
jrm uninstall [email protected]

🗑️ Uninstallation

  1. Remove JRM binary: rm /usr/local/bin/jrm
  2. Remove JRM data: rm -rf ~/.jrm
  3. Remove eval "$(jrm env)" from your shell profile

👀 See Also

  • fnm — Fast Node.js version manager in Rust (JRM is inspired by this)
  • @rnm/pm — Unified Package manager for Node.js

🤝 Contributing

git clone https://github.com/rnmjs/jrm.git
cd jrm
pnpm install
pnpm test
pnpm build

📄 License

MIT

About

A fast and simple version manager for JavaScript runtimes and package managers, supporting Node.js, Bun, Deno, npm, Yarn and pnpm.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors