id = "stellar-cli"
name = "Stellar CLI"
homepage = "https://developers.stellar.org/docs/tools/cli/stellar-cli"
description = "Command-line interface for interacting with the Stellar network"
executables = ["stellar"]
[dotfiles]
paths = ["[configHome]/stellar/", "[configHome]/soroban/"]
secret = [
"[configHome]/stellar/identity/*.toml",
"[configHome]/soroban/identity/*.toml",
]
[commands]
format = 1
label = "Stellar smart contracts"
description = "Build and deploy Soroban smart contracts with the Stellar CLI. Other subcommands (keys, tx, invoke, network) are not covered; signing options other than the source account are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.subcommand]]
path = ["contract", "build"]
label = "Build a contract"
description = "Build every cdylib crate in the Cargo manifest for the wasm32 target."
[[commands.subcommand.source]]
id = "docs"
kind = "manual"
url = "https://github.com/stellar/stellar-cli/blob/main/FULL_HELP_DOCS.md"
revision = "2026-10-27"
evidence = """
**Usage:** `stellar contract build [OPTIONS] build <COMMAND>`
- `--features <FEATURES>` — Build with the list of features activated, space or comma separated
- `--all-features` — Build with the all features activated
- `--manifest-path <MANIFEST_PATH>` — Path to Cargo.toml
- `--package <PACKAGE>` — Package to build
- `--profile <PROFILE>` — Build with the specified profile
- `--out-dir <OUT_DIR>` — Directory to copy wasm files to
- `--locked` — Assert that `Cargo.lock` will remain unchanged
- `--print-commands-only` — Print commands to build without executing them
"""
[[commands.subcommand.field]]
id = "manifest_path"
label = "Cargo.toml path"
type = "path"
option = ["--manifest-path"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["docs"]
[[commands.subcommand.field]]
id = "package"
label = "Package"
type = "string"
option = ["--package"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "profile"
label = "Cargo profile"
type = "string"
option = ["--profile"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "out_dir"
label = "Copy wasm files to"
type = "path"
option = ["--out-dir"]
path = { kind = "directory", role = "output" }
sources = ["docs"]
[[commands.subcommand.field]]
id = "features"
label = "Features"
type = "string"
option = ["--features"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "all_features"
label = "All features"
type = "boolean"
option = ["--all-features"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "locked"
label = "Locked Cargo.lock"
type = "boolean"
option = ["--locked"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "print_only"
label = "Print commands only"
type = "boolean"
option = ["--print-commands-only"]
sources = ["docs"]
[[commands.subcommand.task]]
id = "build"
label = "Build contracts"
fields = ["package", "out_dir"]
[[commands.subcommand.task]]
id = "preview"
label = "Show build commands"
fields = ["package", "print_only"]
required = ["print_only"]
set = { print_only = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["package", "out_dir", "manifest_path", "print_only"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["profile", "features", "all_features", "locked"]
[[commands.subcommand]]
path = ["contract", "deploy"]
label = "Deploy a contract"
description = "Deploy a wasm contract to a network. Sends a signed transaction using the source account."
[[commands.subcommand.source]]
id = "docs"
kind = "manual"
url = "https://github.com/stellar/stellar-cli/blob/main/FULL_HELP_DOCS.md"
revision = "2026-10-27"
evidence = """
**Usage:** `stellar contract deploy [OPTIONS] --source-account <SOURCE_ACCOUNT> [-- <CONTRACT_CONSTRUCTOR_ARGS>...]`
- `--wasm <WASM>` — WASM file to deploy.
- `--wasm-hash <WASM_HASH>` — Hash of the already installed/deployed WASM file
- `--alias <ALIAS>` — The alias that will be used to save the contract's id.
- `-i`, `--ignore-checks` — Whether to ignore safety checks when deploying contracts
- `--rpc-url <RPC_URL>` — RPC server endpoint
- `--network-passphrase <NETWORK_PASSPHRASE>` — Network passphrase to sign the transaction sent to the rpc server
- `-n`, `--network <NETWORK>` — Name of network to use from config
- `-s`, `--source-account <SOURCE_ACCOUNT>` [alias: `source`] — Account that where transaction originates from.
- `--build-only` — Build the transaction and only write the base64 xdr to stdout
"""
[[commands.subcommand.field]]
id = "wasm"
label = "WASM file"
type = "path"
option = ["--wasm"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["docs"]
[[commands.subcommand.field]]
id = "wasm_hash"
label = "Installed WASM hash"
type = "string"
option = ["--wasm-hash"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "source_account"
label = "Source account"
description = "An identity name or public key. Do not paste a secret key here; it would land in shell history."
type = "string"
option = ["--source-account", "-s"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "network"
label = "Network"
type = "string"
option = ["--network", "-n"]
suggestions = [{ value = "testnet", label = "Testnet" }, { value = "mainnet", label = "Mainnet" }]
sources = ["docs"]
[[commands.subcommand.field]]
id = "alias"
label = "Contract alias"
description = "Overwrites an existing alias without asking."
type = "string"
option = ["--alias"]
effect = "overwrite"
sources = ["docs"]
[[commands.subcommand.field]]
id = "rpc_url"
label = "RPC URL"
type = "url"
option = ["--rpc-url"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "network_passphrase"
label = "Network passphrase"
type = "string"
option = ["--network-passphrase"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "build_only"
label = "Build transaction only"
type = "boolean"
option = ["--build-only"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "ignore_checks"
label = "Ignore safety checks"
type = "boolean"
option = ["--ignore-checks", "-i"]
sources = ["docs"]
[[commands.subcommand.task]]
id = "deploy-wasm"
label = "Deploy a wasm file"
fields = ["wasm", "source_account", "network", "alias"]
required = ["wasm", "source_account", "network"]
[[commands.subcommand.task]]
id = "dry-build"
label = "Build transaction only"
fields = ["wasm", "source_account", "network", "build_only"]
required = ["wasm", "source_account", "network", "build_only"]
set = { build_only = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["wasm", "wasm_hash", "source_account", "network", "alias"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["rpc_url", "network_passphrase", "build_only", "ignore_checks"]