Skip to content
ToolShedby Wasim Shaikh

Angular CLI Command Builder

Build ng new, ng generate, ng serve, ng build, ng test, ng add and ng update commands visually — pick options, copy the exact command. Based on the official Angular CLI reference.

Choose a command

Create
Generate
Run
Packages

ng new

Create a new workspace and an initial Angular application.

Official docs
Presets:

The stylesheet format for components. Prompts if not set.

Enable routing in the initial application.

Configure the application for server-side rendering and static site generation. Prompts if not set.

Create an application that does not use zone.js.

Generate AI assistant configuration files for these tools.

The unit test runner to use.

The package manager used to install dependencies.

-p

The prefix for generated component selectors.

The directory to create the workspace in.

-S

Do not create spec.ts test files.

Skip installing packages.

-g

Do not initialize a Git repository.

Your command
$ ng new

Add a workspace name. Without it the CLI will prompt for one.

What this command does

Create a new workspace and an initial Angular application.

No options set, so the CLI defaults apply. Only options that differ from the default are added.

Source: angular.dev/cli/new

Build Angular CLI Commands Without Memorizing Flags

The Angular CLI has dozens of options per command, and the defaults keep changing: standalone components became the default in v19, zoneless apps and Vitest in v21, and OnPush change detection in v22. Pick a command, set the options you need, and the builder writes the shortest correct command, adding only the flags that differ from the current defaults.

Supported Commands

CommandShort formWhat it does
ng new—Create a new workspace and an initial Angular application.
ng generate componentng g cCreate a component with its template, styles and test files.
ng generate serviceng g sCreate a service class.
ng generate directiveng g dCreate a directive.
ng generate pipeng g pCreate a pipe.
ng generate guard—Create a route guard.
ng generate interceptor—Create an HTTP interceptor.
ng generate resolverng g rCreate a route resolver.
ng generate libraryng g libCreate a library project inside the workspace.
ng serveng sBuild and serve the app with a dev server, rebuilding on changes.
ng buildng bCompile the app into an output folder (application builder).
ng testng tRun unit tests (Vitest by default, or Karma).
ng add—Install a library and run its ng-add setup schematic.
ng update—Update packages and run their migrations.

How to Use the Builder

  1. Choose a command, for example New workspace, Component or Build.
  2. Enter the name or package the command needs, or start from a preset.
  3. Set options. Booleans have Default, On and Off; open More options for the rest.
  4. Copy the command and run it in your workspace. Turn on Short aliases for the compact form.

Frequently Asked Questions

Which Angular CLI version is this based on?
The options come from the official Angular CLI reference on angular.dev for Angular 22. Most options also work in recent earlier versions; newer ones, such as --ai-config, --zoneless or --test-runner, need a recent CLI. Run ng version to check yours.
Why are some options missing from my command?
The builder only adds an option when you set it to something other than the CLI default, which keeps commands short. For example, ng generate component already uses OnPush change detection in Angular 22, so choosing OnPush adds nothing.
How do I turn off an option that is on by default?
Choose Off. The builder writes it as --option=false, for example --standalone=false, which the Angular CLI accepts for every boolean option.
What do the short aliases do?
The Short aliases switch uses the CLI short forms, such as ng g c instead of ng generate component, and single-letter flags such as -s for --inline-style. Both forms run the same command.
Does this tool run anything on my machine?
No. It only builds the command text in your browser. Copy it and run it in a terminal inside your Angular workspace.

Sources & Official Resources

Commands, options, defaults and aliases are taken from the official Angular CLI reference. Last reviewed against Angular 22.

Upgrading? Use the Angular Upgrade Planner for the ng update steps between any two versions, or browse all Angular tools.