Sui Cookbook
Copy-paste prompts for the most common Sui flows - wallet, faucet, gas, build, publish.
Sui Cookbook
Every prompt below has been validated against the 0.2.4-beta planner and the current sui CLI. Run them as-is.
Wallet
Create a new address
cmdo "create new sui address"Plans sui client new-address ed25519. The first run also bootstraps ~/.sui/sui_config/client.yaml if it doesn't already exist.
Show the active address
cmdo "show sui client active address" --suiPlans sui client active-address. Use the --sui flag for predictability.
Show the active environment
cmdo "what is my current sui env" --suiPlans sui client active-env. Useful before publishing — confirm you're on testnet, not mainnet.
Switch environment
cmdo "switch to testnet" --sui
cmdo "switch to mainnet" --suiPlans sui client switch --env testnet (or mainnet).
Gas
Check gas
cmdo "show my gas coins" --suiPlans sui client gas. Each row is a coin object you can spend.
Get testnet SUI from the faucet
cmdo "give me testnet sui from faucet"Commando hits the public testnet faucet directly via HTTP for the active address; you don't need to remember the URL or paste the address yourself. Wait 5-10 seconds, then re-run cmdo "show my gas coins" --sui to confirm.
The faucet is rate-limited per address. If you get throttled, wait 60s and retry.
Move
All Move prompts run from a folder containing a Move.toml. The 0.2.4-beta planner explicitly disambiguates build vs test vs publish — three different verbs, three different commands.
Build
cmdo "build my move package"Plans sui move build. Does not publish.
Test
cmdo "test my move package"Plans sui move test. Streams the test runner output directly.
Publish
cmdo "publish my move package to testnet"Plans sui client publish --gas-budget 100000000 . (or similar). Make sure you have:
- ≥ 0.1 SUI in gas (
cmdo "give me testnet sui from faucet"). - Successfully built (
cmdo "build my move package"). - Active env is
testnet(cmdo "switch to testnet" --suiif not).
The published package ID is in the transaction effects — Commando streams them verbatim.
Putting it together
A clean "fresh machine to deployed contract" sequence on Linux/macOS:
Install + LLM key
npm install -g sui-commando@beta
cmdo initWallet + gas
cmdo "create new sui address"
cmdo "switch to testnet" --sui
cmdo "give me testnet sui from faucet"Build + publish
cd path/to/my/move/package
cmdo "build my move package"
cmdo "publish my move package to testnet"Total wall time on a clean machine: ~5 minutes (mostly the binary download in step 1).
Common issues
| Symptom | See |
|---|---|
could not find SUI coins with sufficient balance | Troubleshooting → Sui |
cmdo "build ..." runs client publish | Upgrade to ≥ 0.2.4-beta |
spawn ... ENOENT for sui.exe on Linux | Upgrade to ≥ 0.2.3-beta |
Related
How is this guide?