Move an nvm project to OMG

Reuse existing .nvmrc files, compare the selected Node.js version and executable path, and test OMG without deleting your nvm setup.

How the shell integrations differ

nvm is a shell tool commonly sourced during shell startup. Its nvm use command selects a version from .nvmrc; automatic switching on directory changes requires extra shell integration.

OMG uses a compiled Rust binary (`src/runtimes/node.rs` and `src/hooks/mod.rs`) and a shell hook that evaluates project pins at the prompt, then adjusts PATH to the installed runtime. The actual shell cost depends on your configuration and machine.

OMG reads existing `.nvmrc` files without changing them, so you can test one project before changing your established setup.

Command mapping from nvm to OMG

Direct command equivalents

nvm commandOMG equivalent and notes
nvm install <version>omg use node <version> (downloads prebuilt binary, verifies SHA-256 in memory, extracts with pure-Rust tar.xz unpacker, and activates).
nvm install --ltsomg use node lts (or omg use node lts/<codename> like lts/iron).
nvm use <version>omg use node <version> (switches active version via symlink).
nvm lsomg list node (displays installed Node.js versions and indicates active symlink).
nvm ls-remoteomg list node --available (queries nodejs.org/dist/index.json in pure Rust).
nvm currentomg which node (reports the selected version); use command -v node to see the executable path.

Safe, step-by-step migration process

  1. Audit your current Node.js setup and list globally installed packages.

    node --version && which -a node && npm list -g --depth=0
  2. Install OMG and enable shell integration for your shell (Bash, Zsh, or Fish).

    curl -fsSL https://getomg.xyz/install.sh | bash
  3. Install your desired Node.js version using OMG.

    omg use node lts
  4. Comment out the nvm sourcing lines in your ~/.bashrc or ~/.zshrc file.

    # source ~/.nvm/nvm.sh
    # [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
  5. Open a fresh terminal and verify the selected version and executable path.

    node --version && omg which node && command -v node

Keep your `~/.nvm` directory while you test your local repositories. OMG reads existing `.nvmrc` files; check each project’s requested version, installed runtime, and command path before removing your nvm shell setup.

What you gain beyond Node.js

While nvm only manages Node.js, OMG is a polyglot manager. You can use the exact same CLI syntax and fast shell hook for 14 runtimes (Python, Go, Rust, Bun, Deno, Ruby, Java, PHP, Swift, Zig, .NET), 54 curated developer CLI tools (`ripgrep`, `starship`, `fzf`, `bat`, `eza`), and native system packages across Linux and macOS.

Explore polyglot management with OMG

omg use go 1.24
omg use rust stable
omg tool install ripgrep
omg run build

Sources and verification

Commands and behavior are based on the references below. Source review is not a claim that every workflow has been executed on every supported platform.

Read as Markdown