Setup Auto Completion

CLI completion

Tab-completion for PM2:

$ pm2 completion install

Or manually append completion script to your ~/.bashrc or ~/.zshrc file:

$ pm2 completion >> ~/.bashrc # or ~/.zshrc

Then source your .bashrc or .zshrc file for current session:

$ source ~/.bashrc # or ~/.zshrc

You can add pm2 completion to your current session this way:

$ . <(pm2 completion)