Home/Docs/Reference/Command Reference

Every bake command and its important flags.

Command Reference

Global flags

FlagDescription
--ciPlain, color-free output; no spinners; no interactive prompts
--jsonStructured JSON output; no decorative text
--helpShow help for any command

Commands

bake login

Manage local keypair.

bash
bake login                    # Create or link local wallet
bake login --wallet nightly   # Use Nightly Connect (high-stakes only)

bake use

Switch active cluster.

bash
bake use cookie               # Cookie Chain (default)
bake use mainnet              # Solana mainnet
bake use devnet               # Solana devnet
bake use http://localhost:8899  # Custom RPC

bake whoami

Show active wallet(s) and cluster.

bash
bake whoami

bake init

Scaffold a new Anchor project.

bash
bake init my-program          # Create new project
bake init --no-skill          # Skip @cookiechain/skill install

bake deploy

Build, deploy, hash, and register on-chain.

bash
bake deploy                   # Full pipeline
bake deploy --require-audit   # Gate on clean audit
bake deploy --yes             # Skip confirmation

bake audit

Static analysis via Radar.

bash
bake audit                    # Run Radar analysis
bake audit /path/to/project   # Analyze specific project

bake rollback

Rebuild and redeploy a previous entry.

bash
bake rollback                 # Interactive selection
bake rollback --to 3          # Rollback to entry #3
bake rollback --require-audit # Gate on clean audit

bake logs

View program logs.

bash
bake logs                     # Recent logs
bake logs -f                  # Live streaming
bake logs <programId>         # Specific program

bake prove

Verify on-chain bytecode.

bash
bake prove                    # Level 1: hash check
bake prove --rebuild          # Level 2: full reproducibility
bake prove --to 2             # Verify specific entry

bake diff

Compare deploys.

bash
bake diff 3                   # Source diff since entry #3
bake diff 3 --rebuild         # Include bytecode diff

bake decode

Decode transactions/accounts.

bash
bake decode <signature>       # Decode transaction
bake decode --account <addr>  # Decode account
bake decode --log <line>      # Decode log line

bake stats

Program activity metrics.

bash
bake stats                    # Current project
bake stats <programId>        # Specific program

bake fork

Clone program into local validator.

bash
bake fork <programId>                    # Clone from mainnet
bake fork <programId> --source cookie    # Clone from Cookie Chain
bake fork <programId> --fetch-program-accounts  # Include accounts

bake doctor

Environment health check.

bash
bake doctor

bake dashboard

Open the web dashboard in your browser.

bash
bake dashboard                            # opens the homepage
bake dashboard <programId>                # opens /program/<programId>
bake dashboard --ci <programId>           # prints URL instead of opening browser

See the Dashboard guide for full details.

bake mcp

Start MCP server for AI agents (stdio).

bash
bake mcp                      # Read-only mode (default)
bake mcp --policy policy.json # With custom policy / write permissions

See the MCP guide for policy details and confirmation flows.

bake agent init

Scaffold a new autonomous AI agent workspace pre-wired with safe bake MCP configs and prompt templates.

bash
bake agent init <projectName>     # Scaffold agent repository

Generates:

  • policy.example.json (defaults to allowWrites: false)
  • prompts/system.md (toolchain and environment constraints)
  • mcp/mcp.json (Cursor & Claude Desktop configuration)
  • README.md and package.json

See the AI Agents guide for setup instructions.

bake session

Manage ephemeral local sandboxes for zero-risk deployment rehearsals.

bash
# Start a new local sandbox (boots validator + ephemeral wallet)
bake session open [options]

# Check active session status (RPC, wallet, balance)
bake session status

# Deploy current project to active session
bake session deploy

# Close session and cleanup temporary files
bake session close [-y|--yes]

bake session open options:

FlagDescription
--no-validatorDo not start a local validator
--port <port>Port for local validator RPC (default: 8899)
--workspace <path>Custom directory for session data
--forceTerminate existing active session and open fresh

bake session close options:

FlagDescription
-y, --yesSkip interactive teardown confirmation

See the Sessions guide for workflow details.

bake top

View network and program leaderboards.

bash
bake top

Note: bake top is currently a placeholder and is not yet implemented. Full network-wide leaderboards require chain-wide indexing infrastructure that is planned for a future release.

Sourced from local MDX in docs/content/docs