Open this lesson in your favourite AI. It'll walk you through the why, explain the demo, and quiz you on the try-it list.
The Solana developer toolchain is unusually good for a young blockchain. solana-cli handles keys, network config, airdrops, and inspection. anchor handles program scaffolding, IDL generation, and TS client code. Phantom / Backpack wallets handle user-facing signing. Understanding the tool boundaries — what's a CLI concern, what's a program concern, what's a wallet concern — saves days of debugging. This task is a tour, not a deep dive.
Install, configure, and write-test-deploy in under 15 minutes. Point CLI at devnet, airdrop 2 SOL, scaffold an Anchor project, anchor test locally, anchor deploy to devnet. Every step is worth doing once to internalise how fast the cycle is.
# Complete setup — run through once.
# 1) Install Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
solana --version
# 2) Install Rust + Anchor
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install --git https://github.com/coral-xyz/anchor avm --locked
avm install latest && avm use latest
anchor --version
# 3) Point CLI at devnet, generate a keypair, get test SOL
solana config set --url devnet
solana-keygen new --outfile ~/.config/solana/id.json
solana airdrop 2
solana balance
# 4) Scaffold + test a new program
anchor init hello
cd hello
anchor test # compiles, spins up a local validator, runs the TS tests
# 5) Deploy to devnet
anchor deploy
solana program show <PROGRAM_ID> # confirm on-chainprograms/hello/src/lib.rs (program), tests/hello.ts (client tests), Anchor.toml (config). Identify where the program ID is set, where the test wallet comes from, and how anchor test spins up a local validator.anchor idl fetch <programId> to pull the on-chain IDL from a deployed program. Compare to the local target/idl/*.json. Understand that the IDL is the contract between program and client.~/.config/solana/id.json. Confirm Phantom sees your airdropped SOL balance.Use these three in order. Each builds on the one before.
In one paragraph, explain the Solana dev toolchain — what `solana`, `anchor`, and a wallet like Phantom each do, and how they fit together for a typical development cycle.
Walk me through `anchor test` step by step: what files are compiled, how a local validator is started, how the test wallet gets funded, and how the TS client invokes the local program.
Given I'm onboarding 5 new engineers to a production Solana codebase, walk me through the concrete steps I'd put in a `CONTRIBUTING.md` — toolchain versions, local cluster config, CI setup, and the 3 common debugging traps newcomers hit.