Ember CLI is a command-line toolkit for developing Ember applications. Ember CLI provides commands to create, build, test, and server an Ember application.

Setting up Ember CLI

We can set up Ember CLI on our machine with npm (node package manager) (node package manager). We need to install Node.js to get npm on our system.

Installing Node.js

We can download Node.js from nodejs.org and install it on our system. We can test the installation by using the node -v command inside the terminal. If Node.js has been successfully installed, the terminal will show us the installed version.

Note: We need Node.js version 10.x or later to install Ember CLI.

Installing Git

We also need Git—a version control system—to create a new application after installing Ember CLI. We can install Git using npm with the following command:

npm install --save npm-git-install

Installing Ember CLI

We can install the Ember CLI package using the following npm command:

npm install -g ember-cli

In this command, -g is a flag that instructs npm to install ember-cli globally, ensuring that it can be accessed from anywhere on the system. After completing the installation, we can run the ember version command to check the installed version of ember-cli.

ember version

Creating an application

After completing the setup, we can create a new Ember application with a single command. To do this, we just go to the folder where we want to create our application and run the command below:

$ ember new FirstApp

This command creates a new Ember application with the name FirstApp. Let’s write the ember new FirstApp command in the terminal below to create our first Ember application.

To run our application, we first need to run the following commands:

Get hands-on with 1400+ tech skills courses.