🛣️ Welcome to the beginning of your journey to become an AI Engineer!
This tutorial is designed to guide you through the process of setting up your Interactive Development Environment (IDE) to align with best-practices at The LLM Edge!
- Cursor (Recommended as best-practice tool)
- Visual Studio Code
- 🆚 Watch 🪄 The Wiz walkthrough the key features of Cursor and what makes it different from VS Code)
Note: Anysphere's Cursor is a just a fork of VS Code (like Codeium's Windsurf and other competitors).
- Windows
- Linux (Debian/Ubuntu)
- macOS Intel
- macOS Apple Silicon
We will be using a few core tools in our stack such as a terminal, Command Line Interface (CLI), git, uv, and pip.
Terminal and Command Line Interface
We must use both terminal and a Command Line Interface (CLI) to develop AI applications with open-source tools. This is true regardless of our operating system.
A terminal is a software application like macOS Terminal or Windows Terminal that gives you a window where you type text-based commands and receive text-based output.
A Command Line Interace (CLI) refers to the environment or shell (e.g., Bash, Zsh, PowerShell, etc.) that interprets your text commands. The CLI is the program that actually runs commands and processes input/output; it just happens to run inside a terminal application (or emulator).
Here is a quick review of some terminal commands that you should make sure you know! It's important to understand both syntax and what they do!
| Command | Stands For | Description |
|---|---|---|
ls |
long listing | lists all files and directories in the present working directory |
ls -a |
long listing all | lists hidden files as well |
cd {dirname} |
change directory | to change to a particular directory |
cd ~ |
change directory home | navigate to HOME directory |
cd .. |
change directory up | move one level up |
cat {filename} |
concatenate | displays the file content |
sudo |
superuser | allows regular users to run programs with the security privileges of the superuser or root |
mv {filename} {newfilename} |
move | renames the file to new filename |
clear |
clear | clears the terminal screen |
mkdir {dirname} |
make directory | create new directory in present working directory or at specified path |
rm {filename} |
remove | remove file with given filename |
touch {filename}.{ext} |
touch | create new empty file |
rmdir {dirname} |
remove directory | deletes a directory |
ssh {username}@{ip-address} or {hostname} |
secure shell | login into a remote Linux machine using SSH |
Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects. These are the commands we will be using with git:
git clone -> clone a remote repository to your local computer
git add -> add files to a commit
git commit -m {message} -> commit changes with a message
git push -> push commit to remote repository
uv
uv is an extremely fast Python package manager and virtual environment management tool, written in Rust. uv aims to be a drop-in replacement for pip and pip-tools, providing significantly improved performance. We will use uv to manage both our package installations and virtual environments.
Some common uv commands:
uv init -> Initializes a new Python project and generates a pyproject.toml.
uv add <package-name> -> Adds a package dependency to pyproject.toml.
uv run python your_script.py -> Runs a Python script inside the project environment without requiring manual activation.
Note: In most AIM repositories, the required dependencies are already defined in pyproject.toml, so you typically will not need to run uv init or uv add unless you are modifying or extending the project.
Optional:
uv venv .venv -p 3.11 -> Creates a virtual environment in .venv using Python 3.11.
source .venv/bin/activate -> Activates the virtual environment for your current shell session. This is optional if you use uv run.
Let's start off by setting up our environment! Review the environment setup instructions for the local environment that you'll be using in this course.
Windows
- Install Windows Subsystem for Linux using Powershell
wsl --install-
Install Windows Terminal (You can even make it your [default!](https://devblogs.microsoft.com/commandline/ windows-terminal-as-your-default-command-line-experience/))
-
Install Ubuntu
-
Make sure you've install the correct version with the command
wsl -l -v
(If you find yourself getting stuck on the WSL2 install, here is a link to video instructions)
Give it a test drive!
Continue by installing the following tools using Windows Terminal to setup your environment.
| Tool | Purpose | Command |
|---|---|---|
| 🐍 uv (installed in WSL2) | Python Package Manager | `curl -LsSf https://astral.sh/uv/install.sh |
| Version Control | sudo apt update && sudo apt upgrade sudo apt install git-all |
|
| 📝 VS Code (installed in Windows) | Development Environment | Download |
| 📝 Cursor | Development Environment | Download |
Linux (Debian/Ubuntu)
Open terminal using Ctrl+Shift+T. Enter the following commands in terminal to setup your environment.
| Tool | Purpose | Command |
|---|---|---|
| 🐍 uv | Python Package Manager | `curl -LsSf https://astral.sh/uv/install.sh |
| Version Control | sudo apt update && sudo apt upgrade sudo apt install git-all |
|
| 📝 VS Code | Development Environment | Download |
| 📝 Cursor | Development Environment | Download |
macOS Intel
To get started, we need to download the MacOS package manager, Homebrew 🍺, so that we can download the tools we'll be using in the course. If you don't already have Homebrew installed, run the following commands:
-
Open terminal using ⌘+Space and type
terminal. -
Install Homebrew using the command below, following the command prompts:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Update Homebrew (This may take a few minutes)
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallowgit -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch -
Install the
wgetcommand to continue following alongbrew install wget
Enter the following commands in terminal to setup your environment.
| Tool | Purpose | Command |
|---|---|---|
| 🐍 uv | Python Package Manager | `curl -LsSf https://astral.sh/uv/install.sh |
| Version Control | brew install git |
|
| 📝 VS Code | Development Environment | Download |
| 📝 Cursor | Development Environment | Download |
macOS Apple Silicon
To get started with uv on Apple Silicon, we'll install it directly with our terminal.
Open terminal using ⌘+Space and type terminal. Enter the following commands in terminal to setup your environment.
First, let's install Homebrew if you don't already have it installed:
-
Install Homebrew using the command below, following the command prompts:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Update Homebrew (This may take a few minutes)
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallowgit -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch -
Install the
wgetcommand to continue following alongbrew install wget -
Install the
xcode-selectcommand-line utilities by typing the following command in the terminalxcode-select --install
Now let's install uv and other tools:
| Tool | Purpose | Command |
|---|---|---|
| 🐍 uv | Python Package Manager | `curl -LsSf https://astral.sh/uv/install.sh |
| Version Control | brew install git |
|
| 📝 VS Code | Development Environment | Download |
| 📝 Cursor | Development Environment | Download |
Install the Python and Jupyter Notebook Extensions
Set the Python Interpreter
-
Open Cursor (or VS Code) and click on
New File... -
Open the Command Pallette (Mac: Shift⌘+P , Windows: Ctrl+Shift+P)
-
Type "Python" in the search bar.
-
Click on
New Python File -
Open the Command Pallette again. Can you remember the shortcut? If not, see #2 above again.
-
Type "Python Interpreter".
-
Click on
Python: Select Interpreter -
Select the Python environment that was created by uv.
- Now you're ready to start coding!
Generating a GitHub Access Token
Create an account with GitHub here if you do not have one.
Navigate to GitHub's Developer Token settings.
Click on Generate new token > Generate new token (classic)

Give the token a description, set the expiration (we recommend 90 days), and check every box. When you're done, click Generate token at the bottom of the page.
Copy the access token and save it for later use. We will use this token to interact with GitHub. Please do not lose this access token or you will need to generate a new one.
Generating an OpenAI API key
Create an account with OpenAI here if you do not have one.
Navigate to OpenAI's API Developer settings and click on + Create new secrete key.

Name your key and click Create secret key

Copy the key and save it for later use. We will use this key several times in deploying projects. Please do not lose this key or you will need to generate a new one
We recommend your run through our OpenAI Notebook to learn how to utilize the OpenAI API.
Generating a Claude API key
Create an account with Claude AI (anthropic.com) here if you do not have one.
Navigate to Anthropic's Dashboard and click on Get API keys
NOTE: If you have not purchased credits yet, it will require you to purchase at least $5.00 worth before continuing.

Enter a key name (or accept the default) and click on Create API Key

Click the Copy button and save the key somewhere that is secure. We will use this key several times in deploying projects. As stated in the modal, Keep a record of your API key, you wont be able to view it again.
If you want to test the api key first, copy the example code and paste it into a terminal. The results will look something like this:

Github SSH Setup
Secure Shell Protocol (SSH) provides a secure communication channel of an unsecured network. Let's set it up!- Generate a Private/Public SSH Key Pair.
ssh-keygen -o -t rsa -C "your email address for github"-
Save file pair. Default location
~/.ssh/id_rsais fine! -
At the prompt, type in a secure passphrase.
-
Copy the contents of the public key that we will share with GitHub.
-
Mac:
pbcopy < ~/.ssh/id_rsa.pub -
Windows (WSL):
clip.exe < ~/.ssh/id_rsa.pub -
Linux:
xclip -sel c < ~/.ssh/id_rsa.pub
-
-
Go to your GitHub account and go to
Settings. -
Under
Access, click on theSSH and GPG keystab on the left.
- Click on the
New SSH Keybutton.
- Name the key, and paste the public key that you copied. Click the
Add SSH Keybutton
Creating a New Repository
When viewing the respository page, click on New and proceed to create your repo.
Filling Respository Details
Create the repository by inputting the following:
Repo nameRepo description- Make repo
public - Add a
README - Add
.gitignore(Python template) - Add
license(choose MIT)
Then click Create Repository.
Clone Your Repo
- Open your terminal and navigate to a place where you would like to make a directory to hold all your files for this class using the command
cd.
cd {directory name}- Once there, make a top level directory using
mkdir.
mkdir {directory name}cdinto it and make another directory calledcode.
cd {directory name}mkdir codecdinto it and run yourgit clone {your repo url}command.
cd codegit clone {your repo url}Adding The AI Makerspace Beyond-ChatGPT Content to Your Repo
cdinto your repo and check your remote git.
cd {your repo name}git remote -vAt this point, you should just have access to your own repo with an origin branch with both fetch and push options.
- Let's setup our global configuration:
git config --global user.email "your email address"git config --global user.name "your name"- Let's add a local branch for development.
git checkout -b LocalDevYou can change anything here in this branch!
git add .Commit the changes with the branch addition.
git commit -m "Adding a LocalDev branch."- Let's push our local changes to our remote repo.
git checkout maingit merge LocalDevgit push origin main- Add the Beyond-ChatGPT (BC) repo as an extra remote repo:
git remote add BC git@github.com:AI-Maker-Space/Beyond-ChatGPT.gitLet's check our remote repos:
git remote -vAt this point, you should have access to both your own repo and the AI Maker Space repo and should see something like this:
BC git@github.com:AI-Maker-Space/Beyond-ChatGPT.git (fetch)
BC git@github.com:AI-Maker-Space/Beyond-ChatGPT.git (push)
origin git@github.com:ai-kadhim/TestRepo.git (fetch)
origin git@github.com:ai-kadhim/TestRepo.git (push)Let's update our local repos:
git fetch --allMake a new branch for the Beyond-ChatGPT material (BCBranch).
git checkout --track -b BCBranch BC/mainYou should see something like this:
branch 'BCBranch' set up to track 'BC/main'.
Switched to a new branch 'BCBranch'You can visually check whether you are in that branch:
git log --all --graphNow let's push our updated local repo to our remote repo!
git checkout maingit merge BCBranch --allow-unrelated-historiesIf there are any conflicts you'll need to resolve them.
git add .git commit -m "message-here"git push origin mainFrom now on... after each release follow these steps to update your repo with new content:
git fetch --all
git checkout BCBranch
git merge --ff-only @{u}
git add .
git commit -m "branch is updated"
git checkout main
git merge BCBranch --allow-unrelated-historiesYou will be asked to add a comment about why this change is necessary --> add a message.
git push origin mainActivating Your Python Environment
- Now, let's activate the virtual environment we set up earlier with the command
uv venv activate. If you were successful, you should see your virtual environment name in your terminal.
Adding a Feature Branch
Let's add a feature branch to our local repo. Earlier, we showed you how to add a feature branch and content to your repo via the Terminal. This time we are going to show you how to do it using the Cursor (or VS Code) GUI.
-
Click on the
main
branch in the lower left side of the screen -
You will then see a drop-down menu with some branch-level option commands. Select the
Create a new branchoption. -
You will be prompted to enter the name for the branch. Let's give our branch an informative name
feature-hello-world. Thefeaturepre-fix is a common Git convention and let's our collaborators know what the purpose of the branch and the name of the feature. -
Now that we have a feature branch to work on, let's add some code to it!
Hello World! - Part 1
1. Next we will review some terminal commands and make some additions to our repo. Do these in your terminal where your current working directory is your repo.-
Check your current working directory:
pwd -
Create a new file:
touch hello_world.py -
Create new directory:
mkdir app -
Move file to directory:
mv hello_world.py app/hello_world.py -
Check that the move command worked:
cd appand thenls, you should see yourhello_world.pyfile -
Lastly, lets clear our terminal screen:
clear
print("hello world! let's do some ml ops!")- Save. And now go to the integrated terminal by clicking
CTRL + ~. In the terminal run your first program of the class by doingcd app->python hello_world.py. Congrats, we are off to a great start!
Hello World! - Part 2 - Notebook Edition
-
Create a new file under
appby clicking on theAdd filebutton
and let's name this file hello_world.ipynb. The.ipynbextension is a notebook extension which will allow you to interact with your code via a notebook in Cursor (or VS Code), instead of a vanilla Python file. You might need to select your kernel in the top right of the notebook file, if so, choose the one we created previously. -
In the first cell of
hello_world.ipynblets do our imports.import pandas as pd import numpy as np import matplotlib.pyplot as plt -
Run the cell by either clicking the play button or by doing
CTRL + ENTER. -
Create a new cell and in that put the following code:
np.random.seed(0) values = np.random.randn(100) # array of normally distributed random numbers s = pd.Series(values) # generate a pandas series s.plot(kind='hist', title='Normally distributed random values') # hist computes distribution plt.show() -
Run the cell and you should see your histogram plot! Well done.
- Now let's commit our code to our remote repository. This can be done one of two ways - either through the terminal or through Cursor's (or VS Code's) GUI. I'll explain the Cursor (or VS Code) way and but you can also choose to use the terminal method by making use of the commands demonstrated earlier.
-
Add a message to your commit by typing in the message field.
-
Click the check mark
button under changes to add your files to this commit. If you haven't saved your changes, you will be prompted to Save All and Commit. ClickSave All and Commit. -
Click the elipsis in
Source Control
ribbon and click Push. You may also be prompted toSync Changes. This will do Pull and Push, which will fetch new changes to the code and push your updates as well. -
You can then put in a pull request in GitHub
to merge into the branch that you pulled from, in this case the main branch. In real life, you would then review the code changes with another developer/team lead/supervisor and address any potential code conflicts.
Now that you've completed your IDE set-up, head on over to the The-AI-Engineer-Challenge repository to build your first LLM application!





















