1--- 2title: npm-completion 3section: 1 4description: Tab Completion for npm 5--- 6 7### Synopsis 8 9```bash 10npm completion 11``` 12 13Note: This command is unaware of workspaces. 14 15### Description 16 17Enables tab-completion in all npm commands. 18 19The synopsis above 20loads the completions into your current shell. Adding it to 21your ~/.bashrc or ~/.zshrc will make the completions available 22everywhere: 23 24```bash 25npm completion >> ~/.bashrc 26npm completion >> ~/.zshrc 27``` 28 29You may of course also pipe the output of `npm completion` to a file 30such as `/usr/local/etc/bash_completion.d/npm` or 31`/etc/bash_completion.d/npm` if you have a system that will read 32that file for you. 33 34When `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the 35environment, `npm completion` acts in "plumbing mode", and outputs 36completions based on the arguments. 37 38### See Also 39 40* [npm developers](/using-npm/developers) 41* [npm](/commands/npm) 42