Skip documentation navigation
All Commands
Docs/Reference/All Commands
CLI Cheat Sheet

Complete Command Reference

Every command supported by avm-cli with real usage patterns.

avm init
Core

Initializes an .avm.json configuration file and adds .avm.local.json to .gitignore in the current working directory.

$avm init
Example Output:
✓ Created .avm.json in current directory
avm add[--global] <alias> <command>
Aliases

Adds an executable alias to local or global .avm.json configuration.

$avm add dev "pnpm run dev --filter web"
Example Output:
✓ Added local alias 'dev'
avm remove[--global] <alias>
Aliases

Removes an alias from the configuration file.

$avm remove dev
Example Output:
✓ Removed local alias 'dev'
avm list
Core

Displays all merged aliases, environment variables, tools, and plugin commands in effect.

$avm list
Example Output:
Aliases:
  dev       pnpm run dev (local)
  release   npm run release $1 (global)
Tools:
  node      22.14.0 (local)
  java      17.0.13+11 (global)
Env:
  NODE_ENV  development
avm which<alias-or-tool>
Core

Shows the exact file an alias or tool version comes from, including parent configs, profiles, personal overrides, and version files (.nvmrc, .tool-versions, …).

$avm which node
Example Output:
tool 'node': 22.14.0 (from ./.nvmrc)
avm trust[path] [--revoke | --list]
Core

Trusts this project's .avm.json and .env so their aliases and env apply. It shows what it enables; editing the file outside avm blocks it again until re-trusted.

$avm trust
Example Output:
  alias dev → pnpm run dev
  env   NODE_ENV=development
✓ Trusted ~/code/my-app/.avm.json
avm <alias>[args...]
Aliases

Executes a configured project alias or package.json script directly with injected environment and tools.

$avm dev --port 3000
avm resolve<alias> [args...]
Aliases

Expands and prints the exact shell command that would be executed.

$avm resolve dev
avm exec[--no-install] <tool@version>... -- <command> [args...]
Core

Runs a command with temporary tool versions (also: avm x), provider env and trusted project env. Installs missing versions without changing pins or lockfiles; --no-install selects installed versions only. Plugins must already be installed.

$avm exec node@18 java@21 -- ./gradlew build
avm run<alias> [--with <tool@version>]... [--no-install] [-- args...]
Aliases

Runs an alias, optionally with temporary tool versions. Repeat --with for multiple tools and place options before alias arguments. Missing versions install automatically unless --no-install is set.

$avm run --with node@18 dev --port 3000
avm install[--frozen]
Core

Installs project tools without changing pins, including global selections only when unlocked. Uses exact versions and verified downloads when .avm.lock exists. --frozen validates project selections and requires an asset for this platform.

$avm install --frozen
avm lock[--platform linux_amd64,darwin_arm64,windows_amd64]
Core

Locks project selections, excluding personal global pins, with exact versions, plugin identities and per-platform SHA-256 checksums. Requires updated native Node or Java plugins; Android and asdf support unlocked installs only.

$avm lock --platform linux_amd64,darwin_arm64
avm env[--shell sh|pwsh|cmd] [--env <profiles>]
Env

Prints shell statements for merged env and provider vars (JAVA_HOME, ANDROID_HOME, …). Loads parent configs, then nearest-directory base, profiles (AVM_ENV=ci,staging or --env ci,staging; later names win), and .avm.local.json overrides. Restores original values when leaving a project. Shell setup refreshes at prompts, on zsh directory changes, and around avm commands.

$avm env --shell pwsh
Example Output:
$env:NODE_ENV = 'development'
$env:JAVA_HOME = 'C:\Users\dev\.avm\tools\java\openjdk-17.0.13+11'
avm env add[-g] <KEY> <value>
Env

Adds an env var to local (or global with -g) .avm.json. Also avm ea. See env remove and env list for other operations.

$avm env add NODE_ENV development
Example Output:
✓ Added local env var 'NODE_ENV=development'
avm plugin add<name | org/repo | git-url | path>
Plugins

Installs a plugin's compiled release for your platform from the marketplace, after verifying its sha256 against the release's checksums.txt. A mismatch aborts with nothing installed. Also avm pa. Legacy asdf plugins use the compatibility adapter.

$avm plugin add node
Example Output:
Fetching 'node' from PrajaNova/avm-plugin-node...
✓ Installed node v0.2.0
avm plugin list[--all]
Plugins

Lists installed plugins and their discovery paths. --all also prints marketplace plugins.

$avm plugin list
Example Output:
Installed plugins:
  - node    (~/.avm/plugins/avm-plugin-node/bin/avm-plugin)
  - java    (~/.avm/plugins/avm-plugin-java/bin/avm-plugin)
  - android (~/.avm/plugins/avm-plugin-android/bin/avm-plugin)
avm plugin available
Plugins

Queries the marketplace registry and lists all installable plugins. Also avm plugin all or avm plugin marketplace.

$avm plugin available
avm plugin remove<name>
Plugins

Uninstalls an installed plugin binary from ~/.avm/plugins.

$avm plugin remove java
avm plugin update<name> | --all
Plugins

Checks for newer releases of the plugin and updates the binary.

$avm plugin update node
avm <plugin> versions
Versions

Lists installable upstream versions for a plugin (e.g. node, java, android).

$avm node versions
avm <plugin> <filter> versions
Versions

Filters available versions by major line or query.

$avm node 20 versions
avm <plugin> latest versions
Versions

Shows the latest upstream version available for installation.

$avm java latest versions
avm <plugin> use<version> [--global]
Versions

Sets the active version in local .avm.json (or global ~/.avm.json with --global).

$avm node use 22.14.0
avm <plugin> install<version> [--global | --no-pin]
Versions

Installs a runtime and pins it locally, also setting a global pin if none exists. --global pins globally only; --no-pin installs without changing pins. Fuzzy versions resolve before installation.

$avm java install 17
avm <plugin> uninstall<version>
Versions

Removes an installed runtime version from ~/.avm/tools/.

$avm node uninstall 18.20.0
avm shell-init[sh | pwsh]
Shims

Prints the shell hook that puts shims on PATH and applies env after each avm call (bash/zsh by default, or PowerShell).

$eval "$(avm shell-init)"
avm shims install
Shims

Regenerates shims for all managed tools in ~/.avm/shims.

$avm shims install
avm shims path
Shims

Prints the absolute path to the avm shims directory.

$avm shims path
Example Output:
~/.avm/shims
avm --version
Core

Print the installed CLI version; -v is the short form.

$avm --version
avm alias add[-g] <key> <command...>
Aliases

Add a local or global alias. Equivalent to avm add (also avm aa).

$avm alias add test "npm test"
avm alias remove[-g] <key>
Aliases

Remove an alias. Also avm alias rm, avm remove and avm rm.

$avm alias remove test
avm alias list
Aliases

List merged configured aliases. Also avm alias ls; avm list has the shortcut avm ls.

$avm alias list
avm env remove[-g] <key>
Env

Remove a configured variable from the local or global base config. Also avm env rm.

$avm env remove NODE_ENV
avm env list
Env

List merged configured environment values; use bare avm env for provider variables and shell exports. Also avm env ls.

$avm env list
avm outdated[--json]
Versions

Show current runtime selections, newest releases within the selected range and overall, and pin sources.

$avm outdated --json
avm upgrade[tools...] [--bump] [--dry-run] [-y]
Versions

Install newer versions within each pin range and update editable base pins. --bump allows major changes and asks for confirmation; -y confirms. Inherited/profile/version-file pins are kept at their source. Regenerate locks after pin changes.

$avm upgrade node --dry-run
avm prune[--older-than 90d] [--include-unrecorded] [--dry-run] [-y]
Versions

Remove versions unused by global pins or tracked projects. Preview first. --include-unrecorded considers versions without usage records; -y confirms deletion.

$avm prune --older-than 90d --dry-run
avm self-update[--version <version>]
Core

Update direct installations with checksum verification. For package-manager installations, print the matching upgrade command.

$avm self-update
avm plugin outdated[--json]
Plugins

Compare installed marketplace plugin versions against available releases.

$avm plugin outdated --json
avm create<name>
Plugins

Print instructions to create a plugin from the official template. Does not create or publish the repository automatically.

$avm create kotlin
avm <plugin>
Versions

Open the interactive provider menu in a terminal; show status when interactive input is unavailable.

$avm node
avm <plugin> list
Versions

Show selected and installed versions. Also avm <plugin> ls. versions has the alias available, and use has the alias set.

$avm java list
avm shims activate
Shims

Add the shim directory to Unix shell startup files (.zshenv, .bashrc, .profile). On Windows, add the output of shims path to user PATH separately.

$avm shims activate
avm shims remove<tool>
Shims

Remove one shim without uninstalling its runtime. Regenerate with shims install (also shims reshim).

$avm shims remove node
avm android avd list
Plugins

List Android Virtual Devices using the selected installed Android SDK. Also avd ls.

$avm android avd list
avm android avd create[name] [--api <level>] [--device <id>]
Plugins

Create an AVD interactively or supply name, API and device for scripting. Automatically install its matching system image in the selected SDK; device type selects the appropriate phone/TV/Wear/Automotive image tag. Also avd new.

$avm android avd create pixel-test --api 34 --device pixel_6
avm android avd start<name> [emulator args...]
Plugins

Launch an AVD with the selected SDK emulator. Additional arguments are forwarded. Also avd run.

$avm android avd start pixel-test -no-snapshot
avm android avd delete<name>
Plugins

Delete an AVD using the selected SDK. Also avd remove or avd rm.

$avm android avd delete pixel-test
Tip: run avm --help or avm <command> --help. Use avm --env ci <command> to select profiles for one invocation.