npx and semantic versioning ranges
Use npx to run tools without installing globally, and understand semver ranges (^, ~, exact) at a beginner level.
npx + semver at a glance
Goal: Run tools quickly and read version ranges.
- npx: execute a package binary without global install
- ^ caret: minor + patch updates
- ~ tilde: patch updates
- Exact: no automatic updates

npx basics
npx runs a package binary temporarily. Great for one-off commands or project scaffolds.
// Emulate what npx does: run a package's CLI on-demand
function demoNpx(cmd) {
console.log("npx", cmd);
console.log("→ downloads tool if needed");
console.log("→ runs its binary once");
console.log("→ no global install required");
}
demoNpx("eslint --version");
demoNpx("create-vite@latest my-app");

All lessons in this course
- package.json, scripts, and deps vs devDeps
- npx and semantic versioning ranges
- Local vs global tools, bins, and team-friendly workflows