pm2

Generate a PM2 ecosystem.config.cjs by auto-analyzing project runtimes.

24|5|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/Luohaothu/everything-codex --skill pm2-luohaothu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pm2
Source: https://github.com/Luohaothu/everything-codex/tree/main/skills/pm2
Command: npx skills add https://github.com/Luohaothu/everything-codex --skill pm2-luohaothu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the generation of a PM2 ecosystem.config.cjs to coordinate multiple development services (frontend, backend, database).

Core Features & Use Cases

  • Auto-detects common frontend, backend, and database runtimes (Vite, Next.js, Nuxt, Express/Node, FastAPI/Flask, Go) and outputs a centralized ecosystem.config.cjs.
  • Provides a single, auditable startup workflow to manage all services with PM2 (start, stop, status, logs).
  • Supports consistent environment handling and port mapping for local development across services.

Quick Start

Run /pm2 init to scan your project and generate the PM2 ecosystem.config.cjs file.

Frequently Asked Questions about pm2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a PM2 ecosystem config for a multi-service project?

Generate a PM2 ecosystem.config.cjs by running an init command that auto-scans your project to detect frontend, backend, and database runtimes. It outputs a centralized configuration file to coordinate all development services.

What frameworks does PM2 config generation support for local development?

PM2 config generation supports Vite, Next.js, Nuxt, Express/Node, FastAPI/Flask, and Go. It identifies these runtimes by detecting files like vite.config.*, next.config.*, package.json, requirements.txt, and go.mod.

Do I need to manually set ports and environments in my PM2 config file?

No, you do not need to manually set ports and environments. The config generation automatically handles environment configuration and port detection to ensure consistent local development across all detected services.

Why does my PM2 config use the .cjs extension?

PM2 config generation uses the .cjs extension to follow modern Node.js module conventions. Ensuring your ecosystem file is named ecosystem.config.cjs aligns with the required detection rules and prevents module compatibility issues.

Can I manage multiple development services like frontend and backend with a single PM2 workflow?

Yes, you can manage multiple development services with a single PM2 workflow. The generated ecosystem.config.cjs provides an auditable startup workflow to start, stop, check status, and view logs for all coordinated services.