Skip documentation navigation
Version Files (.nvmrc, .tool-versions)
Docs/Usage/Version Files (.nvmrc, .tool-versions)

Version Files

avm reads the version files your projects already have, so you can try it without rewriting any config.

Precedence (nearest directory wins)

  1. .avm.json tools merged from parent and child layers (including profiles and personal overrides)
  2. .tool-versions (asdf format; nodejs maps to node)
  3. .nvmrc, .node-version, package.json (volta.node, else the engines.node range), .java-version, .sdkmanrc
  4. Global ~/.avm.json

Version files are searched upward from the current directory. Partial specs resolve to the newest installed match:

# .nvmrc: 20 → 20.11.1
# .nvmrc: lts/iron, lts/* → newest installed 20.x / newest LTS
# package.json engines: >=18 <21, ^20.1, 18 || 20 → newest installed match
# .java-version: 17 → openjdk-17.0.9+9

See which file won with avm which:

$ avm which node
tool 'node': 20.11.1 (from ./.nvmrc)

To ignore the tool-specific files (item 3), set "idiomatic_version_files": false in ~/.avm.json.