A developer productivity CLI for Stellar and Soroban workflows β built in Rust.
starforge is a free, open-source command-line toolkit for developers building on the Stellar network. It brings together the most common Stellar and Soroban developer workflows β wallet management, project scaffolding, and contract deployment β into a single fast, ergonomic CLI.
Think of it as the "Hardhat or Foundry" experience for the Stellar ecosystem, built in Rust for speed and reliability.
This project is actively maintained and participates in the Stellar Wave Program on Drips β a monthly open-source contribution sprint where contributors earn rewards for merged pull requests.
Create and manage Stellar ed25519 keypairs locally. Generate cryptographically secure keys using proper Stellar strkey encoding (G... for public, S... for secret). Optionally encrypt keys at rest with AES-256-GCM. Fund testnet accounts via Friendbot, list all saved wallets, inspect live on-chain balances, and securely store keys in ~/.starforge/config.toml.
Scaffold new Soroban smart contract projects from battle-tested templates with one command. Choose from: hello-world, token, nft, and voting. Use interactive mode (--interactive) to customize contract options like author, license, storage type, and test inclusion. Also scaffolds full Stellar dApp frontends (Vite + React).
Validate, size-check, and deploy compiled Soroban .wasm files to Testnet or Mainnet. Verifies account balance on-chain, calculates WASM hash, and generates the exact stellar contract deploy command to complete the deployment.
- Rust β₯ 1.80 (install via rustup)
git clone https://github.com/YOUR_USERNAME/starforge.git
cd starforge
cargo build --release
# Move the binary to your PATH
cp target/release/starforge ~/.local/bin/
# or on macOS:
cp target/release/starforge /usr/local/bin/starforge --version
# starforge 0.1.0
starforge info# Create a new keypair
starforge wallet create alice
# Create a wallet with encrypted storage (prompts for passphrase)
starforge wallet create alice --encrypt
# Create and fund immediately (testnet only)
starforge wallet create deployer --fund
# List all saved wallets
starforge wallet list
# Show wallet details + live balance
starforge wallet show alice
# Reveal secret key (prompts for passphrase if encrypted)
starforge wallet show alice --reveal
# Fund an existing wallet via Friendbot
starforge wallet fund alice
# Remove a wallet
starforge wallet remove alice# Show current network and available networks
starforge network show
# Switch to mainnet
starforge network switch mainnet
# Add a custom network
starforge network add mynet \
--horizon-url https://my-horizon.example.com \
--soroban-rpc-url https://my-soroban.example.com
# Switch to custom network
starforge network switch mynet
# Test network connectivity
starforge network test
starforge network test mainnet# Scaffold a Soroban contract (hello-world template)
starforge new contract my-contract
# Scaffold interactively with custom options
starforge new contract my-contract --interactive
# Scaffold with a specific template
starforge new contract my-token --template token
starforge new contract my-nft --template nft
starforge new contract my-vote --template voting
# Scaffold a Stellar dApp frontend (Vite + React)
starforge new dapp my-dapp# Deploy a compiled contract
starforge deploy --wasm target/wasm32-unknown-unknown/release/my_contract.wasm
# Deploy to mainnet using a specific wallet
starforge deploy \
--wasm target/wasm32-unknown-unknown/release/my_contract.wasm \
--network mainnet \
--wallet deployer
# Skip confirmation prompt (for CI)
starforge deploy --wasm ./my_contract.wasm --yes# Inspect a deployed contract instance
starforge contract inspect CCPYZFKEAXHHS5VVW5J45TOU7S2EODJ7TZNJIA5LKDVL3PESCES6FNCI
# Inspect on a specific network
starforge contract inspect CCPYZFKEAXHHS5VVW5J45TOU7S2EODJ7TZNJIA5LKDVL3PESCES6FNCI --network mainnetstarforge info# Bash β add to ~/.bashrc
source <(starforge completions bash)
# Zsh β add to ~/.zshrc
source <(starforge completions zsh)
# Fish β save to fish completions directory
starforge completions fish > ~/.config/fish/completions/starforge.fishAfter adding the line to your shell config, restart your shell or run source ~/.bashrc / source ~/.zshrc. Tab-completion for all subcommands and flags will then be active.
starforge/
βββ Cargo.toml
βββ src/
βββ main.rs # CLI entry point + banner
βββ commands/
β βββ mod.rs
β βββ wallet.rs # wallet create/list/show/fund/remove
β βββ new.rs # project scaffolding + templates
β βββ contract.rs # contract inspect + invoke
β βββ deploy.rs # contract deployment
β βββ info.rs # environment info
βββ utils/
βββ mod.rs
βββ config.rs # ~/.starforge/config.toml read/write
βββ horizon.rs # Horizon API + Friendbot HTTP calls
βββ soroban.rs # Soroban RPC helpers
βββ print.rs # Consistent CLI output helpers
starforge stores all data in ~/.starforge/config.toml:
network = "testnet"
[[wallets]]
name = "alice"
public_key = "GABC...XYZ"
secret_key = "SABC...XYZ" # plaintext or encrypted (see Security section)
network = "testnet"
created_at = "2025-01-01T00:00:00Z"
funded = true
[networks.testnet]
horizon_url = "https://horizon-testnet.stellar.org"
soroban_rpc_url = "https://soroban-testnet.stellar.org"Secret keys can be stored encrypted at rest using the --encrypt flag during wallet creation:
starforge wallet create mykey --encrypt
# You will be prompted to set a secure passphraseEncryption uses:
- AES-256-GCM for authenticated encryption
- Argon2 for key derivation from your passphrase
- Random salt and nonce for each encryption operation
When revealing an encrypted key, you must provide the correct passphrase:
starforge wallet show mykey --reveal
# You will be prompted for the passphraseUnencrypted keys (without --encrypt) are stored in plaintext and are suitable only for testnet or throwaway accounts. Do not use plaintext keys on mainnet with real funds.
| Template | Description |
|---|---|
hello-world |
Basic contract with a hello(to) function. Great starting point. |
token |
Fungible token scaffold with initialize, mint, balance, transfer. |
nft |
Non-fungible token scaffold with mint, owner_of, transfer. |
voting |
Proposal and voting contract with create_proposal, vote, results. |
All templates include a working test suite and a README with build/deploy instructions.
This project participates in the Stellar Wave Program on Drips. Contributors who resolve issues during an active Wave earn Points that translate to real USDC rewards.
Read the Terms & Rules before contributing.
- Fork the repository
- Create a branch:
git checkout -b feat/your-feature - Make your changes and commit:
git commit -m "feat: description" - Push and open a Pull Request against
main
Please keep PRs scoped to a single issue and include a clear description of what changed and why.
MIT Β© 2025 β See LICENSE for details.
Built for the Stellar ecosystem. Participates in the Stellar Wave Program via Drips. Powered by the Stellar Horizon API and Soroban.