sui-cli

Guides Sui CLI workflows for Move package publishing, PTB transactions, and key management.

2|Updated May 16, 2026
One-click install
npx skills add https://github.com/avbel/ai-skills --skill sui-cli-avbel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sui-cli
Source: https://github.com/avbel/ai-skills/tree/main/skills/sui-cli
Command: npx skills add https://github.com/avbel/ai-skills --skill sui-cli-avbel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Working with the Sui CLI involves many command groups, subtle syntax rules (like @ prefixes on object IDs in PTBs), and evolving flags that are easy to get wrong, leading to failed transactions, misconfigured environments, or unsafe key handling. ## Core Features & Use Cases - PTB Transaction Construction: Build Programmable Transaction Blocks with correct quoting, variable assignment, gas budgeting, and dry-run/preview workflows instead of legacy pay/transfer commands. - Move Package Lifecycle: Scaffold, build, test, publish, and upgrade Move packages, including ephemeral test-publish flows and UpgradeCap routing. - Keys, Replay, and Validators: Manage keystores with Bech32 suiprivkey strings, hardware signers via sui external-keys, replay transactions with traces, and run validator operations. - Use Case: You need to publish a Move package to testnet and transfer the resulting UpgradeCap to your address. The Skill provides the exact PTB command sequence with proper gas budget and sender resolution. ## Quick Start Ask the assistant to show you how to transfer 1 SUI to another address using a Sui Programmable Transaction Block.

Frequently Asked Questions about sui-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I transfer SUI tokens using the Sui CLI?▼

Use `sui client ptb` with `--split-coins gas` to split an amount from the gas coin, assign it to a variable, then `--transfer-objects` to the recipient. The legacy `pay-sui` and `transfer-sui` commands still exist but PTBs are the recommended approach.

How to publish a Move package on Sui from the command line?▼

Run `sui move build` and `sui move test` in the package directory, then publish with `sui client publish` or a PTB using `--publish`. The PTB form lets you route the resulting UpgradeCap to the sender or make the package immutable.

Why do object IDs need an @ prefix in Sui PTB commands?▼

Inside `sui client ptb`, addresses and object IDs require an `@` prefix (like `@0xabc...`) to distinguish them from other argument types. Aliases may be passed without `@`, and standalone commands like `sui client object` do not use the prefix.

Does the Sui CLI support Ledger or hardware wallet signing?▼

Yes, from CLI version 1.66.2 the `sui external-keys` command manages Ledger and YubiKey signer binaries over JSON-RPC. AWS KMS signing is available through `sui keytool sign-kms`, and these are preferred over local keystores for non-trivial funds.

Why does sui move test --coverage fail on my installation?▼

Coverage, test traces, and replay traces require a CLI built with tracing/debug support. Install a debug build with `suiup install sui@testnet --debug` or enable the `tracing` feature when building from source.

How do I replay a Sui transaction locally for debugging?▼

Run `sui replay --digest <TX-DIGEST>` to replay a transaction locally and compare results to the chain. Add `--trace` to emit a Move debugger or profiler trace, then analyze it with `sui analyze-trace` and speedscope.