Setup
Set up your tools
Six steps. Do them in order, and ask for help if something looks different on your screen.
- Create a GitHub account
- Install git and the GitHub CLI, and log in
- Install Zed
- Install uv
- Install ruff, ty and pytest
- Set up Zed to use ruff and ty
Many steps use the terminal: a window where you type commands. The next slide shows how to open it on your computer.
Setup
Which computer do you have?
Pick your operating system. The rest of the slides will show the right commands for it.
Open a terminal: press Ctrl + Alt + T, or search for "Terminal" in your app menu.
When a slide shows a command in a box, press Copy, paste it into the terminal and press Enter.
Step 1 of 6
Create a GitHub account
GitHub is where developers keep their code. These lessons live there too, and you will use it to save your own projects and show them to others.
- Go to github.com/signup
- Choose a username. Other people will see it, and it is hard to change, so pick something you will still like in a few years.
- Use an email address you can open, because GitHub sends you a code to confirm it.
- Pick a strong password and write it down somewhere safe.
You need to be at least 13 years old to have a GitHub account. If you are younger, tell your instructor and we will find another way to save your code.
Step 2 of 6
Install git and the GitHub CLI
git copies code to and from GitHub. The GitHub CLI (gh) logs you in, so git never asks for passwords.
On Ubuntu or Debian:
sudo apt install git ghOther Linux? See the gh install guide or ask your instructor.
Now log in. Answer the questions like this:
gh auth login- Where do you use GitHub? GitHub.com
- Preferred protocol? HTTPS
- Authenticate Git with your GitHub credentials? Yes
- How would you like to authenticate? Login with a web browser
- Copy the code it shows, press Enter, paste the code in the browser and click Authorize.
Check: gh auth status should say you are logged in.
Step 3 of 6
Install Zed
Zed is the editor where we write code. It is fast, and it understands Python, JavaScript and Go.
Paste this in the terminal:
curl -f https://zed.dev/install.sh | shThen start Zed by typing zed in the terminal, or find it in your app menu.
Check: open Zed. You should see a welcome screen.
Step 4 of 6
Install uv
uv installs Python for you, creates projects, and keeps track of the packages each project uses. One tool instead of five.
curl -LsSf https://astral.sh/uv/install.sh | shClose the terminal and open a new one, so it learns about uv. Then check that it works:
uv --versionYou should see something like uv 0.10.3. The exact number does not matter.
Step 5 of 6
Install ruff, ty and pytest
ruff
Finds mistakes and tidies up your code so it looks neat.
ty
Checks that you do not mix up text and numbers, before you even run the program.
pytest
Runs tests that prove your code does what you think it does.
ruff and ty are installed once, for the whole computer, with uv:
uv tool install ruff@latest
uv tool install ty@latestpytest is added to each project instead, so we do that in the next section
when we create your project (with uv add --dev pytest).
Check:
ruff --version
ty --versionIf the terminal says it cannot find ruff, run uv tool update-shell, then open a new terminal and try again.
Step 6 of 6
Tell Zed to use ruff and ty
Zed comes with a Python checker called basedpyright. We switch it off and use ty and ruff instead, which are built into Zed too.
- Open Zed's settings: press Ctrl + , (on a Mac: ⌘ + ,), or open the command palette and choose zed: open settings.
- A file called
settings.jsonopens. Paste this inside it, so it is the only thing in the file:
{
"languages": {
"Python": {
"language_servers": ["ty", "ruff"],
"format_on_save": "on",
"formatter": {
"language_server": { "name": "ruff" }
},
"code_actions_on_format": {
"source.organizeImports.ruff": true,
"source.fixAll.ruff": true
}
}
}
}The language_servers list says which checkers Zed uses for Python. Anything not in
the list (like pyright and basedpyright) is turned off. The rest makes ruff tidy your code every
time you save.
Setup
All done? Let's check
Run these in a new terminal. Each one should print a version number, and gh should say you are logged in:
git --version
gh auth status
uv --version
ruff --version
ty --versionThen open Zed and make sure it starts.
If everything works, you are ready to create your first project. 🏴☠️
Something not working? That is normal. Raise your hand and we will fix it together.