Learn how to compile, publish, test, and manage Move packages and smart contracts using the Supra CLI.
On May 2nd, 2025 a new version of the CLI was released. The new image (v9.0.12) introduced a number of changes, including an improved profile feature which deprecated the key command of the previous version (v6.3.0).
Please be advised that this page has not yet been updated.
What are Supra CLI Tools?
Tools in the Supra CLI are a set of commands designed to help developers interact with Move packages and smart contracts on the Supra network. They allow users to perform tasks such as compiling, publishing, testing, and running Move scripts, as well as documenting packages and managing on-chain resources. These tools serve as the foundation for building, deploying, and maintaining blockchain applications efficiently.
Here's how to use the Supra CLI commands to work with tools:
Not all CLI commands are listed here. Use the --help option to see the full list.
Clean Derived Artifacts
Removes derived artifacts of a Move package:
supra move tool clean [OPTIONS]
Additional Options:
--package-dir <PACKAGE_DIR>: Path to a move package (the folder with a Move.toml file)
Example:
supra move tool clean
Result:
{
"Result": "succeeded"
}
Compile a Package
Compiles a Move package and returns associated ModuleIds:
supra move tool compile --package-dir /supra/configs/move_workspace/<PROJECT_NAME>
Additional Options:
[OPTIONS]
--package-dir <PACKAGE_DIR>: Path to a move package (the folder with a Move.toml file)
Example:
supra move tool compile --package-dir /supra/configs/move_workspace/move
Result:
Compiling, may take a little while to download git dependencies...
FETCHING GIT DEPENDENCY https://github.com/Entropy-Foundation/aptos-core.git
INCLUDING DEPENDENCY AptosStdlib
INCLUDING DEPENDENCY MoveStdlib
INCLUDING DEPENDENCY SupraFramework
BUILDING supra_move
{
"Result": [
"ec07bc3d5c30f85fb8a4c799aba5e2f185e420a2b223f4c1fc2a2a8eeef8192d::transfer"
]
}
Initialize a Package
Creates a new Move package at a specified location:
supra move tool init --name <NAME>
Additional Options:
[OPTIONS]
--name <NAME>: Name of the new Move package
Example:
supra move tool move_project --name move
Result:
{
"Result": "Success"
}
Publish a Smart Contract
Publishes a compiled smart contract to the Supra blockchain:
supra move tool publish --package-dir /supra/configs/move_workspace/<PROJECT_NAME>
--profile <YOUR_PROFILE> --url <RPC_URL>
Additional Options:
[OPTIONS]
--package-dir <PACKAGE_DIR>: Path to a move package (the folder with a Move.toml file)
--profile <PROFILE>: Profile to use from the CLI config
--url <URL>: URL to a full node on the network
Example:
supra move tool publish --package-dir /supra/configs/move_workspace/move
--profile exampleAddress --url https://rpc-testnet.supra.com