Sui provides a command line interface (CLI) tool to interact with the Sui network, its features, and the Move programming language. The complete suite of tools is called the Sui CLI, with commands grouped together by feature. Each group of commands is commonly referred to by its top-level command: Sui Client CLI, Sui Console CLI, Sui Keytool CLI, Sui Move CLI, and Sui Validator CLI.
Check Sui CLI installation
Before you can use the Sui CLI, you must install it. To check if the CLI exists on your system, open a terminal or console and type the following command:
If the terminal or console responds with a version number, you already have the Sui CLI installed.
If the command is not found, follow the instructions in Install Sui to get the Sui CLI on your system.
To get the latest version of the CLI, you can run the following command from a terminal or console. Be sure to replace
mainnet to get the desired version. For more information on the branches available, see Sui Environment Setup.
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch <BRANCH-NAME> sui
Sui CLI commands
There are a number of top-level commands available, but the five most useful to users are the following. Use the
help flag for the commands that are not documented yet. For example,
sui validator --help.
- Sui Client CLI: Use the
sui clientcommands to interact with the Sui network.
- Sui Console CLI: Use
sui consoleto open an interactive console with the currently active network.
- Sui Keytool CLI: Use the
sui keytoolcommands to access cryptography utilities.
- Sui Move CLI: Use the
sui movecommands to work with the Move programming language.
- Sui Validator CLI: Use the
sui validatorcommands to access tools useful for Sui validators.