Runtime management

Install and switch Node.js, Python, Go, Rust, Ruby, Java, Bun, Deno, Pi, Zig, .NET, Erlang, PHP, and Swift versions with version-file auto-detection.

Supported runtimes

Native runtimes and their binaries

RuntimeInstall and inspect
Node.jsomg use node 20, then omg which node. Provides node, npm, and npx
Pythonomg use python 3.12. Provides python3 and pip
Goomg use go 1.21. Provides go and gofmt
Rustomg use rust stable or omg use rust nightly. Provides rustc and cargo
Rubyomg use ruby 3.2. Provides ruby and gem
Javaomg use java 21. Provides java and javac
Bunomg use bun latest. Provides bun
Denoomg use deno latest. Provides deno
Piomg use pi 0.83.0. Installs through npm with lifecycle scripts disabled
Zigomg use zig 0.13.0. Provides zig
.NETomg use dotnet 8.0. Provides dotnet
Erlangomg use erlang 26.2. Provides erl and erlc
PHPomg use php 8.3. Provides php
Swiftomg use swift 5.10. Provides swift and swiftc

How version switching works

Which version file wins OMG reads the project directory first and then its parents. Dedicated pins and supported language manifests come before .tool-versions; package.json follows for Node and Bun.
Which version file winsWhich version file wins. Steps in reading order: Project directory (checked upward); Runtime-specific pin (.node-version, go.mod); Language manifest (go.mod, pyproject.toml); .tool-versions (multi-runtime pin); package.json (Node.js or Bun); Version on PATH. Connections: Project directory to Runtime-specific pin; Runtime-specific pin to Language manifest (not set); Language manifest to .tool-versions (not set); .tool-versions to package.json (not set); Runtime-specific pin to Version on PATH; Language manifest to Version on PATH; .tool-versions to Version on PATH; package.json to Version on PATH.Project directorychecked upwardRuntime-specific pin.node-version, go.modLanguage manifestgo.mod, pyproject.toml.tool-versionsmulti-runtime pinpackage.jsonNode.js or BunVersion on PATHnot setnot setnot set
  1. The generated shell hook invokes omg hook-env when the prompt or directory changes.

  2. OMG reads version files in the current directory and then walks through its parents. The nearest pin wins.

  3. The hook resets the base PATH and prepends the concrete installed version directory requested by each pin.

  4. Subshells, tmux, and screen inherit the resulting PATH.

Version file priority per runtime

RuntimeDetection order
Node.js.node-version, .nvmrc, package.json, then .tool-versions
Python.python-version, pyproject.toml, then .tool-versions
Go.go-version, go.mod, then .tool-versions
Rustrust-toolchain, rust-toolchain.toml, then .tool-versions
Ruby.ruby-version, then .tool-versions
PHP.php-version, then .tool-versions
Swift.swift-version, then .tool-versions
Java.java-version, then .tool-versions
Bun.bun-version, .tool-versions, then package.json
Deno.deno-version, .dvmrc, then .tool-versions
Zig.zig-version, then .tool-versions
.NETglobal.json, then .tool-versions
Erlang and Pi.tool-versions

When no version file matches, the hook restores the base PATH. omg use installs the requested version and updates its current symlink. A matching project pin controls PATH the next time the hook runs. Runtime archives have provider-specific host support; native runtime management runs on supported Unix targets and is not a native Windows installation path.

Common runtime tasks

Node.js

omg use node lts
omg list node
omg list node --available
omg which node

Python with a virtual environment

omg use python 3.12
omg list python
omg which python

Record the required installed Python version in .python-version before relying on the shell hook. At a new prompt, verify python3 --version and which -a python3. Then create a fresh environment with python3 -m venv .venv. Invoke .venv/bin/python and .venv/bin/python -m pip explicitly: the reviewed Bash and Zsh hooks reset PATH at each prompt and can undo virtual-environment activation.

Rust components through rust-toolchain.toml

[toolchain]
channel = "stable"
components = ["clippy", "rustfmt"]

Deno

omg use deno latest
echo "2.9" > .deno-version
omg list deno --available

On Arch, Debian, and Ubuntu, omg env capture records selected runtime versions and explicit package names in omg.lock. Teammates use omg env check to inspect drift. This capture path is unavailable on Fedora and macOS, and the lock does not include application dependencies.

Where versions live and how they are verified

  • Every runtime installs under the OMG data directory. The default versions path is ~/.local/share/omg/versions on Linux and ~/Library/Application Support/omg/versions on macOS. Runtime switching does not need sudo.
  • Verification depends on the provider. Archive-based managers compare published SHA-256 checksums when available; Python uses python-build-standalone metadata, Java uses Adoptium checksums, and Bun and Deno use release metadata or checksum sidecars. Pi installs through npm with lifecycle scripts disabled.
  • Direct runtime downloads use HTTPS with certificate validation.
  • OMG stages an installation in a temporary directory on the same filesystem, then publishes the version directory after installation and validation succeed.
  • Each installed version has its own directory. Switch away from a version before removing it with omg use <runtime> <version> --uninstall.

Migrating from other version managers

  1. Note your versions with the old tool, for example nvm list or pyenv versions.

  2. Install the same versions with OMG.

    omg use node 20
  3. Keep both managers installed until you trust the switch, then remove the old entries from your shell profile.

When versions do not switch

  1. Inspect the version OMG selected.

    omg which node
  2. Check that the selected directory comes first in PATH.

    which -a node
  3. Confirm the project pin requests an installed version.

    cat .node-version
  4. Install or reactivate the requested version.

    omg use node 20.10.0
  5. Restart the shell so the hook reloads.

    exec zsh

If the shell hook is missing entirely, PATH never updates on directory change. Confirm that eval of omg hook for your shell is present in the profile, and see the troubleshooting topic for the full checklist. Conflicting global packages from a previous manager can shadow OMG binaries; remove those PATH entries first.

Reviewed against omg-cli/omg/docs/runtimes.md at commit c43c8ff on 2026-09-22. This page was checked against the CLI code and documentation at that commit.