Install the Aptos CLI on Windows
For Windows, the easiest way to install the Aptos CLI tool is via PowerShell script. If that does not work, you can also install manually via pre-compiled binaries. The pre-compiled binaries approach is not generally recommended as updating is very manual.
Install via PowerShell Script
Section titled “Install via PowerShell Script”-
In PowerShell, run the install script:
Terminal window Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; iwr https://aptos.dev/scripts/install_cli.ps1 | iex -
Verify the script is installed by opening a new terminal and running aptos help.
- You should see a list of commands you can run using the CLI.
- In the future, this is a helpful resource to learn exactly how each command works.
Install via Package Manager (Optional)
Section titled “Install via Package Manager (Optional)”If you have Scoop installed, you can run the following command to install the Aptos CLI:
Section titled “If you have Scoop installed, you can run the following command to install the Aptos CLI:”scoop install https://aptos.dev/scoop/aptos.json
If you have Chocolatey installed, you can run the following command to install the Aptos CLI:
Section titled “If you have Chocolatey installed, you can run the following command to install the Aptos CLI:”choco install aptos
If you have winget installed, you can run the following command to install the Aptos CLI:
Section titled “If you have winget installed, you can run the following command to install the Aptos CLI:”winget install aptos
Install via Pre-Compiled Binaries (Backup Method)
Section titled “Install via Pre-Compiled Binaries (Backup Method)”-
Go to the .
-
Expand “Assets” to see the pre-compiled binaries.
-
Download the zip file for Windows.
- It will have a name like:
aptos-cli-<version>-Windows-x86_64.zip
- You will likely have to dismiss warnings that this is a suspicious file when downloading.
- It will have a name like:
-
Unzip the downloaded file.
- Move the file to whichever folder you would like to call
aptos
from in the future.
- Move the file to whichever folder you would like to call
-
Right click, then copy the path to the executable.
Ex.
C:\Users\<username>\Downloads\aptos-cli-3.1.0-Windows-x86_64\aptos.exe
. -
Open PowerShell via the Start Menu.
-
Verify the installation by running the help command.
Use the path you copied earlier to call the Aptos CLI. Ex.
C:\Users\<username>\Downloads\aptos-cli-3.1.0-Windows-x86_64\aptos.exe help
.