sui-move
Compile and manage Sui Move smart contracts
TLDR
Create a new Move project in the given folder
Test the Move project in the current directory
Test with coverage and get a summary
Find which parts of your code are covered from tests (i.e. explain coverage results)
Build the Move project in the current directory
Build the Move project from the given path
Migrate to Move 2024 for the package at the provided path
SYNOPSIS
sui move subcommand [options]
PARAMETERS
build
Builds the current Move package or a specified package.
test
Runs unit tests defined in the current Move package or a specified package.
lint
Runs linting checks on the current Move package or a specified package.
docgen
Generates documentation for the current Move package or a specified package.
package
Specifies the directory of the Move package to operate on.
DESCRIPTION
The `sui move` command is the primary tool for developing, testing, and interacting with Sui Move smart contracts on the Sui blockchain. It provides functionalities such as compiling Move packages, running unit tests, generating package documentation, building transaction blocks, and inspecting compiled artifacts.
It allows developers to write smart contracts in the Move language, ensuring resource safety and ownership. The command streamlines the development workflow by providing tools to verify code correctness through unit tests and provides options to build and deploy the contracts.
With `sui move`, developers can build, test, and deploy decentralized applications (dApps) and smart contracts on the Sui blockchain effectively.
CAVEATS
Ensure you have the Sui binaries installed and configured correctly. The current directory must be the root of a Sui Move package or `package` option must be supplied.
Sui Move dependencies need to be resolved and available before building or testing.
COMMON BUILD OPTIONS
The `build` subcommand often includes options for specifying the target architecture, optimization level, and output directory. Consult `sui move build --help` for a complete listing.
ERROR HANDLING
Compilation errors and test failures will typically result in non-zero exit codes, allowing for integration with automated build systems and CI/CD pipelines.
HISTORY
The `sui move` command was introduced as part of the Sui blockchain platform to provide developers with a dedicated toolset for creating and managing smart contracts written in the Move language. The development of `sui move` is closely tied to the evolution of the Sui blockchain and the Move language itself. Its usage has become integral to building and deploying decentralized applications (dApps) on the Sui network. Early versions focused on basic compilation and testing, while later versions added features like documentation generation and linting.
SEE ALSO
sui client(1)