Let's set up a virtual environment for our project.
Virtual environments are Python's way to keep dependencies (e.g., the Google AI libraries we're going to use) separate from other projects on our machine.
uv init your-project-name
cd your-project-name
uv venv
Make sure your virtual environment directory, usually .venv or venv, is added to your .gitignore file.
source .venv/bin/activate
You should see something like (your-project-name) in your terminal prompt; for example, mine is:
(aiagent) wagslane@MacBook-Pro-2 aiagent %
Always make sure your virtual environment is activated when running code or using the Boot.dev CLI in this course.
uv add google-genai==1.12.1
uv add python-dotenv==1.1.0
This tells Python that this project requires google-genai version 1.12.1 and python-dotenv version 1.1.0.
To run the project using the uv virtual environment, you can use the following command:
uv run main.py
In your terminal, you should see something like Hello from YOUR PROJECT NAME.
Run and submit the CLI tests while in your virtual environment.