Skip to main content

Sui Console CLI

Sui CLI的console命令提供了命令级别的访问,通过将 Sui Client CLI 命令包装在类似shell的功能中,与Sui网络进行交互。此命令启动一个新进程,并为用户提供一个运行所有可用 Sui Client CLI 命令的环境。此外,它还提供命令历史记录支持。

验证 Sui CLI 的安装

在使用 Sui CLI 前,您需要先进行安装。要验证您的系统是否已安装 CLI,可以打开终端或控制台,输入下列命令:

sui --version

如果终端或控制台显示了版本号,说明您的系统已安装 Sui CLI。

如果出现“命令未找到”的提示,请根据 Sui 安装指南 的指导在您的系统中安装 Sui CLI。

命令

要查看所有可用的命令,请参阅Sui Client CLI文档。要启动Sui控制台,请输入sui console,它会显示类似以下信息:

🚀 ~ % sui console
_____ _ ______ __
/ ___/__ __(_) / ____/___ ____ _________ / /__
\__ \/ / / / / / / / __ \/ __ \/ ___/ __ \/ / _ \
___/ / /_/ / / / /___/ /_/ / / / (__ ) /_/ / / __/
/____/\__,_/_/ \____/\____/_/ /_/____/\____/_/\___/
--- Sui Console 1.14.0 ---

Managed addresses : 2
Active address: 0x3...235
Keystore Type : File
Keystore Path : Some("/Users/user/.sui/sui_config/sui.keystore")
Active environment : testnet
RPC URL: https://fullnode.testnet.sui.io:443
[warn] Client/Server api version mismatch, client api version : 1.14.0, server api version : 1.13.0
Connecting to Sui full node. API version 1.13.0

Available RPC methods: ["sui_devInspectTransactionBlock", "sui_dryRunTransactionBlock", "sui_executeTransactionBlock",
"sui_getChainIdentifier", "sui_getCheckpoint", "sui_getCheckpoints", "sui_getEvents", "sui_getLatestCheckpointSequenceNumber",
"sui_getLoadedChildObjects", "sui_getMoveFunctionArgTypes", "sui_getNormalizedMoveFunction", "sui_getNormalizedMoveModule",
"sui_getNormalizedMoveModulesByPackage", "sui_getNormalizedMoveStruct", "sui_getObject", "sui_getProtocolConfig",
"sui_getTotalTransactionBlocks", "sui_getTransactionBlock", "sui_multiGetObjects", "sui_multiGetTransactionBlocks",
"sui_tryGetPastObject", "sui_tryMultiGetPastObjects", "suix_getAllBalances", "suix_getAllCoins", "suix_getBalance",
"suix_getCoinMetadata", "suix_getCoins", "suix_getCommitteeInfo", "suix_getDynamicFieldObject", "suix_getDynamicFields",
"suix_getLatestSuiSystemState", "suix_getOwnedObjects", "suix_getReferenceGasPrice", "suix_getStakes", "suix_getStakesByIds",
"suix_getTotalSupply", "suix_getValidatorsApy", "suix_queryEvents", "suix_queryTransactionBlocks", "suix_resolveNameServiceAddress",
"suix_resolveNameServiceNames", "suix_subscribeEvent", "suix_subscribeTransaction", "unsafe_batchTransaction", "unsafe_mergeCoins",
"unsafe_moveCall", "unsafe_pay", "unsafe_payAllSui", "unsafe_paySui", "unsafe_publish", "unsafe_requestAddStake",
"unsafe_requestWithdrawStake", "unsafe_splitCoin", "unsafe_splitCoinEqual", "unsafe_transferObject", "unsafe_transferSui"]

Welcome to the Sui interactive console.

sui>-$