/ CMD K
Home Courses VS Code Terminal 0% complete

Welcome to the VS Code Terminal Bible

A practical AI Con Todo guide for non-technical builders who want to use the VS Code terminal without fear. Learn where to click, what to type, which commands matter, which plugins help, and how to avoid the mistakes that break projects.

>_
Know where you are
Terminal, folder, shell, command.
$
Use power commands
Run, install, inspect, clean.
Git
Save your work
Status, commit, branch, push.
+
Add plugins
Helpful extensions, not clutter.
The beginner loop
1
Open folderUse File -> Open Folder, not one random file.
2
Open terminalUse Terminal -> New Terminal inside VS Code.
3
Check locationRun pwd or dir.
4
Run safelyUse status and version commands before changing things.
What this guide teaches
Terminal basics

Folders, commands, shells, profiles, and shortcuts.

Project commands

Install, run, test, build, and stop local servers.

Git confidence

See what changed, commit safely, push to GitHub.

Power setup

Tasks, extensions, profiles, and troubleshooting.

Part 1

Open and Understand the Terminal

The VS Code integrated terminal is just a command line inside your project. It lets you install tools, start local servers, run tests, use Git, and talk to coding agents without switching apps.

SOP: where to click

1. Open the full folder

VS Code
File -> Open Folder...
Documents/my-project
Explorer shows files on the left

Open a folder, not a single file. Most project commands only work when VS Code is opened at the project root.

2. Open terminal

VS Code
Top menu
Terminal -> New Terminal
Panel opens at bottom

Shortcut: Mac Control + `; Windows/Linux Ctrl + `.

3. Check the folder

Terminal
pwd
or on Windows: cd
Confirm it says your project folder

If you are in the wrong folder, commands may fail or change the wrong project.

Terminal words in plain English

WordMeaningBeginner rule
PromptThe text before your cursor, often ending in $ or %.You type commands after it.
Current folderThe folder your command will affect.Check it before installing, deleting, or running Git.
ShellThe terminal program: zsh, bash, PowerShell, WSL.Use the command that matches your shell.
Exit codeWhether the command succeeded or failed.Error text is context; copy it into your AI assistant.

First five commands

bash
pwd
ls
git status
node --version
npm --version
On Windows PowerShell, ls works, but dir is also common.
Safety First

Is This Code Safe to Open? (Workspace Trust)

The safest first question when you open a folder you did not create — a cloned repo, a downloaded sample, or a project an AI generated for you — is simple: should I let this code run on my computer? VS Code answers it with a built-in feature called Workspace Trust.

What Restricted Mode does

When you open an unfamiliar folder, VS Code can open it in Restricted Mode and show a banner across the top. You can read, browse, and edit every file safely — but VS Code will not automatically run the project's tasks, start its debugger, or apply settings the project itself defined. Those are exactly the things that could run code without you asking. When you trust the folder, they turn back on.

You want to…Restricted ModeTrusted folder
Read and browse the codeYesYes
Edit filesYesYes
Auto-run the project's tasks / build stepsBlockedAllowed
Start the debuggerBlockedAllowed
Apply workspace-defined settings & some extensionsBlockedAllowed

When to trust, when to wait

How to trust a folder

  • Click Manage or Trust in the banner at the top of the window, or open the Command Palette (Cmd/Ctrl + Shift + P) and search Workspace Trust.
  • Trusted folders are remembered, so you usually only do this once per project.
  • Want VS Code to pop up a prompt every time instead of just showing a banner? Set security.workspace.trust.startupPrompt to once in Settings.
Trusting a folder lets its code run on your computer. Only trust a project when you know where it came from — never to silence a warning.

Ask Your AI This

prompt
This project is open in VS Code in Restricted Mode and I did not write it.

Before I trust this folder:
1. Tell me what this project is and what it does.
2. List any files that run code automatically (tasks, scripts, build steps).
3. Flag anything that downloads, installs, deletes, or sends data anywhere.
4. Tell me plainly whether it looks safe to trust.

Do not change any files.
Restricted Mode is for reading code, not running it. Browse first, trust second.
Part 2

Daily Power Commands

These are the commands non-technical builders use constantly. You do not need to memorize everything. Learn what each category does and copy the command when needed.

Command cheat sheet

GoalMac/LinuxWindows PowerShell
Show current folderpwdpwd or cd
List fileslsls or dir
Move into foldercd folder-namecd folder-name
Go up one foldercd ..cd ..
Create foldermkdir folder-namemkdir folder-name
Stop running serverControl + CCtrl + C
Clear screenclearcls

Version checks

bash
git --version
node --version
npm --version
python3 --version
code --version

Power terminal shortcuts

Control + `

Toggle the terminal panel open or closed.

Command/Ctrl + Shift + P

Open Command Palette. Search for anything VS Code can do.

Control + C

Stop a running server or command.

Up arrow

Bring back the last command so you do not retype it.

Tab

Autocomplete file and folder names.

Split Terminal

Run server in one terminal and Git/tests in another.

Be careful with commands that include rm, del, sudo, force, reset --hard, or secret-looking tokens. Ask an AI agent to explain first.
Part 3

Project Setup Flow

Most modern projects have the same loop: install dependencies, start a local server, open the browser, then stop the server when done.

Detect the project type

If you seeLikely projectCommon next command
package.jsonJavaScript, React, Next.js, Vitenpm install, then npm run dev
requirements.txtPythonpip install -r requirements.txt
pyproject.tomlModern PythonAsk the project README which installer to use.
firebase.jsonFirebase site or appfirebase serve or deploy command from README.
index.html onlyStatic HTMLOpen file in browser or use Live Server.

Most common web app commands

bash
npm install
npm run dev
npm run build
npm test
npm run lint

Ask AI before installing

prompt
I opened this project in VS Code.

Please inspect the files and tell me:
1. What kind of project this is.
2. Which terminal command installs dependencies.
3. Which command starts it locally.
4. Which command tests or builds it.
5. Whether any command is risky or requires secrets.

Do not edit files yet.

When the server starts

  • Look for a local URL like http://localhost:3000 or http://localhost:5173.
  • Hold Command/Ctrl and click the URL, or copy it into your browser.
  • Leave that terminal running while you test the app.
  • Press Control + C when you want to stop the server.
Part 4

Git and GitHub from Terminal

Git is your undo system. GitHub is your cloud backup and collaboration hub. Use the terminal for the exact status, then use VS Code Source Control for visual review.

Safe Git loop

Everyday Git commands

bash
git status
git diff
git branch --show-current
git add README.md public/index.html
git commit -m "Describe what changed"
git push

GitHub CLI power commands

bash
gh auth status
gh repo view --web
gh pr status
gh pr create --draft --fill
gh pr view --web

Prompt: safe commit review

prompt
Before I commit, inspect the working tree.

Tell me:
1. Current branch.
2. Changed and untracked files.
3. Files that should not be committed.
4. A safe git add command using explicit file names.
5. A clear commit message.

Do not run git add, commit, push, reset, or checkout until I approve.
Avoid git add . on beginner projects until you know exactly what is being staged.
Part 5

Run, Test, and Debug

The terminal tells you what is really happening. Error messages are not failure; they are instructions for what to fix next.

What to run by project type

Project typeLocal runValidation
React/Vitenpm run devnpm run build
Next.jsnpm run devnpm run build
Static HTMLLive Server or open fileClick links, forms, search, responsive views
Pythonpython app.py or README commandpytest
Firebase static sitefirebase serve if configuredfirebase deploy --only hosting when ready

Error-message workflow

  1. Copy the first error, not the whole noisy terminal if it is huge.
  2. Include the command you ran.
  3. Include the folder you were in.
  4. Ask the AI to identify the root cause before changing code.
  5. Rerun the same command after the fix.

Prompt: debug terminal error

prompt
I ran this command in the VS Code terminal:
[paste command]

I was in this folder:
[paste pwd result]

Here is the error:
[paste error]

Please explain in plain English:
1. What failed.
2. The likely cause.
3. The safest fix.
4. The exact command to verify the fix.
Part 6

Tasks and Automation

VS Code Tasks turn repeated terminal commands into menu items. This is useful when you always run the same dev server, build, test, or deploy command.

When to create a task

Run dev server

One click to start npm run dev.

Build before deploy

Run npm run build consistently.

Run tests

Make validation repeatable.

Deploy static site

Wrap a known safe deploy command.

Beginner tasks.json example

json
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Run dev server",
      "type": "shell",
      "command": "npm run dev",
      "problemMatcher": []
    },
    {
      "label": "Build project",
      "type": "shell",
      "command": "npm run build",
      "problemMatcher": []
    }
  ]
}

How to run a task

  • Open Command Palette: Command/Ctrl + Shift + P.
  • Search Tasks: Run Task.
  • Select the task label.
  • Watch the terminal output.
Part 7

Power Plugins

Extensions should make the terminal and project safer, not heavier. Install a small set first, then add more only when you feel a real need.

Beginner-friendly extension stack

ExtensionUse it forBeginner note
GitHub Pull RequestsReview PRs and issues inside VS Code.Great when your project lives on GitHub.
GitLensUnderstand who changed what and when.Helpful, but not required on day one.
ESLintFind JavaScript/TypeScript code problems.Use when the project already has ESLint configured.
PrettierFormat code consistently.Turn on format-on-save only when the project expects it.
Live ServerPreview simple HTML/CSS pages locally.Excellent for static HTML projects.
Error LensShow errors inline in the editor.Makes problems easier to notice.
Dev ContainersRun a project inside a repeatable container.Advanced, useful for team consistency.
DockerWork with Docker containers and images.Install only if the project uses Docker.
REST ClientTest APIs from files in VS Code.Useful for backend and automation projects.

Install extensions from terminal

bash
code --install-extension GitHub.vscode-pull-request-github
code --install-extension eamodio.gitlens
code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension ritwickdey.LiveServer
code --install-extension usernamehw.errorlens
code --install-extension ms-vscode-remote.remote-containers
code --install-extension ms-azuretools.vscode-docker
code --install-extension humao.rest-client
Do not install every extension just because it sounds useful. Too many extensions can slow VS Code down and confuse beginners. Start with GitHub Pull Requests, Prettier, ESLint, and Live Server, then add only what your project needs.
Part 8

Best Practices

Good terminal habits make AI-assisted building much safer. The goal is not to become a command-line expert. The goal is to stop being surprised by commands.

Rules that prevent pain

Folder naming rules

UseAvoidReason
my-first-appMy First AppSpaces cause quoting problems.
client-dashboardcliente-diseñoAccents and special characters can break tools.
aicontodo-sitefinal-final-v3Clear names help future agents and collaborators.

Prompt: explain a command first

prompt
Explain this terminal command before I run it:
[paste command]

Tell me:
1. What it does.
2. Which folder I should be in.
3. Whether it changes files, installs packages, deletes anything, commits, pushes, or deploys.
4. A safer alternative if there is risk.
5. The verification command after it runs.
Part 9

Troubleshooting

Most terminal problems are boring: wrong folder, missing install, wrong shell, server already running, or a stale terminal session.

Common problems

ProblemWhat it usually meansTry this
command not foundThe tool is not installed or terminal cannot find it.Close terminal, open a new one, run version check, reinstall if needed.
npm run dev failsDependencies may not be installed.Run npm install, then try again.
Port already in useAnother server is already running.Stop old terminal with Control + C or use the new port it suggests.
Git says not a repositoryYou are outside the project folder or Git was never initialized.Run pwd, open correct folder, then ask before git init.
Permission deniedCommand needs access or file is protected.Do not add sudo blindly; ask what it will change.

Reset your terminal calmly

  1. Press Control + C if something is running.
  2. Click the trash icon on the terminal panel to close the session.
  3. Open Terminal -> New Terminal.
  4. Run pwd and git status.
  5. Try the command again, or paste the error into your AI assistant.

Prompt: terminal doctor

prompt
Act as my VS Code terminal doctor.

Ask me for:
1. The command I ran.
2. The full error.
3. The result of pwd.
4. The result of git status.
5. The operating system and shell if needed.

Then give me the smallest safe fix and one verification command.
Reference

Sources

This guide is written for non-technical AI Con Todo learners. It combines official VS Code concepts with practical project workflows.

TopicSourceUse in this guide
Integrated terminalVS Code terminal basicsOpening terminal, profiles, tabs, split terminal, shell behavior.
Command PaletteVS Code user interfaceCommand Palette, panels, editor workflow.
TasksVS Code TasksRepeatable terminal commands with tasks.json.
ExtensionsVS Code Extension MarketplaceHow to find, install, manage, disable, and uninstall extensions.
GitVS Code Source ControlGit workflow and Source Control panel mental model.
Best-practice layer: AI Con Todo terminal workflow for beginner-safe AI-assisted building.