Github url


by angular

angular /angular-cli

CLI tool for Angular

23.5K Stars 9.3K Forks Last release: 6 days ago (v9.1.10) MIT License 6.1K Commits 431 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Angular CLI

Development tools and libraries specialized for Angular

This is the home of the DevKit and the Angular CLI code. You can find the Angular CLI specific READMEhere.

CircleCI branch Dependency Status devDependency Status


GitHub forks GitHub stars

Quick Links

Gitter | Contributing | Angular CLI | |---|---|---|

The Goal of Angular CLI

The Angular CLI creates, manages, builds and test your Angular projects. It's built on top of the Angular DevKit.

The Goal of DevKit

DevKit's goal is to provide a large set of libraries that can be used to manage, develop, deploy and analyze your code.

Getting Started - Local Development


To get started locally, follow these instructions:

  1. If you haven't done it already, make a fork of this repo.
  2. Clone to your local computer using
  3. Make sure that you have Node 10.13 or later installed. See instructions here.
  4. Make sure that you have
    installed; see instructions here.
  5. Run
    (no arguments) from the root of your clone of this project to install dependencies.

Building and Installing the CLI

To make a local build:

yarn build --local

This generates a number of tarballs in the


directory. To actually use the locally built tools, switch to another repository reproducing the specific issue you want to fix (or just generate a local repo with

ng new

). Then install the locally built packages:

cd "${EXAMPLE\_ANGULAR\_PROJECT\_REPO}" npm install -D ${CLI\_REPO}/dist/\*.tgz

Builds of this example project will use tooling created from the previous local build and include any local changes. When using the CLI, it will automatically check for a local install and use that if present. This means you can just run:

npm install -g @angular/cli

to get a global install of the latest CLI release. Then running any


command in the example project will automatically find and use the local build of the CLI.

Note: If you are testing

ng update

, be aware that installing all the tarballs will also update the framework (


) to the latest version. In this case, simply install the CLI alone with

npm install -D ${CLI\_REPO}/dist/\_angular\_cli.tgz

, that way the rest of the project remains to be upgraded with

ng update



To debug an invocation of the CLI, build and install the CLI for an example project, then run the desired


command as:

node --inspect-brk node\_modules/.bin/ng ...

This will trigger a breakpoint as the CLI starts up. You can connect to this using the supported mechanisms for your IDE, but the simplest option is to open Chrome to chrome://inspect and then click on the


link for the


Node target.

Unfortunately, the CLI dynamically


's other files mid-execution, so the debugger is not aware of all the source code files before hand. As a result, it is tough to put breakpoints on files before the CLI loads them. The easiest workaround is to use the


statement to stop execution in the file you are interested in, and then you should be able to step around and set breakpoints as expected.


There are three different test suites which can be run locally:

  • Unit tests
    • Run:
      yarn test --full
    • Debug:
      yarn debug:test --full
  • Large tests
    • Run:
      yarn test-large --full
    • Debug:
      yarn debug:test-large --full
  • End to end tests
    • Run:
      node tests/legacy-cli/run\_e2e.js
    • Run subset of tests:
      node tests/legacy-cli/run\_e2e.js tests/legacy-cli/e2e/tests/i18n/ivy-localize-\*

When running the debug commands, Node will stop and wait for a debugger to attach. You can attach your IDE to the debugger to stop on breakpoints and step through the code. Also see IDE Specific Usage for a simpler debug story.

When debugging a specific test, change








to focus execution to just that one test. This will keep the output clean and speed up execution by not running irrelevant tests.

IDE Specific Usage

Some additional tips for developing in specific IDEs.

Intellij IDEA / WebStorm

To load the project in Intellij products, simply


the repository folder. Do not

Import Project

, because that will overwrite the existing configuration.

Once opened, the editor should automatically detect run configurations in the workspace. Use the drop down to choose which one to run and then click the


button to start it. When executing a debug target, make sure to click the


icon to automatically attach the debugger (if you click


, Node will wait forever for a debugger to attach).

Intellij IDEA run configurations

Creating New Packages

Adding a package to this repository means running two separate commands:

  1. schematics devkit:package PACKAGE\_NAME
    . This will update the
    file, and create the base files for the new package (package.json, src/index, etc).
  2. devkit-admin templates
    . This will update the README and all other template files that might have changed when adding a new package.

For private packages, you will need to add a

"private": true

key to your package.json manually. This will require re-running the template admin script.


This is a monorepo which contains many tools and packages:


| Project | Package | Version | Links | |---|---|---|---|Angular CLI | [


]( | latest | README snapshotArchitect CLI | [


]( | latest | snapshotSchematics CLI | [


]( | latest | snapshot


| Project | Package | Version | Links | |---|---|---|---|Architect | [


]( | latest | README snapshotBuild Angular | [


]( | latest | README snapshotBuild NgPackagr | [


]( | latest | README snapshotBuild Optimizer | [


]( | latest | README snapshotBuild Webpack | [


]( | latest | README snapshotCore | [


]( | latest | README snapshotSchematics | [


]( | latest | README snapshot


| Project | Package | Version | Links | |---|---|---|---|Angular PWA Schematics | [


]( | latest | snapshotAngular Schematics | [


]( | latest | snapshotSchematics Schematics | [


]( | latest | snapshotPackage Update Schematics | [


]( | latest | snapshot


| Project | Package | Version | Links | |---|---|---|---|Webpack Angular Plugin | [


]( | latest | snapshot

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.