Skip to content

LayerZero-Labs/aptosup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aptos CLI Version Manager - aptosup

This is a simple script to update and install the Aptos CLI to a specific version. It also lets you toggle between different versions of the Aptos CLI.

Usage

Prerequisite - install dependencies if required

If you run into issues related to dependencies or you get a false positive install successful message please refer - https://aptos.dev/en/network/nodes/building-from-source#set-up-build-dependencies for a list of dependencies that aptos requires.

Install aptosup

curl -sSL https://raw.githubusercontent.com/LayerZero-Labs/aptosup/main/install | bash

Install aptosup from source

For installing from source please refer to Install from source

Addition to your .zshrc or .bashrc

echo "export PATH=\"$HOME/.aptosup:\$PATH\"" >> ~/.zshrc

and then refresh your shell

source ~/.zshrc

for bash use ~/.bashrc instead of ~/.zshrc

List installed aptos versions

aptosup -l

Installing aptos version

Note: You will be prompted to enter your sudo password during the process - as it might need to install dependencies via your package manager.

Install and set as active version

This sets the default version to be installed and set as active version.

aptosup -d <version>

Only install

aptosup -i <version>

This only installs the new version, you will need to set it as active version manually.

  • if you want to install version 3.5.0 for movement network - aptosup -i 3.5.0
  • if you want to install version 6.0.1 for aptos network - aptosup -i 6.0.1

The script checks if the aptos binary already exists in $HOME/.aptos. If it does, it switches the current active version to the new installed version.

Set active installed aptos version

aptosup -s <version>

Remove installed aptos version

aptosup -r <version>

Update aptosup

aptosup -u

Troubleshooting

python-homebrew on macos

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.

Create a python environment (python doc)[https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/] and re-run from within it

About

aptos version manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages