nodenv: No-Fuss Node Version Management
If you've ever had to juggle multiple Node.js projects that each demand a specific version, you know the pain of switching manually. nvm, fnm, and others exist, but sometimes you just want something that gets out of your way. That's where nodenv comes in.
It's a lightweight Node.js version manager that automatically picks the right version based on your project directory. No global commands to remember, no shell magic. It just works.
What It Does
nodenv lets you set per-project Node.js versions using a simple .node-version file in your project root. When you cd into that directory, nodenv automatically switches to the correct Node version. That's it.
Under the hood, it's a fork of rbenv (the Ruby version manager), so it inherits the same minimal, shim-based approach. It doesn't hook into your shell or load heavy scripts – it just places tiny "shim" executables in your PATH that forward calls to the right Node binary.
Why It's Cool
- Zero overhead – nodenv doesn't load scripts into your shell prompt or add runtime hooks. The shims are incredibly fast.
- Plugin ecosystem – there are community plugins for automatic
npmversion switching,yarnsupport, and evennpxcompatibility. Want to auto-install missing Node versions? There's a plugin for that. - Works with CI – since it uses a plain
.node-versionfile, you can commit that file to your repo, and CI tools can read it directly. - No "nvm use" required – just
cdinto a directory. It's like magic, but predictable.
How to Try It
Install via Homebrew (macOS/Linux):
brew install nodenv
Or clone the repo manually:
git clone https://github.com/nodenv/nodenv.git ~/.nodenv
Then add this to your shell config (.bashrc, .zshrc):
export PATH="$HOME/.nodenv/bin:$PATH"
eval "$(nodenv init -)"
After reloading your shell, you're ready:
# Install a Node version
nodenv install 18.17.0
# Set it globally (optional)
nodenv global 18.17.0
# Set it for a project
cd my-project
nodenv local 18.17.0 # creates .node-version file
That's all. Now every time you cd into that project, the correct Node version is active.
Final Thoughts
nodenv is for developers who want version management to be invisible. It's not flashy, but it's solid. If you're tired of typing nvm use every time you switch projects, or if you want something that's easier to reason about in CI pipelines, give it a try.
It does one thing and does it well. Sometimes that's exactly what you need.
Found this helpful? Follow us for more developer tools and insights: @githubprojects