Set up your machine: Node.js, VS Code, Git and a free AI assistant
Install Node.js, VS Code and Git, connect a free AI assistant to your editor, and make your first saved commit. Everything in the rest of this track builds on this setup.
In this lesson you will set up the four things you need for the whole track: Node.js (runs JavaScript outside the browser and powers React tools), VS Code (your code editor), Git (saves versions of your project) and a free AI assistant (chat in the browser, plus an assistant inside VS Code).
Prerequisites: a laptop or desktop with Windows 10/11, macOS or Linux, about 2 GB of free disk space and an internet connection. A phone is not enough for this track. Allow about 30 minutes; downloads on a slow connection take the most time.
Step 1: Install Node.js
Node.js comes with npm, a tool that downloads JavaScript packages such as React. Install the LTS (long-term support) version, which is the stable one. Download it from the official site, nodejs.org, and run the installer with the default options.
On Windows 10/11 you can also use the Windows Package Manager from PowerShell or Command Prompt:
winget install OpenJS.NodeJS.LTSInstalls the current Node.js LTS. Close and reopen the terminal afterwards so it picks up the new program.
brew install nodeInstalls Node.js. If you do not have Homebrew, use the installer from nodejs.org instead.
On Linux, the simplest safe way is the installer or package instructions on nodejs.org for your distribution. Distribution packages are often old.
Now check that it works. Open a new terminal (on Windows: search for PowerShell or Windows Terminal) and run:
node -v
npm -vEach command prints a version number.
v22.11.0
10.9.0"node is not recognized" or "command not found"
This almost always means the terminal was opened before the install finished. Close it, open a new one and try again. If it still fails, restart the computer. Do not copy random fixes from chat without understanding them: paste the exact error into an AI assistant and ask what it means.
Step 2: Install VS Code
Visual Studio Code (VS Code) is a free code editor from Microsoft. Download it from code.visualstudio.com and install it with the defaults. On Windows, keep the options that add "Open with Code" to the right-click menu and add it to PATH ticked, if the installer offers them. They let you open a folder from the terminal with code ..
Or, on Windows:
winget install Microsoft.VisualStudioCodeOpen VS Code. Useful things to know on day one:
- Explorer (top icon on the left): your files and folders.
- Terminal: menu Terminal, then New Terminal. It opens a terminal inside the editor, already in your project folder.
- Command Palette: press Ctrl+Shift+P (Cmd+Shift+P on Mac) and type what you want, for example "Install Extension".
- Save: Ctrl+S. Unsaved files show a dot on the tab.
Step 3: Install Git
Git records the history of your project. Each saved point is a commit. If an AI edit breaks your code, you can go back to the last commit. Download from git-scm.com, or:
winget install Git.Gitgit --versionPrints something like git version 2.x.x. On macOS, the first run may offer to install Apple's command line tools; accept.
Tell Git who you are. This name and email are written into your commits. Use your own name; the email can be your personal one (GitHub also offers a private no-reply address).
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch mainSets your identity and makes new repositories start on a branch called main.
Step 4: Get a free AI assistant
You need two things: a chat assistant in the browser and, optionally, an editor assistant inside VS Code. Both have free options at the time of writing (2026). Limits change, so read each provider's page.
Free options to start with
| Tool | Kind | How to get it |
|---|---|---|
| Gemini | Chat | Sign in at gemini.google.com with a Google account |
| ChatGPT | Chat | Sign in at chatgpt.com; the free plan has usage limits |
| Claude | Chat | Sign in at claude.ai; there is a free plan and paid plans add more usage |
| GitHub Copilot Free | In VS Code | Install the GitHub Copilot extension and sign in with a GitHub account; free usage is limited per month |
| Gemini Code Assist | In VS Code | Install the Gemini Code Assist extension and sign in with a Google account; there is a free version for individuals |
Pick one chat assistant now. You do not need all of them; switching later is easy. If you are a student, look at the GitHub Student Developer Pack, which can give verified students free access to Copilot Pro.
To add GitHub Copilot in VS Code:
Install an editor assistant
- 1Create a free GitHub account at github.com if you do not have one.
- 2In VS Code, press
Ctrl+Shift+Xto open Extensions. - 3Search for "GitHub Copilot" and install the one published by GitHub.
- 4Click the sign-in prompt (or the Copilot icon at the top or bottom of the window) and sign in with GitHub in the browser.
- 5Open the Copilot Chat panel, type "Say hello" and check that you get an answer.
Check privacy settings
AI tools may use your prompts to improve their models unless you turn that off. Look in the settings of your account for options about training on your data. Do not paste passwords, API keys, or private data of other people into any AI tool.
Step 5: Your first project and commit
Now test everything together with a tiny project: create a folder, write one JavaScript file, run it with Node and save it with Git.
Create and run the project
- 1Open a terminal and go to the place where you keep projects, for example your Documents folder.
- 2Create a folder, move into it and open it in VS Code using the commands in the next block.
- 3In VS Code, create a file named
hello.jswith the code shown below. - 4Open the VS Code terminal and run
node hello.js. - 5Create a
.gitignorefile, then commit.
mkdir ai-practice
cd ai-practice
code .Makes a folder called ai-practice and opens it in VS Code. If code . is not found, open VS Code and use File, Open Folder instead.
const shop = "Brew & Bean";
const items = [
{ name: "Espresso", price: 120 },
{ name: "Masala Chai", price: 90 },
];
const total = items.reduce((sum, item) => sum + item.price, 0);
console.log(`Welcome to ${shop}. A coffee and a chai cost Rs ${total}.`);Adds up the prices in a list and prints a sentence.
node hello.jsWelcome to Brew & Bean. A coffee and a chai cost Rs 210.Next, a .gitignore file tells Git which files never to save. Two matter in almost every project: node_modules (thousands of downloaded files that can be recreated) and .env (secret keys). Create a file named .gitignore in the same folder with these lines:
node_modules
.env
Git will skip these files and folders.
git init
git add .
git commit -m "First commit: hello.js"
git log --onelinegit init starts tracking the folder. git add . stages all files. git commit saves them with a message. git log --oneline shows the history.
a1b2c3d First commit: hello.jsYour hash (the letters and digits at the start) will differ. If it printed one line like this, Git works.
Step 6: Ask AI to explain your code
Try your first AI interaction with real code. Copy hello.js into the chat assistant, or select it in VS Code and use the editor assistant's chat.
I am a beginner. Explain this [language] code line by line in plain English. Tell me what each line does and what it prints. Then ask me 2 questions to check that I understood.
[paste your code]What to expect: A good answer explains reduce (it adds the prices one by one starting from 0) and the template string with backticks. If it uses words you do not know, ask it to explain those too.
Try it: Extend and save
1. Ask your AI assistant: "Change this code so it also prints the most expensive item." Read the answer before you paste it.
2. Run it with node hello.js and confirm the output is right by checking it by hand.
3. Commit with a clear message, then run git log --oneline and confirm you now have two commits.
Setup complete when
node -vandnpm -vprint version numbers.git --versionworks and your name and email are configured.- VS Code opens a folder and has an integrated terminal.
- You can chat with at least one AI assistant for free.
node hello.jsprints the welcome sentence.git log --onelineshows at least one commit.
Key takeaways
- Node.js (with npm), VS Code and Git are the base tools for every lesson that follows.
- Install the LTS version of Node.js, then open a new terminal and check with
node -v. - A commit is a saved version of your project; set your name and email in Git first.
- Put
node_modulesand.envin.gitignoreso packages and secrets are not saved. - Free AI options exist for chat and for VS Code, but limits change, so check official pages.
- Never paste passwords or API keys into an AI tool.
Check yourself
Finishing the quiz marks the lesson as done.
1. You installed Node.js but the terminal says node is not recognised. What is the most likely cause?
2. Which file or folder should you put in .gitignore in almost every Node project?
3. What does git commit -m "message" do?
4. Why is it a bad idea to paste your API key into an AI chat?
5. What is the purpose of the git init command?
Saved on this device. Create a free account to keep it on every device.
Practise this with Sam
A real mock interview, out loud, with an honest scorecard. Free to start.