Skip to main content
The sui client command provides tools for interacting with the Sui blockchain network.

Synopsis

Global Options

path
Path to client configuration file (default: ~/.sui/sui_config/client.yaml)
string
The Sui environment to use (must be present in config file)
boolean
Create a new sui config without prompting if none exists
boolean
Return command outputs in JSON format

Commands

active-address

Display the default address used for commands when none specified.
Example output:

active-env

Display the default environment used for commands when none specified.
Example output:

addresses

Obtain the addresses managed by the client.
boolean
Sort by alias instead of address
Example:

balance

List the coin balance of an address.
string
Address or its alias. If not specified, uses active address
string
Show balance for the specified coin (e.g., 0x2::sui::SUI). Shows all coins if not specified
boolean
Show a list with each coin’s object ID and balance
Example:

call

Call a Move function.
ObjectID
required
Object ID of the package containing the module
string
required
The name of the module in the package
string
required
Function name in module
TypeTag[]
Type arguments to the generic function. All must be specified
SuiJsonValue[]
Simplified ordered args like in the function syntax. ObjectIDs and addresses must be hex strings
ObjectID[]
IDs of gas objects for payment. Auto-selected if not provided
u64
Gas budget for this transaction (in MIST). If not provided, performs dry run to estimate
u64
Gas price for this transaction (in MIST). Uses reference gas price if not provided
Example:

chain-identifier

Query the chain identifier from the RPC endpoint.

dynamic-field

Query dynamic fields by parent object address.
ObjectID
required
The ID of the parent object
string
Optional paging cursor
u32
default:"50"
Maximum items returned per page

envs

List all Sui environments.
Example output:

faucet

Request gas coin from faucet.
string
Address or its alias. Uses active address if not specified
string
The url to the faucet. Auto-detected based on active network if not specified
Example:
For testnet tokens, use the Web UI at https://faucet.sui.io/

gas

Obtain all gas objects owned by an address.
string
Address or its alias owning the objects. Uses active address if not specified

merge-coin

Merge two coin objects into one coin.
ObjectID
required
The address of the coin to merge into
ObjectID
required
The address of the coin to be merged
u64
Gas budget for this transaction (in MIST)
Example:

new-address

Generate new address and keypair.
string
required
Keypair scheme: ed25519, secp256k1, or secp256r1
string
Optional alias for the address. Must start with a letter and contain only letters, digits, hyphens (-), or underscores (_)
string
Mnemonic word length: word12, word15, word18, word21, or word24. Default: word12
string
Optional derivation path. Defaults:
  • ed25519: m/44'/784'/0'/0'/0'
  • secp256k1: m/54'/784'/0'/0/0
  • secp256r1: m/74'/784'/0'/0/0
Example:

new-env

Add new Sui environment.
string
required
Environment alias
url
required
RPC server URL
url
WebSocket URL
string
Basic authentication in format username:password
Example:

object

Get object information.
ObjectID
required
Object ID of the object to fetch
boolean
Return the BCS serialized version of the object
Example:

objects

Obtain all objects owned by an address.
string
Address owning the objects. Uses active address if not specified. Accepts address or alias

pay

Pay coins to recipients following specified amounts.
ObjectID[]
required
The input coins to be used for pay recipients
string[]
required
The recipient addresses. Must be same length as amounts. Accepts addresses or aliases
u64[]
required
The amounts to be paid, following the order of recipients
u64
Gas budget for this transaction (in MIST)
Example:

pay-all-sui

Pay all residual SUI coins to recipient, after deducting gas cost.
ObjectID[]
required
The input coins including the gas coin
string
required
The recipient address or alias
u64
Gas budget for this transaction (in MIST)

pay-sui

Pay SUI coins to recipients following specified amounts.
ObjectID[]
required
The input coins including the gas coin
string[]
required
The recipient addresses. Must be same length as amounts
u64[]
required
The amounts to be paid
u64
Gas budget for this transaction (in MIST)

ptb

Run a Programmable Transaction Block from provided arguments.
See the PTB documentation for detailed syntax and examples.

publish

Publish Move modules.
path
default:"."
Path to directory containing a Move package
boolean
Publish without checking whether dependency source code compiles to on-chain bytecode
boolean
Check that dependency source code compiles to on-chain bytecode before publishing
boolean
Also publish transitive dependencies that have not already been published
u64
Gas budget for this transaction (in MIST)
Example:

remove-address

Remove an existing address by its alias or hexadecimal string.

split-coin

Split a coin object into multiple coins.
ObjectID
required
ID of the coin object to split
u64[]
Specific amounts to split out from the coin (mutually exclusive with —count)
u64
Count of equal-size coins to split into (mutually exclusive with —amounts)
u64
Gas budget for this transaction (in MIST)
Example:

switch

Switch active address and/or network environment.
string
Address or alias to use as active address
string
The RPC server environment to use
Example:

transfer

Transfer object to an address.
string
required
Recipient address or its alias
ObjectID
required
ID of the object to transfer
u64
Gas budget for this transaction (in MIST)
Example:

transfer-sui

Transfer SUI, and pay gas with the same SUI coin object.
string
required
Recipient address or its alias
ObjectID
required
ID of the coin to transfer (also used as gas)
u64
The amount to transfer. If not specified, the entire coin object will be transferred
u64
Gas budget for this transaction (in MIST)
Example:

tx-block

Get the effects of executing a transaction block.
TransactionDigest
required
Digest of the transaction block

upgrade

Upgrade Move modules.
path
default:"."
Path to directory containing a Move package
ObjectID
ID of the upgrade capability for the package being upgraded
boolean
Upgrade without checking whether dependency source code compiles to on-chain bytecode
boolean
Also publish transitive dependencies that have not already been published
u64
Gas budget for this transaction (in MIST)
Example:

verify-bytecode-meter

Run the bytecode verifier on a package.
path
Path to directory containing a Move package (defaults to current directory)
u64
Protocol version to use for the bytecode verifier (defaults to latest)
path[]
Paths to specific pre-compiled module bytecode to verify. Can be specified multiple times

verify-source

Verify local Move packages against on-chain packages.
path
default:"."
Path to directory containing a Move package
boolean
Verify on-chain dependencies
boolean
Don’t verify source (only valid if —verify-deps is enabled)
ObjectID
Override addresses for the package’s own modules. Only works for unpublished modules (whose addresses are 0x0)

Transaction Processing Options

Many commands support these transaction processing options:
boolean
Compute the transaction digest and print it, but do not execute
boolean
Perform a dry run of the transaction without executing it
boolean
Perform a dev inspect on the transaction
boolean
Serialize the BCS bytes of unsigned transaction data and print as Base64. Can be used with execute-signed-tx
boolean
Serialize the BCS bytes of signed transaction data and print as Base64. Can be used with execute-combined-signed-tx
SuiAddress
Set the transaction sender to this address

Examples

Complete Workflow: Creating and Funding an Address

Publishing and Interacting with a Package

Working with Coins