Angular › Angular CLI & Project Structure

What is the Angular CLI and how do you create a new project with it?

Beginner

Answer

The Angular CLI is a command line tool that helps you create, build, test, and manage an Angular project without setting up complicated build tools yourself. Running a single command generates a fully working starter project with a sensible folder structure already in place.
npm install -g @angular/cli
ng new my-app
cd my-app
ng serve
Real-world example A developer starting a brand new project runs ng new and has a fully working Angular app, complete with routing and testing set up, running in the browser within a couple of minutes.

Common follow-ups: What questions does the CLI ask you when creating a new project, and what do they control?;How do you update the Angular CLI itself to the latest version?