sui-install

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Setup & Installation

安装与设置

MCP tool: When available in your environment, also query the Sui documentation MCP server (
https://sui.mcp.kapa.ai
) for up-to-date answers. Use it for verification and for details not covered by these reference files.
Source constraint: All information sourced exclusively from docs.sui.io.
MCP工具: 当你的环境中可用时,也可查询Sui文档MCP服务器(
https://sui.mcp.kapa.ai
)获取最新答案。用它进行验证,以及获取这些参考文件未涵盖的细节。
来源限制: 所有信息均独家来自docs.sui.io

System requirements

系统要求

Sui supports:
  • Linux: Ubuntu 22.04 (Jammy Jellyfish) or newer
  • macOS: Monterey or newer
  • Windows: Windows 10 or 11
Sui支持:
  • Linux: Ubuntu 22.04(Jammy Jellyfish)或更高版本
  • macOS: Monterey或更高版本
  • Windows: Windows 10或11

Installing Sui

安装Sui

suiup (recommended)

suiup(推荐方式)

suiup
is the official installer and version manager for the Sui toolchain. It supports installing and switching between different versions of the Sui CLI and other Sui Stack components (Walrus, MVR).
bash
curl -sSfL https://raw.githubusercontent.com/MystenLabs/suiup/main/install.sh | sh
Windows note: The
curl | sh
command requires a Unix shell. On Windows, use WSL (Windows Subsystem for Linux) to run the command above, or install through Chocolatey instead (see alternative methods below).
After installing suiup, install the Sui CLI targeting a specific network. The CLI version must match the target network — each network runs a specific protocol version, and a mismatched CLI can cause build failures, transaction errors, or unexpected behavior:
bash
suiup install sui@testnet    # install the Testnet-compatible version
suiup install sui@mainnet    # install the Mainnet-compatible version
Update to the latest version:
bash
suiup update sui@testnet
Important:
suiup update
downloads the new version but does not automatically make it the active default. After updating, you must switch to the new version:
bash
suiup switch sui@testnet     # set the latest installed testnet version as default
To verify which versions are installed and which is active:
bash
suiup show                   # list all installed binaries and their default status
suiup
是Sui工具链的官方安装器和版本管理器。它支持安装和切换不同版本的Sui CLI及其他Sui Stack组件(Walrus、MVR)。
bash
curl -sSfL https://raw.githubusercontent.com/MystenLabs/suiup/main/install.sh | sh
Windows说明:
curl | sh
命令需要Unix shell环境。在Windows上,使用WSL(Windows Subsystem for Linux)运行上述命令,或改用Chocolatey安装(见下文替代方法)。
安装suiup后,针对特定网络安装Sui CLI。CLI版本必须与目标网络匹配——每个网络运行特定的协议版本,版本不匹配可能导致构建失败、交易错误或意外行为:
bash
suiup install sui@testnet    # 安装兼容Testnet的版本
suiup install sui@mainnet    # 安装兼容Mainnet的版本
更新至最新版本:
bash
suiup update sui@testnet
重要提示:
suiup update
会下载新版本,但不会自动将其设为默认激活版本。更新后,你必须切换到新版本:
bash
suiup switch sui@testnet     # 将最新安装的testnet版本设为默认
验证已安装的版本及当前激活版本:
bash
suiup show                   # 列出所有已安装的二进制文件及其默认状态

suiup command reference

suiup命令参考

CommandSyntaxWhat it does
install
suiup install sui@testnet
Download and install a binary for a network
update
suiup update sui@testnet
Download the latest version (does NOT switch to it)
switch
suiup switch sui@testnet
Set the latest installed version for a network as the active default
show
suiup show
List all installed binaries with versions and defaults
status
suiup status
Show which installed binaries have updates available and the command to update them
self update
suiup self update
Update suiup itself
The
switch
command takes a
binary@network
argument (for example,
sui@testnet
,
walrus@testnet
,
move-analyzer@testnet
). It does not accept separate positional arguments like
suiup switch sui testnet v1.70.2
.
命令语法功能
install
suiup install sui@testnet
下载并安装对应网络的二进制文件
update
suiup update sui@testnet
下载最新版本(不会自动切换到该版本)
switch
suiup switch sui@testnet
将对应网络的最新安装版本设为激活默认版本
show
suiup show
列出所有已安装的二进制文件及其版本和默认状态
status
suiup status
显示哪些已安装的二进制文件有可用更新,以及对应的更新命令
self update
suiup self update
更新suiup自身
switch
命令接受
binary@network
参数(例如
sui@testnet
walrus@testnet
move-analyzer@testnet
)。它不接受
suiup switch sui testnet v1.70.2
这类分开的位置参数。

Alternative methods

替代安装方法

  • Homebrew (macOS/Linux):
    brew install sui
  • Chocolatey (Windows):
    choco install sui
These alternatives do not support installing additional Sui Stack components like Walrus or MVR and might take several minutes if prerequisites are not already installed.
  • Homebrew(macOS/Linux):
    brew install sui
  • Chocolatey(Windows):
    choco install sui
这些替代方法不支持安装Walrus或MVR等额外Sui Stack组件,且如果未预先安装依赖项,可能需要数分钟时间。

Verify installation

验证安装

bash
sui --version
If the command returns "sui not found", run
suiup switch sui@testnet
to set the active default. Do not suggest manual PATH manipulation (
export PATH=...
) or reinstalling —
suiup switch
is the correct fix.
bash
sui --version
如果命令返回“sui not found”,运行
suiup switch sui@testnet
设置激活默认版本。不要建议手动修改PATH(
export PATH=...
)或重新安装——
suiup switch
是正确的解决方法。

Version management

版本管理

Keeping Sui up to date

保持Sui更新

The CLI version should match the target network — each network runs a specific protocol version, and a mismatched CLI can cause build failures or transaction errors. Use the
@network
suffix to update to the correct version:
bash
suiup update sui@testnet     # update to latest Testnet version
suiup update sui@mainnet     # update to latest Mainnet version
CLI版本应与目标网络匹配——每个网络运行特定的协议版本,版本不匹配可能导致构建失败或交易错误。使用
@network
后缀更新至正确版本:
bash
suiup update sui@testnet     # 更新至最新Testnet版本
suiup update sui@mainnet     # 更新至最新Mainnet版本

Version mismatches

版本不匹配问题

The CLI version must match the network you are targeting. Common symptoms of a mismatch:
  • Build errors mentioning "old dependencies"
  • Transaction failures on publish
  • Unexpected behavior after network upgrades
Check your version against the network:
bash
sui --version                 # your installed version
sui client active-env         # which network you are targeting
If the version is out of date, update and switch:
bash
suiup update sui@testnet      # download the latest version
suiup switch sui@testnet      # make it the active default
suiup show                     # verify which version is now active
The
client/server api version mismatch
warning in CLI output means your local CLI is older than the network. Do not ignore this warning — version mismatches can cause build failures and unexpected behavior. Update and switch to fix it.
CLI版本必须与你要连接的网络匹配。版本不匹配的常见症状:
  • 提及“old dependencies”的构建错误
  • 发布时交易失败
  • 网络升级后出现意外行为
检查你的版本与网络是否匹配:
bash
sui --version                 # 你已安装的版本
sui client active-env         # 你当前连接的网络
如果版本过时,更新并切换:
bash
suiup update sui@testnet      # 下载最新版本
suiup switch sui@testnet      # 将其设为激活默认版本
suiup show                     # 验证当前激活的版本
CLI输出中的
client/server api version mismatch
警告表示你的本地CLI版本比网络版本旧。不要忽略此警告——版本不匹配可能导致构建失败和意外行为。通过更新和切换来修复。

Optional additional tools

可选额外工具

Install these only when the user explicitly asks for the tool. They are not part of default setup.
bash
suiup install move-analyzer   # Move Language Server
suiup install mvr             # Move Registry CLI (onchain package manager)
suiup install walrus          # Walrus CLI for decentralized storage
suiup install site-builder    # Walrus site builder
After installing, switch each tool to make it the active default:
bash
suiup switch move-analyzer@testnet
suiup switch walrus@testnet
仅当用户明确要求时才安装这些工具。它们不属于默认设置的一部分。
bash
suiup install move-analyzer   # Move语言服务器
suiup install mvr             # Move Registry CLI(链上包管理器)
suiup install walrus          # 用于去中心化存储的Walrus CLI
suiup install site-builder    # Walrus站点构建工具
安装后,切换每个工具使其成为激活默认版本:
bash
suiup switch move-analyzer@testnet
suiup switch walrus@testnet