LogoAnchor Docs

Anchor Version Manager

AVM reference documentation

Anchor Version Manager (avm) is provided to manage multiple installations of the anchor-cli binary. This may be required to produce verifiable builds, or if you'd prefer to work with an alternate version.


Anchor version manager
 
USAGE:
    avm <SUBCOMMAND>
 
OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information
 
SUBCOMMANDS:
    help           Print this message or the help of the given subcommand(s)
    install        Install a version of Anchor
    list           List available versions of Anchor
    uninstall      Uninstall a version of Anchor
    update         Update to the latest Anchor version
    use            Use a specific version of Anchor
    self-update    Update avm itself to the latest version

Install

avm install <VERSION_OR_COMMIT>

Install the specified version of anchor-cli. The version argument should follow semver versioning. It is also possible to use latest as the version argument to install the latest stable version, or latest-pre-release for the latest pre-release:

avm install latest
avm install latest-pre-release

It's also possible to install based on a specific commit hash or a pre-release version tag:

# Specific pre-release
avm install 1.0.0-rc.3
 
# <VERSION>-<COMMIT>
avm install 0.30.1-cfe82aa682138f7c6c58bf7a78f48f7d63e9e466
 
# Full commit hash
avm install cfe82aa682138f7c6c58bf7a78f48f7d63e9e466
 
# Short commit hash
avm install cfe82aa

List

avm list [--pre-release]

List available versions. Pass --pre-release to include pre-release versions in the output:

avm list --pre-release

Uninstall

avm uninstall <version>

Update

avm update [--pre-release]

Update to the latest stable version. Pass --pre-release to allow updating to the latest pre-release instead:

avm update --pre-release

Use

avm use <version>

Use a specific version. This version will remain in use until you change it by calling the same command again. Similarly to avm install, you can use latest or latest-pre-release for the version argument:

avm use latest
avm use latest-pre-release

Self-update

avm self-update [--pre-release] [--bleeding-edge]

Update avm itself. By default installs the latest stable release of avm.

FlagDescription
--pre-releaseUpdate to the latest pre-release version instead of the latest stable
--bleeding-edgeBuild and install from the latest commit on the master branch (conflicts with --pre-release)
# Update avm to latest stable
avm self-update
 
# Update avm to latest pre-release
avm self-update --pre-release
 
# Install from the tip of master
avm self-update --bleeding-edge

avm will also passively warn you when it detects that a newer version of itself is available.

On this page

Edit on GitHub