Setup
AI-Assisted Programming for PhD Researchers
We install and configure everything on this page together, live, in the first session of Day 1. You don’t need to do anything beforehand. This page is the step-by-step reference to follow along during that guided block, and to come back to if you fall behind or need to redo a step later in the course. The only thing to bring is a laptop you can install software on.
- Zed installed and opening on your machine
- Mistral account created (free “Experiment” plan) and training opt-out enabled, with an API key saved somewhere you can paste from; the same key powers Zed’s edit predictions without any sign-in
- GitHub account created (only if you don’t already have one), used on Day 2 for GitHub tooling and, optionally, for publishing your capstone
- uv installed (
uv --versionprints a version), which also brings Python automatically
Optional, apply during the course: the Zed student plan (step 3): free Pro features for a year. It needs a GitHub account that is at least 30 days old and verification can take up to 72 hours, so its benefits typically arrive after the course or late in it; the free Mistral key covers everything the course needs either way.
We also install Git and OpenCode together in class on Day 1.
Windows users: run all lab commands in Git Bash, which installs together with Git on Day 1. The labs’ shell commands are written for a Unix-style shell and work there as printed; in PowerShell some of them behave differently.
1. Install Zed
Zed is the editor we use throughout the course. Install it for your operating system.
Download and run the installer from zed.dev/windows.
Zed on Windows needs a DirectX 11-capable GPU. If Zed opens to a blank or black window, update your GPU drivers. If it still won’t render, use the VS Code fallback below: everything in the course works there too.
Install with the official script:
curl -f https://zed.dev/install.sh | sh2. Create a Mistral account
We use Mistral as the model provider for the labs. It is EU-hosted, has a usable free tier, and its coding models are a good fit for the exercises.
Go to console.mistral.ai and sign up.
Choose the free “Experiment” plan. This requires phone verification but no credit card.
In the console sidebar under API, open API Keys and click New key (name and expiration are optional). Copy the key immediately (it is shown only once and can take a few minutes to become usable) and store it somewhere you can copy-paste from on Day 1 (a password manager or a secure note, not a public file).
This one key powers both the labs and Zed’s inline edit predictions. Wire it up right away: in Zed, open the Settings Editor (
cmd-,on macOS), search for Edit Predictions, click Configure Providers, and paste the key into the Codestral section, leaving the API URL at its default (not the Mistral agent entry; that is a different key slot).Typing in any file should now show grey inline suggestions.
On the free tier, Mistral uses your inputs and outputs to train its models by default. Turn this off before you use the key:
Open Privacy in the console sidebar, and under “Anonymous improvement data” disable the toggle. Once opted out, Mistral no longer uses your input or output data to train its models.
3. Optional: apply for the Zed student plan
The student plan gives you Zed Pro features free for 12 months: nice to have, but nothing in the course depends on it. Edit predictions come from the free Mistral key from step 2 either way.
If you want it:
- Open Zed and sign in with your GitHub account. Zed requires the account to be at least 30 days old. If yours is newer, skip this step.
- Go to zed.dev/education and submit your university email address for verification (can take up to 72 hours).
- Once verified you get unlimited Zed-hosted edit predictions and $10/month in model credits for 12 months.
If your university email address isn’t recognized by the verification system, ask me. This can be resolved.
No plan, sign-in too young, or verification still pending when the course starts? You are not blocked: with the Mistral key from step 2 configured, every lab and edit predictions work without it. See the FAQ.
4. Create a GitHub account
Skip this step if you already have a GitHub account.
If you don’t, create a free account at github.com. We use it on Day 2 for GitHub tooling and, optionally, to publish your capstone at the end of the course.
A brand-new account is fine for everything the course requires. The only thing it cannot do is the optional Zed sign-in (30-day rule, step 3). Edit predictions come from your Mistral key instead.
5. Install uv
uv is the Python and project manager that every lab uses. Install it for your operating system, then verify.
curl -LsSf https://astral.sh/uv/install.sh | shpowershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Then confirm it is installed:
uv --versionYou do not need to install Python separately. uv downloads the correct Python version automatically the first time a lab needs it.
6. Fallback: VS Code
If Zed will not run on your machine (for example, an older Windows GPU), install VS Code instead. Everything in the course works there too: OpenCode runs in its integrated terminal. The only thing you lose is Zed’s built-in edit prediction (autocomplete).
Agent sessions run more smoothly with at least 8 GB of RAM. If your machine is tight on memory, close other heavy applications during the labs.
7. Verify your setup
Run through this self-check at the end of the guided setup block. If every item passes, you are ready.
- Zed opens on your machine (or VS Code, if you used the fallback).
- Edit predictions work: with your Mistral key configured, typing in any file shows grey inline suggestions.
- You can log in to console.mistral.ai and see your API key, with training opt-out enabled.
- Running
uv --versionprints a version number. - (Only if you applied for the student plan:) you are signed in to Zed and the plan status shows verified or pending.
If anything fails and you can’t resolve it from this page, ask me in the room. See the FAQ for common questions.