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.
pwd or dir.Folders, commands, shells, profiles, and shortcuts.
Install, run, test, build, and stop local servers.
See what changed, commit safely, push to GitHub.
Tasks, extensions, profiles, and troubleshooting.
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
Open a folder, not a single file. Most project commands only work when VS Code is opened at the project root.
2. Open terminal
Shortcut: Mac Control + `; Windows/Linux Ctrl + `.
3. Check the folder
If you are in the wrong folder, commands may fail or change the wrong project.
Terminal words in plain English
| Word | Meaning | Beginner rule |
|---|---|---|
| Prompt | The text before your cursor, often ending in $ or %. | You type commands after it. |
| Current folder | The folder your command will affect. | Check it before installing, deleting, or running Git. |
| Shell | The terminal program: zsh, bash, PowerShell, WSL. | Use the command that matches your shell. |
| Exit code | Whether the command succeeded or failed. | Error text is context; copy it into your AI assistant. |
First five commands
pwd
ls
git status
node --version
npm --versionls works, but dir is also common.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 Mode | Trusted folder |
|---|---|---|
| Read and browse the code | Yes | Yes |
| Edit files | Yes | Yes |
| Auto-run the project's tasks / build steps | Blocked | Allowed |
| Start the debugger | Blocked | Allowed |
| Apply workspace-defined settings & some extensions | Blocked | Allowed |
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.startupPrompttooncein Settings.
Ask Your AI This
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.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
| Goal | Mac/Linux | Windows PowerShell |
|---|---|---|
| Show current folder | pwd | pwd or cd |
| List files | ls | ls or dir |
| Move into folder | cd folder-name | cd folder-name |
| Go up one folder | cd .. | cd .. |
| Create folder | mkdir folder-name | mkdir folder-name |
| Stop running server | Control + C | Ctrl + C |
| Clear screen | clear | cls |
Version checks
git --version
node --version
npm --version
python3 --version
code --versionPower terminal shortcuts
Toggle the terminal panel open or closed.
Open Command Palette. Search for anything VS Code can do.
Stop a running server or command.
Bring back the last command so you do not retype it.
Autocomplete file and folder names.
Run server in one terminal and Git/tests in another.
rm, del, sudo, force, reset --hard, or secret-looking tokens. Ask an AI agent to explain first.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 see | Likely project | Common next command |
|---|---|---|
package.json | JavaScript, React, Next.js, Vite | npm install, then npm run dev |
requirements.txt | Python | pip install -r requirements.txt |
pyproject.toml | Modern Python | Ask the project README which installer to use. |
firebase.json | Firebase site or app | firebase serve or deploy command from README. |
index.html only | Static HTML | Open file in browser or use Live Server. |
Most common web app commands
npm install
npm run dev
npm run build
npm test
npm run lintAsk AI before installing
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:3000orhttp://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 + Cwhen you want to stop the server.
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
git status
git diff
git branch --show-current
git add README.md public/index.html
git commit -m "Describe what changed"
git pushGitHub CLI power commands
gh auth status
gh repo view --web
gh pr status
gh pr create --draft --fill
gh pr view --webPrompt: safe commit review
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.git add . on beginner projects until you know exactly what is being staged.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 type | Local run | Validation |
|---|---|---|
| React/Vite | npm run dev | npm run build |
| Next.js | npm run dev | npm run build |
| Static HTML | Live Server or open file | Click links, forms, search, responsive views |
| Python | python app.py or README command | pytest |
| Firebase static site | firebase serve if configured | firebase deploy --only hosting when ready |
Error-message workflow
- Copy the first error, not the whole noisy terminal if it is huge.
- Include the command you ran.
- Include the folder you were in.
- Ask the AI to identify the root cause before changing code.
- Rerun the same command after the fix.
Prompt: debug terminal error
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.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
One click to start npm run dev.
Run npm run build consistently.
Make validation repeatable.
Wrap a known safe deploy command.
Beginner tasks.json example
{
"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.
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
| Extension | Use it for | Beginner note |
|---|---|---|
| GitHub Pull Requests | Review PRs and issues inside VS Code. | Great when your project lives on GitHub. |
| GitLens | Understand who changed what and when. | Helpful, but not required on day one. |
| ESLint | Find JavaScript/TypeScript code problems. | Use when the project already has ESLint configured. |
| Prettier | Format code consistently. | Turn on format-on-save only when the project expects it. |
| Live Server | Preview simple HTML/CSS pages locally. | Excellent for static HTML projects. |
| Error Lens | Show errors inline in the editor. | Makes problems easier to notice. |
| Dev Containers | Run a project inside a repeatable container. | Advanced, useful for team consistency. |
| Docker | Work with Docker containers and images. | Install only if the project uses Docker. |
| REST Client | Test APIs from files in VS Code. | Useful for backend and automation projects. |
Install extensions from terminal
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-clientBest 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
| Use | Avoid | Reason |
|---|---|---|
my-first-app | My First App | Spaces cause quoting problems. |
client-dashboard | cliente-diseño | Accents and special characters can break tools. |
aicontodo-site | final-final-v3 | Clear names help future agents and collaborators. |
Prompt: explain a command first
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.Troubleshooting
Most terminal problems are boring: wrong folder, missing install, wrong shell, server already running, or a stale terminal session.
Common problems
| Problem | What it usually means | Try this |
|---|---|---|
command not found | The tool is not installed or terminal cannot find it. | Close terminal, open a new one, run version check, reinstall if needed. |
npm run dev fails | Dependencies may not be installed. | Run npm install, then try again. |
| Port already in use | Another server is already running. | Stop old terminal with Control + C or use the new port it suggests. |
| Git says not a repository | You are outside the project folder or Git was never initialized. | Run pwd, open correct folder, then ask before git init. |
| Permission denied | Command needs access or file is protected. | Do not add sudo blindly; ask what it will change. |
Reset your terminal calmly
- Press
Control + Cif something is running. - Click the trash icon on the terminal panel to close the session.
- Open Terminal -> New Terminal.
- Run
pwdandgit status. - Try the command again, or paste the error into your AI assistant.
Prompt: terminal doctor
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.Sources
This guide is written for non-technical AI Con Todo learners. It combines official VS Code concepts with practical project workflows.
| Topic | Source | Use in this guide |
|---|---|---|
| Integrated terminal | VS Code terminal basics | Opening terminal, profiles, tabs, split terminal, shell behavior. |
| Command Palette | VS Code user interface | Command Palette, panels, editor workflow. |
| Tasks | VS Code Tasks | Repeatable terminal commands with tasks.json. |
| Extensions | VS Code Extension Marketplace | How to find, install, manage, disable, and uninstall extensions. |
| Git | VS Code Source Control | Git workflow and Source Control panel mental model. |