S0 — Before Session 1: Accounts & Install
Why this page exists
Session 1 is in-person and short. If we spend it watching 20 people sign up for accounts, we lose the lesson. Do everything on this page before Session 1. Bring your laptop with all of it working — we will spot-check at the start of Session 1 and troubleshoot only what’s still broken.
Budget 30–45 minutes. If something doesn’t work, don’t spend hours on it — note where you got stuck and bring that to Session 1.
Deadline: finish this at least 2 days before Session 1, so there’s time to fix anything that doesn’t work. You’ll get a reminder beforehand asking you to confirm you’re set up.
- Have a working terminal (shell) on your machine.
- Have
gitinstalled. - Have an API key for an LLM provider (free tier is fine).
- Have
opencodeinstalled and successfully talking to that provider. - Have a Python virtual environment with the libraries the R/Quarto notebooks need.
1. Get a terminal
- macOS: open the built-in
Terminalapp (Spotlight → “Terminal”). - Windows: install WSL2 (Windows Subsystem for Linux) — this gives you a real Linux shell, which is what everything else in this course assumes. Follow: Microsoft’s WSL install guide. One command in PowerShell (as administrator) usually does it:
wsl --installRestart when prompted, then open the “Ubuntu” app that got installed — that’s your terminal from now on.
- Linux: you already have one.
Check it works:
echo "hello from my shell"2. Install git
- macOS:
gitusually comes with Xcode Command Line Tools. Rungit --version; if missing, it will prompt you to install. - WSL2 / Linux:
sudo apt update && sudo apt install git -y
Check:
git --version3. Get a free LLM API key
You do not need a paid subscription for this course. Pick one of these:
- Go to openrouter.ai and sign up.
- Go to Keys → Create Key. Copy it somewhere safe (you won’t see it again).
- OpenRouter gives access to several free-tier models (look for
:freesuffixed models, e.g. some Gemini, GLM, Qwen, DeepSeek variants). Availability changes — check openrouter.ai/models and filter by price = free.
- Go to aistudio.google.com and sign in with a Google account.
- Get API key → create a new key. Copy it.
- Gemini has a genuinely free tier (rate-limited), no card required.
Either way, do not commit this key to git or paste it in a public chat. Treat it like a password.
4. Install OpenCode
OpenCode is the agent harness we’ll use in class — it’s free and open source, and works with whichever provider/key you picked above (unlike Claude Code, which is tied to Anthropic billing).
curl -fsSL https://opencode.ai/install | bash(macOS with Homebrew also works: brew install sst/tap/opencode)
Check:
opencode --version5. Connect OpenCode to your provider
Run:
opencode auth loginPick your provider (OpenRouter or Gemini) and paste the API key from step 3 when asked. OpenCode stores it locally, not in your project files.
6. Smoke test (OpenCode)
In an empty folder:
mkdir opencode-test && cd opencode-test
opencodeAt the prompt, type:
say hello and tell me what model you are
If you get a sensible reply, you’re done. Exit with Ctrl+D or /exit.
7. Set up Python (for the R/Quarto notebooks)
Some sessions mix R and Python in the same .qmd file via reticulate — the Python chunks need a real interpreter with a few libraries installed. This route is identical on WSL2 Ubuntu, Linux, and macOS: a plain Python virtual environment, no conda required.
If python3 --version fails, install it first: macOS — brew install python3; WSL2/Linux — sudo apt update && sudo apt install python3 python3-venv -y.
python3 -m venv ~/.venvs/agentic-programming
source ~/.venvs/agentic-programming/bin/activate
pip install --upgrade pip
pip install numpy pandas "ibis-framework[duckdb]"
deactivateCheck it:
~/.venvs/agentic-programming/bin/python -c "import numpy, pandas, ibis; print('ok')"Checklist
Work through this list yourself before Session 1 — there’s nothing to submit, but you should be able to tick off every item honestly. We will spot-check at the start of Session 1, and you’ll get a reminder before then if you haven’t confirmed you’re done.
(These boxes don’t save state on this page — treat this as a checklist to go through yourself, not a form.)
Stuck?
Bring the exact error message (screenshot or copy-paste) to Session 1. “It didn’t work” is hard to debug — the error text is not.
© Florian Oswald, 2026