Angular CLI - ng help Command

This chapter explains the syntax and options of ng help command along with an example.


An example for ng help command is given below −

ng help [options]

ng help command lists the available commands with their short descriptions.


Options are optional parameters.

Sr.No. Option & Syntax Description
1 --help= true|false|json|JSON Shows a help message for this command in the console. Default: false

Example 1

An example for ng help command is given below −

\>Node ng help
Available Commands:
   add Adds support for an external library to your project.
   analytics Configures the gathering of Angular CLI usage metrics. See
   build (b) Compiles an Angular app into an output directory named dist/ at the
given output path. Must be executed from within a workspace directory.
   deploy Invokes the deploy builder for a specified project or for the default
project in the workspace.
   config Retrieves or sets Angular configuration values in the angular.json
   for the workspace.
      doc (d) Opens the official Angular documentation ( in a browser,
d searches for a given keyword.
   e2e (e) Builds and serves an Angular app, then runs end-to-end tests using
   generate (g) Generates and/or modifies files based on a schematic.
   help Lists available commands and their short descriptions.
   lint (l) Runs linting tools on Angular app code in a given project folder.
   new (n) Creates a new workspace and an initial Angular app.
   run Runs an Architect target with an optional custom builder configuration
defined in your project.
   serve (s) Builds and serves your app, rebuilding on file changes.
   test (t) Runs unit tests in a project.
   update Updates your application and its dependencies. See
   version (v) Outputs Angular CLI version.
   xi18n (i18n-extract) Extracts i18n messages from source code.
For more detailed help run "ng [command name] --help"

In case of individual commands, use the --help or -h option with the command. First move to an angular project created using ng new command and then run the command. The chapter which explains the ng new command is available at

Example 2

An example is given below −

\>Node\>TutorialsPoint> ng serve --help
Builds and serves your app, rebuilding on file changes.
usage: ng serve <project> [options]
      The name of the project to build. Can be an application or a library.
      Whitelist of hosts that are allowed to access the dev server.
      Build using Ahead of Time compilation.
      Base url for the application being built.
      Target to serve.
      **EXPERIMENTAL** Output file path for Build Event Protocol events
      Use a separate bundle containing code used across multiple bundles.
   --configuration (-c)
      A named build target, as specified in the "configurations" section of angular.json.
   Each named target is accompanied by a configuration of option defaults for t hat target.
   Setting this explicitly overrides the "--prod" flag
      URL where files will be deployed.
      Don't verify connected clients are part of allowed hosts.
      Output in-file eval sourcemaps.
      Shows a help message for this command in the console.
      Enable hot module replacement.
      Show a warning when the --hmr option is enabled.
      Host to listen on.
      Whether to reload the page on change, using live-reload.
   --open (-o)
      Opens the url in default browser.
      Enables optimization of the build output.
      Enable and define the file watching poll time period in milliseconds.
      Port to listen on.
      Shorthand for "--configuration=production".
      When true, sets the build configuration to the production target.
      By default, the production target is set up in the workspace
configuration such that all builds make use of bundling, limited tree-shaking, and also
   dead code elimination.
      Log progress to the console while building.
      Proxy configuration file.
      The URL that the browser client (or live-reload client, if enabled)
should u
see to connect to the development server. Use for a complex dev server setup,
such as one with reverse proxies.
      The pathname where the app will be served.
      Show a warning when deploy-url/base-href use unsupported serve path
      Output sourcemaps.
      Serve using HTTPS.
      SSL certificate to use for serving HTTPS.
      SSL key to use for serving HTTPS.
      Use a separate bundle containing only vendor libraries.
      Resolve vendor packages sourcemaps.
      Adds more details to output logging.
      Rebuild on change.
Kickstart Your Career

Get certified by completing the course

Get Started