| Crates.io | stellar-scaffold-cli |
| lib.rs | stellar-scaffold-cli |
| version | 0.0.11 |
| created_at | 2025-05-12 19:42:35.378923+00 |
| updated_at | 2025-09-11 23:06:43.646712+00 |
| description | Stellar CLI plugin for building smart contracts with frontend support |
| homepage | https://github.com/ahalabs/scaffold-stellar |
| repository | https://github.com/ahalabs/scaffold-stellar/tree/main/crates/stellar-scaffold-cli |
| max_upload_size | |
| id | 1671040 |
| size | 361,822 |
CLI toolkit for Stellar smart contract development, providing project scaffolding, build automation, and development workflow tools.
Stellar Scaffold CLI comes with four main commands:
stellar scaffold init - Creates a new Stellar smart contract project with best practices and configurations in place, including an environments.toml file for managing network settings, accounts, and contracts across different environments.
stellar scaffold upgrade - Transforms an existing Soroban workspace into a full scaffold project by adding frontend components, environment configurations, and project structure. Preserves existing contracts while adding the complete development toolkit.
stellar scaffold build - Manages two key build processes:
The build process respects environment configurations from environments.toml and handles contract deployment states based on the current environment (controlled via STELLAR_SCAFFOLD_ENV).
stellar scaffold watch - Development mode that monitors contract source files and environments.toml for changes, automatically rebuilding as needed. Defaults to using the development environment.
cargo install stellar-scaffold-cli
Or cargo-binstall:
cargo binstall stellar-scaffold-cli
stellar scaffold init my-project
cd my-project
This creates:
If you have an existing Soroban workspace, you can upgrade it to a full scaffold project:
cd my-existing-workspace
stellar scaffold upgrade
This will:
environments.toml with your existing contractscp .env.example .env
stellar scaffold watch --build-clients
Projects use environments.toml to define network settings, accounts, and contract configurations for different environments. Example:
[development]
network = {
name = "standalone",
run_locally = true
}
accounts = ["account1", "account2"]
[staging]
network = {
name = "testnet"
}
[production]
network = {
name = "mainnet"
}
stellar scaffold build and stellar scaffold watch manage:
The build process ensures:
Contract metadata is set when running stellar scaffold build. You can configure metadata with
[package.metadata.stellar] section in your Cargo.toml file.
For example:
[package.metadata.stellar]
# When set to `true` will copy over [package] section's `name`, `authors`, `homepage` (renamed to `home_domain` to comply with SEP-47), `repository` (renamed to `source_repo` to comply with SEP-47) and `version` (renamed to `binver` to comply with SEP-47)
cargo_inherit = true
# Override one of the inherited values
name = "my-awesome-contract"
homepage = "ahalabs.dev"
repository = "https://github.com/AhaLabs/scaffold-stellar"
STELLAR_SCAFFOLD_ENV: Sets current environment (development/staging/production)STELLAR_ACCOUNT: Default account for transactionsSTELLAR_RPC_URL: RPC endpoint URLSTELLAR_NETWORK_PASSPHRASE: Network passphraseSee the full documentation: