Course overview/Set up the workspace3 of 4

Start the course with one prompt

Start the course with one prompt

Install a coding agent, paste one prompt, and let it set up the project and hand you the controls.

One prompt sets up everything

The rest of this course is taught by your agent. This lesson gets you to that point: you install a coding agent, paste one prompt, and the agent installs what it needs, builds the project, generates the data, and hands you the controls. You do it once.

That first prompt is also your first lesson in the method. You delegate the setup, then you verify it - you check the row counts yourself rather than taking the agent's word. Delegate, then verify. That is the whole course in miniature.

Install a coding agent

The prompt installs most of the toolchain for you, Git and the Bruin CLI included. Three things you set up by hand first, because they have to exist before you can paste the prompt:

  • A terminal. On macOS, press Cmd+Space, type Terminal, press Enter. On Windows, install Git for Windows and use Git Bash (regular Command Prompt and PowerShell will not run the install script the agent uses; WSL also works). On Linux, any shell you already have.
  • A coding agent. One of Claude Code (runs in the terminal; start it by typing claude), Cursor (an editor with the agent built in), or Codex (runs in the terminal; start it with codex). Any of the three works everywhere in this course.
  • A code editor. You will spend this course reading files - SQL queries, the project's docs, your own notes - and an editor makes that far easier than scrolling the terminal. If you chose Cursor, you already have one. If you chose Claude Code or Codex, install VS Code and open the project folder with File, Open Folder.

Make a folder for the course, open it in your terminal, and start your agent there. Everything an agent does is relative to the folder it opens in, so starting it in the right place matters.

Paste the prompt

With your agent running in an empty course folder, give it this one prompt. It tells the agent to install what is missing, scaffold the project, load the data, and then stop and hand the course back to you.

AI Prompt

You are going to set up and then teach me an interactive SQL course. Do this in order, and show me each command before you run it:

  1. Check that Git and Bruin are installed (git --version, bruin version). If Bruin is missing, install it with curl -LsSf https://getbruin.com/install/cli | sh, then check the version again.
  2. Run bruin init academy-sql-beginner in this folder.
  3. Generate the sample data with bruin run academy-sql-beginner/pipeline, then confirm orders has 1,200 rows and order_items has 2,880.
  4. Read academy-sql-beginner/AGENTS.md and academy-sql-beginner/course/README.md so you know how to run the course.
  5. Greet me, show me the 15-lesson syllabus, and tell me to say "next lesson" to begin and "review my work" whenever I finish a task.

Do not teach lesson one yet - just get set up and hand me the controls. If any command fails, stop and show me the error instead of trying something else.

Read what the agent does, do not just skim its summary. It should show you each command before running it - that is the deal the prompt sets, and holding the agent to that deal is the skill this whole course teaches.

What the agent builds

bruin init academy-sql-beginner creates an academy-sql-beginner/ project folder and writes a .bruin.yml config to your repository root. You need no credentials: the project uses a local DuckDB database file, and the DuckDB engine ships inside Bruin, so there is nothing else to install or sign up for.

The commands on these companion pages assume you are inside that academy-sql-beginner/ folder, so cd into it if you want to run them yourself. When the agent runs them for you, it handles that.

bruin run academy-sql-beginner/pipeline generates the data. It is built by SQL rather than downloaded, so it finishes in well under a second and works offline. Six assets build the tables and eleven quality checks pass. When it is done, orders holds 1,200 rows and order_items holds 2,880.

The two commands you will use

From here, you drive the course with two phrases:

  • next lesson - the agent teaches the next lesson, asks you a few questions to check you followed, then sets a hands-on task, usually a query to write yourself.
  • review my work - once you have done the task by hand, the agent reads what you wrote, runs it, and tells you what is right, what is wrong, and why. It marks the lesson done only when your work holds up.

If you ever lose your place, ask the agent where am I. To hear a concept again a different way, say repeat. To get unstuck on a task without the answer, ask for a hint.

Checkpoint

Confirm all three before you say next lesson. The agent has done the work; now you verify it, which is the habit the course is about:

  • bruin version prints a version number.
  • orders contains 1,200 rows. Check it yourself: bruin query --connection duckdb-default --description "checkpoint" --query "SELECT COUNT(*) FROM orders;" - the next lesson explains this command in full.
  • Your agent has shown you a 15-lesson syllabus and is waiting for you to say next lesson.

Optional: use a cloud warehouse instead

The template ships an optional MotherDuck environment for anyone who wants a real cloud warehouse. MotherDuck is DuckDB-compatible, so the only change is one flag: bruin run academy-sql-beginner/pipeline --environment cloud, after setting a MOTHERDUCK_TOKEN. Everything in this course works the same either way, and nothing later requires it.

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.

The signup form is hosted by Brevo. Allow marketing cookies to load it.