Cheat Sheet
The Supra CLI Cheat Sheet provides a quick reference for developers to efficiently navigate and use key commands in Supra’s CLI.
Not all CLI commands are listed here. Use the --help
option to see the full list.
Profiles Commands
Manage and interact with profiles, configure keys, and set up secure blockchain identities.
List Profiles
-r, --reveal-secrets
: Reveal secret keys to the screen. Description: Displays all profiles currently available in your environment.
Active Profile
Sets the specified profile as the active one for CLI commands.
<NAME>
: Name of the profile to activate.
Generate Profile
Creates a new profile and generates a public/private key pair.
<NAME>
: Name of the profile to generate.
Import Profile
Imports an existing profile using its private key.
<NAME>
: Name of the profile to import.
<PRIVATE_KEY>
: Hexadecimal format private key.
Remove Profile
Deletes a profile from your environment.
<PROFILE_NAME>
: Name of the profile to remove.
Accounts Commands
Perform essential operations such as creating accounts, funding them, checking balances, and transferring assets.
Create Account
Creates a new on-chain account within the Supra blockchain.
<PROFILE_NAME>
: Profile to use.
<RPC_URL>
: Full node URL on the network.
Fund Account with Faucet
Funds the specified account with testnet $SUPRA tokens.
<PROFILE_NAME>
: Profile to use.
<RPC_URL>
: Full node URL on the network.
Check Balance
Checks the balance of the specified account.
<PROFILE_NAME>
: Profile to use.
<RPC_URL>
: Full node URL on the network.
Transfer Tokens
Transfers tokens from one account to another.
<ACCOUNT>
: Address to send SUPRA to.
<AMOUNT>
: Amount of Quants (10^-8 SUPRA) to transfer.
<RPC_URL>
: Full node URL on the network.
Tools Commands
Handle tasks related to building, compiling, testing, and deploying Move packages and smart contracts.
Compile Move Package
Compiles the Move package in the specified directory.
<PACKAGE_DIR>
: Path to a Move package (folder with a Move.toml
file).
Publish Move Package
Publishes the compiled Move package to the blockchain.
<PROFILE_NAME>
: Profile to use for publishing.
<PACKAGE_DIR>
: Path to a Move package.
<RPC_URL>
: Blockchain node URL.
Run Smart Contract Function
Executes a smart contract function with the provided arguments.
<YOUR_ADDRESS>
: Address executing the function.
<SMART_CONTRACT_NAME>
: Contract containing the function.
<FUNCTION_NAME>
: Function being executed.
<ARGS>
: Arguments for the function.
<RPC_URL>
: Blockchain node URL.
Run Unit Tests
Runs unit tests for the Move package in the specified directory.
<PACKAGE_DIR>
: Path to a Move package.
View Smart Contract Data
Executes a read-only view function to query contract data.
<YOUR_ADDRESS>
: Address making the query.
<SMART_CONTRACT_NAME>
: Contract containing the view function.
<VIEW_FUNCTION>
: Read-only function to retrieve data.
<ARGS>
: Query-specific arguments.
<RPC_URL>
: Blockchain node URL.
Last updated