Home/Docs/Get Started/First Deploy

Step-by-step walkthrough of your first Cookie Chain deploy.

First Deploy

Prerequisites

  • Node.js โ‰ฅ 18
  • Rust installed (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)
  • Solana CLI installed (sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)")
  • Anchor CLI installed (cargo install --git https://github.com/coral-xyz/anchor avm --locked --force then avm install 1.2.0)

Step 1: Install bake

bash
npm install -g bakeacookie

Step 2: Login

bash
bake login

This creates a local keypair at ~/.config/solana/id.json (or links an existing one). Zero ceremony โ€” no browser, no email, no wallet popup.

Step 3: Set cluster

bash
bake use cookie

This points bake at Cookie Chain's RPC endpoint (https://rpc.cookiescan.io). You can also use bake use mainnet, bake use devnet, or bake use http://localhost:8899 for local development.

Step 4: Scaffold project

bash
bake init my-program
cd my-program

This creates a new Anchor project with:

  • Pre-configured Anchor.toml for Cookie Chain
  • A sample program
  • Recipe Book integration ready

Step 5: Deploy

bash
bake deploy

This runs the full pipeline:

  1. Build โ€” anchor build --arch v0 --tools-version v1.57
  2. Deploy โ€” uploads the binary to Cookie Chain
  3. Hash โ€” computes SHA-256 of the compiled .so
  4. Register โ€” writes a permanent entry to the Recipe Book

You'll see output like:

Building recipe_book (anchor build)
Deploying recipe_book to cookie
Registered deploy in Recipe Book (entry #0)
โœ” Deployed to cookie (entry #0)

Program ID: 56Vj61zFW4hHV6wdjnisrHtVwWDqyjixjpBgnoRJvzxL
Entry index: 0

Step 6: Verify

bash
bake prove

This verifies that what's running on-chain matches what the Recipe Book says was deployed, using real ELF-binary hash comparison.

Step 7: View logs

bash
bake logs -f

Live-stream your program's logs with Anchor event decoding.

You're done!

Your program is now:

  • โœ… Deployed on Cookie Chain
  • โœ… Registered in the Recipe Book (permanent on-chain history)
  • โœ… Verifiable with bake prove
  • โœ… Observable with bake logs

What's next?

  • Rollback โ€” revert to a previous deploy in one command
  • Stats โ€” view program activity and metrics
  • MCP โ€” let AI agents deploy for you
Sourced from local MDX in docs/content/docs