The Sui CLI is a comprehensive command-line tool for interacting with the Sui blockchain. It provides functionality for managing keys, interacting with the network, building and deploying Move packages, and operating validators.
Installation
See the Installation Guide for detailed instructions on installing the Sui CLI.
Available Commands
The Sui CLI is organized into several command groups:
Network Interaction
- sui client - Client for interacting with the Sui network
- Manage addresses and environments
- Query objects and balances
- Execute transactions
- Call Move functions
Move Development
- sui move - Tool to build and test Move applications
- Build Move packages
- Run tests
- Generate coverage reports
- Create new packages
Key Management
- sui keytool - Sui keystore tool for managing cryptographic keys
- Generate and import keys
- Sign transactions
- Manage MultiSig configurations
- ZkLogin operations
Validator Operations
- sui validator - Tools for validators and validator candidates
- Join/leave validator committee
- Update validator metadata
- Manage gas prices
- Bridge committee operations
Network Setup
Common Workflows
Getting Started
- Install the Sui CLI
- Create a new address:
sui client new-address ed25519
- Get test tokens from faucet:
sui client faucet
- Check your balance:
sui client balance
Deploying a Package
- Create a new Move package:
sui move new my_package
- Build the package:
sui move build
- Test the package:
sui move test
- Publish to network:
sui client publish
Running a Local Network
- Start a local network:
sui start
- The network runs with default configuration
- Access via RPC at
http://127.0.0.1:9000
Configuration
The Sui CLI stores configuration in ~/.sui/sui_config/ by default:
client.yaml - Client configuration (active address, environments)
sui.keystore - Encrypted keystore for private keys
sui.aliases - Address aliases
Global Flags
Most commands support these global flags:
--json - Return command outputs in JSON format
--client.config - Path to client configuration file
--client.env - Sui environment to use
-y, --yes - Accept defaults without prompting
Environment Variables
Protocol configuration can be overridden for local networks:
# Enable protocol config overrides
export SUI_PROTOCOL_CONFIG_OVERRIDE_ENABLE=1
# Set specific parameters
export SUI_PROTOCOL_CONFIG_OVERRIDE_min_checkpoint_interval_ms=1000
Overriding protocol parameters should only be done in local development networks. Using incompatible values across nodes may cause network failures.
Getting Help
For detailed help on any command:
sui <command> --help
sui <command> <subcommand> --help
For shell completion:
sui completion --generate <shell>
Supported shells: bash, zsh, fish, powershell, elvish