# Prerequisites

> **Summary — what this page covers**
> The one page to read **a week before** the workshop. It explains the access story (which is
> different for each day — the #1 thing attendees get wrong), lists the machine prerequisites,
> covers the BookTracker clone, and points out the **free/local path** so no one is blocked on
> an OpenAI key for Day 2. If everything on this page is true on the morning of July 9, you're
> ready.

> **Read this carefully — the two days have different access requirements.**

## Access — and the trap to avoid

Day 1 and Day 2 don't use the same thing. A Claude.ai Pro/Max subscription powers Claude Code
on Day 1 but **does NOT grant API access** on Day 2. Day 2 needs an **API key** from the
[Anthropic Console](https://console.anthropic.com). New Console accounts get a small free trial
credit that covers the workshop calls.

| Day | What you need | Cost |
|---|---|---|
| **Day 1** — Claude Code | **Claude Pro** (minimum) or Max | $20/mo (Pro) · $100–$200/mo (Max) |
| **Day 2** — Anthropic API | An **API key** from the Anthropic Console | Pay-as-you-go (trial credit covers the workshop) |

> Claude Code is **not** available on the Claude Free plan. If you only have Free today, upgrade
> to Pro before Day 1.

### Day 2: a fully free/local path for embeddings

Day 2's RAG section uses an embedding service. The default path uses an OpenAI embedding key,
but a fully **free/local alternative** is built into the labs: **Ollama + `nomic-embed-text`**
(768-dim) behind the same `EmbeddingService` interface. No OpenAI key required. See
[Day 2 → Before You Begin](<Day 2/01-before-you-begin.md>) for the Ollama setup.

## Machine prerequisites

- [ ] **.NET 10 SDK** — `dotnet --version` should report 10.x
- [ ] **Node.js 18+** — `node --version`
- [ ] **Git**
- [ ] **VS Code** (used Day 1, Section 3) — or **JetBrains Rider/IntelliJ** with the Claude Code plugin
- [ ] **Docker Desktop, running** — Day 2 needs it for Qdrant (RAG) and TestContainers (CI tests). Pull `qdrant/qdrant` during Day 2's morning if you haven't already.
- [ ] **Windows users: WSL2** — Claude Code's full feature set (hooks, subagents) requires WSL2. All terminal commands run inside WSL2.
- [ ] *(Optional, free path)* **Ollama** installed with `nomic-embed-text` pulled — only if you don't want to use an OpenAI key on Day 2

## Install & authenticate Claude Code (Day 1)

```bash
npm install -g @anthropic-ai/claude-code
claude --version        # verify
claude                  # browser OAuth (Claude.ai subscription) — recommended
# or set ANTHROPIC_API_KEY for API-based auth
```

## Get your Anthropic API key (Day 2)

1. Sign in at [console.anthropic.com](https://console.anthropic.com).
2. Create an API key. Confirm your account has trial credit, or add a payment method.
3. Store the key in user-secrets (don't commit it):

```bash
# Done in the BookTracker.Api project on Day 2
dotnet user-secrets init --project BookTracker.Api
dotnet user-secrets set "Anthropic:ApiKey" "sk-ant-..." --project BookTracker.Api
```

## Clone BookTracker

```bash
git clone https://github.com/intelligentlydev/workshop-booktracker
cd workshop-booktracker
dotnet build        # confirm the solution compiles
```

See [BookTracker](booktracker.md) for the solution layout, and your day's *Before You Begin* for
the exact morning-of steps:
[Day 1](<Day 1/01-before-you-begin.md>) · [Day 2](<Day 2/01-before-you-begin.md>).

## A quick cost note

Typical Day 2 API usage for the workshop is well under the trial credit. The Models & Cost
Reference on Day 2 explains the levers — prompt caching, Haiku for mechanical work, batch
processing — that keep ongoing usage cheap.

## If something doesn't install

See [Troubleshooting](troubleshooting.md) before flagging it on the morning — most of the install
issues people hit (WSL2 paths, `claude` not found, API 401) have one-line fixes there.
