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
| Runtime | Install and inspect |
|---|---|
| Node.js | omg use node 20, then omg which node. Provides node, npm, and npx |
| Python | omg use python 3.12. Provides python3 and pip |
| Go | omg use go 1.21. Provides go and gofmt |
| Rust | omg use rust stable or omg use rust nightly. Provides rustc and cargo |
| Ruby | omg use ruby 3.2. Provides ruby and gem |
| Java | omg use java 21. Provides java and javac |
| Bun | omg use bun latest. Provides bun |
| Deno | omg use deno latest. Provides deno |
| Pi | omg use pi 0.83.0. Installs through npm with lifecycle scripts disabled |
| Zig | omg use zig 0.13.0. Provides zig |
| .NET | omg use dotnet 8.0. Provides dotnet |
| Erlang | omg use erlang 26.2. Provides erl and erlc |
| PHP | omg use php 8.3. Provides php |
| Swift | omg use swift 5.10. Provides swift and swiftc |
How version switching works
The generated shell hook invokes omg hook-env when the prompt or directory changes.
OMG reads version files in the current directory and then walks through its parents. The nearest pin wins.
The hook resets the base PATH and prepends the concrete installed version directory requested by each pin.
Subshells, tmux, and screen inherit the resulting PATH.
Version file priority per runtime
| Runtime | Detection 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 |
| Rust | rust-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 |
| .NET | global.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 nodePython with a virtual environment
omg use python 3.12
omg list python
omg which pythonRecord 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 --availableOn 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
Note your versions with the old tool, for example nvm list or pyenv versions.
Install the same versions with OMG.
omg use node 20Keep both managers installed until you trust the switch, then remove the old entries from your shell profile.
When versions do not switch
Inspect the version OMG selected.
omg which nodeCheck that the selected directory comes first in PATH.
which -a nodeConfirm the project pin requests an installed version.
cat .node-versionInstall or reactivate the requested version.
omg use node 20.10.0Restart 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.