Command-line interface for building and deploying smart contracts on the Stellar network.
For full documentation, visit https://developers.stellar.org.
docker run --rm -it -v "$(pwd)":/source stellar/stellar-cli versionThe container expects your project files to be mounted at /source (the default working directory). Any stellar subcommand can be passed directly:
# Build a contract
docker run --rm -it -v "$(pwd)":/source stellar/stellar-cli contract build
# Deploy a contract
docker run --rm -it \
-v "$(pwd)":/source \
-e STELLAR_RPC_URL=https://soroban-testnet.stellar.org:443 \
-e STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015" \
stellar/stellar-cli contract deploy --wasm target/wasm32v1-none/release/my_contract.wasm --source <key>Configuration and data are stored inside the container by default and lost when it exits. Mount volumes to keep them across runs:
docker run --rm -it \
-v "$(pwd)":/source \
-v stellar-config:/config \
-v stellar-data:/data \
stellar/stellar-cli contract buildlatest— most recent release.X.Y.Z— specific release version (e.g.22.6.0).<commit-sha>— build from a specific commit.
