include _util-fns :marked Good tools make application development quicker and easier to maintain than if you did everything by hand. The [**Angular-CLI**](https://cli.angular.io/) is a **_command line interface_** tool that can create a project, add files, and perform a variety of on-going development tasks such as testing, bundling, and deployment. Our goal in this CLI QuickStart chapter is to build and run a super-simple Angular application in TypeScript, using Angular-CLI while adhering to the [Style Guide](./guide/style-guide.html) recommendations that benefit _every_ Angular project. By the end of the chapter, you'll have a basic understanding of development with the CLI and a foundation for both these documentation samples and our real world applications. You'll pursue these ends in the following high-level steps: 1. [Set up](#devenv) the development environment 2. [Create](#create-proj) a new project and skeleton application 3. [Serve](#serve) the application 4. [Edit](#first-component) the application .l-main-section h2#devenv Step 1. Set up the Development Environment :marked You need to set up our development environment before you can do anything. Install **[Node.jsĀ® and npm](https://nodejs.org/en/download/)** if they are not already on your machine. .l-sub-section :marked **Verify that you are running at least node `4.x.x` and npm `3.x.x`** by running `node -v` and `npm -v` in a terminal/console window. Older versions produce errors, but newer versions are fine. :marked Then **install the [Angular-CLI](https://github.com/angular/angular-cli)** globally. code-example(language="sh" class="code-shell"). npm install -g angular-cli .l-main-section h2#create-project Step 2. Create a new project :marked Open a terminal window. :marked Generate a new project and skeleton application by running the following commands: code-example(language="sh" class="code-shell"). ng new my-app .l-sub-section :marked Patience please. It takes time to set up a new project, most of it spent installing npm packages. .l-main-section h2#serve Step 3: Serve the application :marked Go to the project directory and launch the server. code-example(language="sh" class="code-shell"). cd my-app ng serve :marked The `ng serve` command launches the server, watches our files, and rebuilds the app as you make changes to the files. Open a browser on `http://localhost:4200/`; the app greets us with a message: figure.image-display img(src='/resources/images/devguide/cli-quickstart/app-works.png' alt="Our app works!") .l-main-section h2#first-component Step 4: Edit our first Angular component :marked The CLI created our first Angular component for us. This is the _root component_ and it is named `app-root`. You can find it in `./src/app/app.component.ts`. :marked Open the component file and change the `title` property from _app works!_ to _My First Angular App_: +makeExample('cli-quickstart/ts/src/app/app.component.ts', 'title', 'src/app/app.component.ts')(format=".") :marked The browser reloads automatically and we see the revised title. That's nice, but we can make it look better. Open `src/app/cli-quickstart.component.css` and give our component some style +makeExample('cli-quickstart/ts/src/app/app.component.css', null, 'src/app/app.component.css')(format=".") figure.image-display img(src='/resources/images/devguide/cli-quickstart/my-first-app.png' alt="Output of QuickStart app") :marked Looking good! .l-main-section :marked ## What's next? That's about all you'd expect to do in a "Hello, World" app. You're ready to take the [Tour of Heroes Tutorial](./tutorial) and build a small application that demonstrates the great things you can build with Angular. Or you can stick around a bit longer to learn about the files in your brand new project. .l-main-section :marked ## Project file review An Angular-CLI project is the foundation for both quick experiments and enterprise solutions. The first file you should check out is `README.md`. It has some basic information on how to use CLI commands. Whenever you want to know more about how Angular-CLI works make sure to visit [the Angular-CLI repository](https://github.com/angular/angular-cli) and [Wiki](https://github.com/angular/angular-cli/wiki). Some of the generated files might be unfamiliar to you. block src-files :marked ### The `src` folder Your app lives in the `src` folder. All Angular components, templates, styles, images and anything else your app needs go here. Any files outside of this folder are meant to support building your app. .filetree .file src .children .file app .children .file app.component.css .file app.component.html .file app.component.spec.ts .file app.component.ts .file app.module.ts .file assets .children .file .gitkeep .file environments .children .file environment.prod.ts .file environment.ts .file favicon.ico .file index.html .file main.ts .file polyfills.ts .file styles.css .file test.ts .file tsconfig.json style td, th {vertical-align: top} table(width="100%") col(width="20%") col(width="80%") tr th File th Purpose tr td app/app.component.{ts,html,css,spec.ts} td :marked Defines the `AppComponent` along with an HTML template, CSS stylesheet and a unit test. It is the **root** component of what will become a tree of nested components as the application evolves. tr td app/app.module.ts td :marked Defines `AppModule`, the [root module](guide/appmodule.html "AppModule: the root module") that tells Angular how to assemble the application. Right now it declares only the `AppComponent`. Soon there will be more components to declare. tr td assets/* td :marked A folder where you can put images and anything else you need to be copied wholesale when you build your application. tr td environments/* td :marked This folder contains one file for each of your destination environments, each exporting simple configuration variables to use on your application. The files will be replaced on-the-fly when you build your app. You might use a different API endpoint for development than you do for production. Or maybe different analytics tokens. Maybe even some mock services. Either way, the CLI has you covered. tr td favicon.ico td :marked Every site wants to look good on the bookmark bar. Get started with your very own Angular icon. tr td index.html td :marked The main html page that is served when someone visits your site. Most of the time you'll never need to edit it. The CLI will automatically add all `js` and `css` files when building your app so you never need to add any `