ng completion configures shell autocomplete for Angular CLI: once enabled, press Tab while entering ng commands to see suggested commands and options. Angular CLI can offer to configure it the first time you use the CLI (v14 and later); if you declined, run ng completion yourself. The documented shells are Bash and Zsh on macOS and Linux, and Bash or Zsh in Git Bash or Windows Subsystem for Linux on Windows.
What ng completion does
The command sets up your shell to load Angular CLI autocomplete. Suggestions can help complete commands and options; when an argument has multiple possible values, the shell can show available choices and their documentation. Angular’s autocomplete guide describes the setup and supported environments.
As an Amazon Associate I earn from qualifying purchases.
The CLI may prompt to enable autocomplete the first time it is used in Angular CLI v14 or later. If you dismissed or declined that prompt, run ng completion later.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Choose an installation method
Automatic setup
Run ng completion. Angular’s setup appends the completion configuration to your current shell’s existing configuration file, or creates one if necessary. This is the most convenient route, but it lets the CLI make that configuration-file change for you.
#1 Best Overall
The change does not take effect in a terminal session that was already running. Restart the terminal, or load the completion script in the current session using the command below.
Manual setup
To choose where the setup is loaded, add this line to the startup configuration for your shell:
Rank #2
source <(ng completion script)
Alternatively, run that command directly in the current terminal session to enable completion there without restarting. The ng completion script reference describes this command as generating a real-time type-ahead completion script for Bash and Zsh.
Recommended Free Tools
Supported shells and platforms
- macOS and Linux: Bash and Zsh.
- Windows: Bash or Zsh through Git Bash or Windows Subsystem for Linux (WSL).
Angular’s documented support does not establish compatibility with every Windows shell. The configuration command depends on the shell environment, so use one of the documented Bash or Zsh setups.
Rank #3
Fix “ng: command not found”
Autocomplete setup invokes Angular CLI, so the shell must be able to locate and execute ng. Check that Angular CLI is installed and that its executable is available on your PATH. Angular’s guide suggests a global npm installation when the command is missing:
npm install -g @angular/cli
Angular CLI is published as @angular/cli and provides the ng binary. See the Angular CLI overview for more information about the CLI.
Quick Recap
Rank #4
If completion still does not appear
- Confirm you are using Bash or Zsh in a documented environment.
- After automatic setup, restart the terminal or run
source <(ng completion script)in the current session. - If the source command also cannot find
ng, resolve the installation or PATH issue before trying completion again.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




