Onboarding commands

Beginner-friendly shortcuts that compose other sunscreen commands. All require the onboarding feature (enabled by default in release builds).

init

sunscreen init [<NAME>] [FLAGS]

Interactive wizard that asks 3–5 questions and runs chain new under the hood.

FlagDefaultDescription
--non-interactiveoffdisable prompts and require flag-based input
--from-preset <NAME>nonepreset to apply when no prompts are available
--frontend <name>vitenone, vite, next
--path <DIR>./<NAME>output directory
--dry-runoffprint planned files without writing

examples

sunscreen examples <SUBCOMMAND>
SubcommandWhat it does
list [--tag <TAG>]list embedded examples (optionally filtered)
describe <NAME>print one example's README
use <NAME> [<PATH>] [--non-interactive] [--dry-run]copy an example onto disk

quickstart

sunscreen quickstart <RECIPE> [FLAGS]

Composite recipes for "I want a working X in 30 seconds".

RecipeWhat it builds
tokenAnchor workspace + SPL Token recipe
nftAnchor workspace + Metaplex NFT recipe
daoAnchor workspace + DAO voting scaffolds
blogAnchor workspace + CRUD Post resource
FlagDefaultDescription
--name <NAME>promptedproject name (required in --non-interactive)
--cluster <NAME>localnetlocalnet, devnet, mainnet — used for the generated next steps
--non-interactiveoffdisable prompts
--frontend <name>vitenone, vite, next
--path <DIR>./<NAME>output directory
--dry-runoffprint planned operations without writing

wallet

sunscreen wallet <SUBCOMMAND>
SubcommandWhat it does
new [<NAME>] [--out <FILE>] [--no-bip39-passphrase] [--dry-run]Generate a keypair. When --out is omitted, lands under .sunscreen/wallets/<NAME>.json
listList wallets discovered under .sunscreen/wallets/
airdrop [<AMOUNT>] [--cluster <NAME>] [--to <PUBKEY>] [--dry-run]Request SOL. AMOUNT defaults to 1.0. --cluster defaults to devnet. --to defaults to the Solana CLI default keypair
balance [<ADDRESS>] [--cluster <NAME>]Print a wallet balance
set-default <NAME> [--cluster <NAME>]Set the default wallet path in sunscreen.yml for a cluster

Examples:

sunscreen wallet new dev
sunscreen wallet airdrop 2 --cluster devnet
sunscreen wallet balance --cluster devnet
sunscreen wallet set-default dev --cluster localnet

deploy

sunscreen deploy <TARGET> [FLAGS]

Build and deploy programs to a Solana cluster.

Arg / flagDefaultDescription
<TARGET>requiredlocalnet, devnet, or mainnet (positional, value-enum)
--program <NAME>all programspass through to Anchor for a single program
--verifyoffrun anchor verify after deploy when supported
--yes-i-understand-costoffrequired for mainnet
--dry-runoffprint deployment plan without running Anchor

Exit codes: 0 ok · 2 toolchain · 4 invalid args / insufficient balance · 5 no workspace.

Examples:

sunscreen deploy devnet
sunscreen deploy devnet --program my_app --dry-run
sunscreen deploy mainnet --yes-i-understand-cost

learn

sunscreen learn [<TOPIC>]

Print an embedded topic in the terminal. Omit <TOPIC> to list available topics.

next_step contract

Every onboarding error includes a next_step field in JSON output and a final line in human output telling the user exactly what to do. The contract is tested in tests/errors_contract.rs and is part of sunscreen's stable surface.

Example error:

error: Network: rate-limited (exit 4)
next_step: Try the web faucet at https://faucet.solana.com/ or wait 10 minutes.