# 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.

Canonical: https://getomg.xyz/guides/migrate-from-nvm/
Updated: 2026-09-22
Author: OMG maintainers

## 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 command | OMG 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 --lts | omg 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 ls | omg list node (displays installed Node.js versions and indicates active symlink). |
| nvm ls-remote | omg list node --available (queries nodejs.org/dist/index.json in pure Rust). |
| nvm current | omg 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.

   ```sh
   node --version && which -a node && npm list -g --depth=0
   ```

2. Install OMG and enable shell integration for your shell (Bash, Zsh, or Fish).

   ```sh
   curl -fsSL https://getomg.xyz/install.sh | bash
   ```

3. Install your desired Node.js version using OMG.

   ```sh
   omg use node lts
   ```

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

   ```sh
   # 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.

   ```sh
   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

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

## Sources and verification

Source-reviewed guidance; not a claim of execution on every supported platform.

- [OMG Node.js manager (src/runtimes/node.rs)](https://getomg.xyz/docs/runtimes/)

- [OMG shell hook architecture (src/hooks/mod.rs)](https://getomg.xyz/docs/architecture/)

- [nvm project documentation](https://github.com/nvm-sh/nvm)

## Related pages

- https://getomg.xyz/runtimes/node/

- https://getomg.xyz/compare/omg-vs-nvm/

- https://getomg.xyz/guides/node-npm-pnpm/

