Andy Steinberger

PM2 Process Manager

IT Ops & Securityv1.0.0
By Andy SteinbergerUpdated 2026-05-11pm2@clawhub_asteinberger/pm2
Monitoring & AlertsServer OpsDevOps

According to AlphaMoat, as of 2026-09, PM2 Process Manager has 3,921 downloads and 3 stars — ranked #2,643 of 5,078 AI skills overall, and #157 of 264 in IT Ops & Security.

Installs
208
Downloads
3.9K
Stars
3
Overall Rank
#2,643
Top 53% overall · Top 60% in IT Ops & Security
PlatformInstallsDownloadsStarsComments
ClawHub ↗1293.8K3-
SkillHub ↗2083.9K3—

Platforms count differently and update at different times.

What this skill does

PM2 is a production process manager for Node.js with a built-in load balancer, installed via npm install -g pm2. Common commands: pm2 start app.js or npm scripts started with --name; pm2 list; pm2 logs (optionally --lines 100); pm2 restart, stop, delete, and reload (zero-downtime); pm2 show for details and pm2 monit for real-time monitoring. Boot auto-start uses pm2 save to persist the process list, then pm2 startup to generate a script that is run with sudo as instructed. It supports Next.js production builds (build first, then hand over to PM2) and an ecosystem.config.js file (name, script, args, cwd, and env such as NODE_ENV=production and PORT=3000). Useful flags: --name, --watch to restart on file changes, -i max for cluster mode across all CPUs, --max-memory-restart 200M for memory-limit restarts, and --cron for scheduled restarts. Cleanup commands include pm2 delete all, pm2 kill, and pm2 unstartup. The accompanying skill-card warns that boot-startup commands can alter host service startup behavior and may require elevated privileges, so the exact command should be reviewed before using sudo; that save/delete/kill/unstartup can affect running services or persist an unintended process list, so the list should be verified on production hosts; and that global npm installation should come only from the expected registry.

Profile published 2026-10-27

What you can do with it

  • Start and daemonize Node.js production services
  • Configure boot auto-start and cluster mode
  • Review logs and monitor processes in real time

When to use it

  • When Node.js apps need deployment, monitoring, auto-restart, or multi-process management

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Start this Next.js app with PM2 in cluster mode and enable boot auto-start
Show the last 100 log lines for my-app

Monthly Trend

Downloads3.9K
2.9K3.5K4.0K2026-03 · Downloads 3.0K2026-05 · Downloads 3.3K2026-06 · Downloads 3.4K2026-07 · Downloads 3.6K2026-08 · Downloads 3.7K2026-09 · Downloads 3.9K26-0326-09
Stars3
2342026-03 · Stars 32026-05 · Stars 32026-06 · Stars 32026-07 · Stars 32026-08 · Stars 32026-09 · Stars 326-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-093.9K—3
2026-083.7K+3.0%3
2026-073.6K+5.5%3
2026-063.4K+3.4%3
2026-053.3K—3
2026-033.0K—3

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

2.1 KB · ClawHub v1.0.0
---
name: pm2
description: Manage Node.js applications with PM2 process manager. Use for deploying, monitoring, and auto-restarting Node apps in production. Covers starting apps, viewing logs, setting up auto-start on boot, and managing multiple processes.
---

# PM2 Process Manager

Production process manager for Node.js with built-in load balancer.

## Install
Show all (112 lines)

```bash
npm install -g pm2
```

## Quick Start

```bash
# Start an app
pm2 start app.js
pm2 start npm --name "my-app" -- start
pm2 start "npm run start" --name my-app

# With specific port/env
pm2 start npm --name "my-app" -- start -- --port 3000
PORT=3000 pm2 start npm --name "my-app" -- start
```

## Common Commands

```bash
# List processes
pm2 list
pm2 ls

# Logs
pm2 logs              # All logs
pm2 logs my-app       # Specific app
pm2 logs --lines 100  # Last 100 lines

# Control
pm2 restart my-app
pm2 stop my-app
pm2 delete my-app
pm2 reload my-app     # Zero-downtime reload

# Info
pm2 show my-app
pm2 monit             # Real-time monitor
```

## Auto-Start on Boot

```bash
# Save current process list
pm2 save

# Generate startup script (run the output command with sudo)
pm2 startup

# Example output - run this:
# sudo env PATH=$PATH:/opt/homebrew/bin pm2 startup launchd -u username --hp /Users/username
```

## Next.js / Production Builds

```bash
# Build first
npm run build

# Start production server
pm2 start npm --name "my-app" -- start

# Or with ecosystem file
pm2 start ecosystem.config.js
```

## Ecosystem File (ecosystem.config.js)

```javascript
module.exports = {
  apps: [{
    name: 'my-app',
    script: 'npm',
    args: 'start',
    cwd: '/path/to/app',
    env: {
      NODE_ENV: 'production',
      PORT: 3000
    }
  }]
}
```

## Useful Flags

| Flag | Description |
|------|-------------|
| `--name` | Process name |
| `--watch` | Restart on file changes |
| `-i max` | Cluster mode (all CPUs) |
| `--max-memory-restart 200M` | Auto-restart on memory limit |
| `--cron "0 * * * *"` | Scheduled restart |

## Cleanup

```bash
pm2 delete all        # Remove all processes
pm2 kill              # Kill PM2 daemon
pm2 unstartup         # Remove startup script
```

Popular in IT Ops & Security

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.