Quick reference for PowerShell, npm, Wrangler & Git
cd folder-name | Go into a folder |
cd .. | Go up one level |
cd ~ | Go to your home directory |
ls | List files in current folder |
pwd | Show current folder path |
mkdir folder-name | Create a new folder |
rm file.txt | Delete a file |
cls | Clear the terminal screen |
npm --version | Check npm is installed |
npm init -y | Create a new project (package.json) |
npm install package | Install a package locally |
npm install -g package | Install a package globally |
npm run dev | Start local dev server |
npm run build | Build project for production |
npx package | Run a package without installing |
npm list -g | List globally installed packages |
wrangler login | Log in to Cloudflare run first |
wrangler whoami | Check which account you're logged into |
wrangler logout | Log out of Cloudflare |
wrangler pages deploy . |
Deploy current folder to Pages |
wrangler pages deploy . --project-name=my-site |
Deploy to a named Pages project |
wrangler pages project list | List all your Pages projects |
wrangler pages deployment list | View past deployments |
git init | Initialize a new git repo |
git status | See what files have changed |
git add . | Stage all changes |
git commit -m "msg" | Save a commit with a message |
git push | Push commits to remote |
git pull | Pull latest changes from remote |
git log --oneline | View commit history (compact) |
git clone URL | Clone a repo from URL |
node --version | Check Node.js version |
node script.js | Run a JavaScript file |
code . | Open current folder in VS Code |
start . | Open current folder in Explorer |
cat file.txt | Print file contents to terminal |
echo $env:PATH | Show your PATH variable |
CTRL + C | Stop a running process |
↑ / ↓ | Cycle through command history |
cd D:\Gamegabyte\game-ui-course — then run .\deploy.bat to deploy your site to Cloudflare Pages in one click.