PM2 CLI
PM2 is a process manager that saves background app lists for restart after reboot and displays their status in the terminal.
- 43,326 ★ on the repository
- Last commit
Extended access
Why this level
- The manager starts and stops applications, configures startup and reads logs under its account.
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/pm2Detects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The manager starts and stops applications, configures startup and reads logs under its account.
This is third-party code. Review the repository files before installing.
What it does
PM2 manages application processes from the command line. It runs programs in the background, reports status and collects their output in logs. Operators can stop, restart or inspect resource use for a selected process. Node.js cluster mode provides multiple instances and request balancing. Saved process lists support recovery after reboot. An agent can invoke these commands through ordinary terminal access.
Who it is for. Node.js service operators maintaining background applications on their own servers.
Good fit when
- You close the terminal while an application continues under process supervision.
- An operator inspects several services’ status and logs in one place.
- You run a Node.js API in several processes on one machine.
- After a server reboot, the manager restores a saved application list.
Not a fit when
- Another process manager already controls the applications, and replacing it has not been approved.
- You need cross-machine container orchestration.
- You expect every application reload to preserve requests regardless of application design.
Example request
Show my test API’s PM2 status and recent logs. Ask before restarting it.Limitations
Current PM2 supports Node.js 18 or newer and Bun 1 or newer; check the runtime under the account that will start the applications. Cluster balancing is documented for Node.js and should not be assumed for arbitrary binaries. Reboot recovery requires startup configuration and saving the process list. Logs accumulate separately, with rotation provided by pm2-logrotate, so check disk space and retention before leaving a service unattended.
How to disable. Stop the selected apps, verify ownership and use `pm2 unstartup` to remove unwanted startup integration. Then uninstall the package.
FAQ
How do I list applications?
Run `pm2 list`, then use `pm2 describe` with the selected name or ID for details.
Where are logs?
Use `pm2 logs` and specify an app name to avoid mixing service output.
Is terminal monitoring available?
Yes. `pm2 monit` shows processes and metrics; relate load to the relevant app.
Is startup setup enough to restore apps?
No. Run `pm2 save` afterward to retain the chosen process list.
Can PM2 run in a container?
Yes. Use the documented `pm2-runtime` integration and verify startup and shutdown behavior.
Discussion
No questions or reviews yet.
Related
CLI toolsSearchable processes and configurable columns help locate CPU load, listening ports and child commands from a terminal.
bottom displays processes, CPU load, memory, network and disks in the terminal with graphs, search and configurable widgets.
Nx CLI adopts npm, pnpm or yarn scripts, so teams introduce shared monorepo checks gradually while retaining their commands.
The CLI takes an npm package through checks, versioning and publication for a user-reviewed release prepared with an agent.
Nehemiah gives agents Firecracker Linux microVMs over MCP: launch, run commands, preview URLs, fork and templates.
The nodepilot-mcp server drives NodePilot workflows on Windows: 116 tools, with destructive operations disabled by default.
README in short
Logs are available as plain text and JSON. The separate [PM2+ cloud dashboard](https://app.pm2.io/) monitors applications across multiple servers.