sui-install
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSetup & Installation
安装与设置
MCP tool: When available in your environment, also query the Sui documentation MCP server () for up-to-date answers. Use it for verification and for details not covered by these reference files.https://sui.mcp.kapa.ai
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(推荐方式)
suiupbash
curl -sSfL https://raw.githubusercontent.com/MystenLabs/suiup/main/install.sh | shWindows note: The 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).
curl | shAfter 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 versionUpdate to the latest version:
bash
suiup update sui@testnetImportant: downloads the new version but does not automatically make it the active default. After updating, you must switch to the new version:
suiup updatebash
suiup switch sui@testnet # set the latest installed testnet version as defaultTo verify which versions are installed and which is active:
bash
suiup show # list all installed binaries and their default statussuiupbash
curl -sSfL https://raw.githubusercontent.com/MystenLabs/suiup/main/install.sh | shWindows说明: 命令需要Unix shell环境。在Windows上,使用WSL(Windows Subsystem for Linux)运行上述命令,或改用Chocolatey安装(见下文替代方法)。
curl | sh安装suiup后,针对特定网络安装Sui CLI。CLI版本必须与目标网络匹配——每个网络运行特定的协议版本,版本不匹配可能导致构建失败、交易错误或意外行为:
bash
suiup install sui@testnet # 安装兼容Testnet的版本
suiup install sui@mainnet # 安装兼容Mainnet的版本更新至最新版本:
bash
suiup update sui@testnet重要提示: 会下载新版本,但不会自动将其设为默认激活版本。更新后,你必须切换到新版本:
suiup updatebash
suiup switch sui@testnet # 将最新安装的testnet版本设为默认验证已安装的版本及当前激活版本:
bash
suiup show # 列出所有已安装的二进制文件及其默认状态suiup command reference
suiup命令参考
| Command | Syntax | What it does |
|---|---|---|
| | Download and install a binary for a network |
| | Download the latest version (does NOT switch to it) |
| | Set the latest installed version for a network as the active default |
| | List all installed binaries with versions and defaults |
| | Show which installed binaries have updates available and the command to update them |
| | Update suiup itself |
The command takes a argument (for example, , , ). It does not accept separate positional arguments like .
switchbinary@networksui@testnetwalrus@testnetmove-analyzer@testnetsuiup switch sui testnet v1.70.2| 命令 | 语法 | 功能 |
|---|---|---|
| | 下载并安装对应网络的二进制文件 |
| | 下载最新版本(不会自动切换到该版本) |
| | 将对应网络的最新安装版本设为激活默认版本 |
| | 列出所有已安装的二进制文件及其版本和默认状态 |
| | 显示哪些已安装的二进制文件有可用更新,以及对应的更新命令 |
| | 更新suiup自身 |
switchbinary@networksui@testnetwalrus@testnetmove-analyzer@testnetsuiup switch sui testnet v1.70.2Alternative 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 --versionIf the command returns "sui not found", run to set the active default. Do not suggest manual PATH manipulation () or reinstalling — is the correct fix.
suiup switch sui@testnetexport PATH=...suiup switchbash
sui --version如果命令返回“sui not found”,运行设置激活默认版本。不要建议手动修改PATH()或重新安装——是正确的解决方法。
suiup switch sui@testnetexport PATH=...suiup switchVersion 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 suffix to update to the correct version:
@networkbash
suiup update sui@testnet # update to latest Testnet version
suiup update sui@mainnet # update to latest Mainnet versionCLI版本应与目标网络匹配——每个网络运行特定的协议版本,版本不匹配可能导致构建失败或交易错误。使用后缀更新至正确版本:
@networkbash
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 targetingIf 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 activeThe 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.
client/server api version mismatchCLI版本必须与你要连接的网络匹配。版本不匹配的常见症状:
- 提及“old dependencies”的构建错误
- 发布时交易失败
- 网络升级后出现意外行为
检查你的版本与网络是否匹配:
bash
sui --version # 你已安装的版本
sui client active-env # 你当前连接的网络如果版本过时,更新并切换:
bash
suiup update sui@testnet # 下载最新版本
suiup switch sui@testnet # 将其设为激活默认版本
suiup show # 验证当前激活的版本CLI输出中的警告表示你的本地CLI版本比网络版本旧。不要忽略此警告——版本不匹配可能导致构建失败和意外行为。通过更新和切换来修复。
client/server api version mismatchOptional 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 builderAfter 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