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
ng new
Create a new workspace and an initial Angular application.
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.
The prefix for generated component selectors.
The directory to create the workspace in.
Do not create spec.ts test files.
Skip installing packages.
Do not initialize a Git repository.
$ ng newAdd 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
| Command | Short form | What it does |
|---|---|---|
| ng new | — | Create a new workspace and an initial Angular application. |
| ng generate component | ng g c | Create a component with its template, styles and test files. |
| ng generate service | ng g s | Create a service class. |
| ng generate directive | ng g d | Create a directive. |
| ng generate pipe | ng g p | Create a pipe. |
| ng generate guard | — | Create a route guard. |
| ng generate interceptor | — | Create an HTTP interceptor. |
| ng generate resolver | ng g r | Create a route resolver. |
| ng generate library | ng g lib | Create a library project inside the workspace. |
| ng serve | ng s | Build and serve the app with a dev server, rebuilding on changes. |
| ng build | ng b | Compile the app into an output folder (application builder). |
| ng test | ng t | Run 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
- Choose a command, for example New workspace, Component or Build.
- Enter the name or package the command needs, or start from a preset.
- Set options. Booleans have Default, On and Off; open More options for the rest.
- 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.
- Angular CLI reference (angular.dev)
- ng new
- ng generate component
- ng generate service
- ng generate directive
- ng generate pipe
- ng generate guard
- ng generate interceptor
- ng generate resolver
- ng generate library
- ng serve
- ng build
- ng test
- ng add
- ng update
Upgrading? Use the Angular Upgrade Planner for the ng update steps between any two versions, or browse all Angular tools.