pm2

pm2 is a command for Claude Code from fmflurry/harness-manifesto. It costs 0 tokens per session (1,897 once invoked), scanned A, a copy of pm2, MIT.

A command that examines a project and generates PM2 configuration and helper commands for its services. PM2 is a process manager that keeps application processes running and provides commands to start, stop, restart, and monitor them.

In plain words
What is it for?
Use it to prepare PM2 commands for applications such as Vite, Next.js, Express, FastAPI, Flask, or Go services. It can generate commands for starting all services or managing individual services and their logs.
Why use it?
It removes the need to identify services and write separate PM2 setup files by hand. It can account for common frontend, backend, and database-related project layouts.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it to prepare PM2 commands for applications such as Vite, Next.js, Express, FastAPI, Flask, or Go services. It can generate commands for starting all services or managing individual services and their logs.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/fmflurry/harness-manifesto/pm2
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/fmflurry/harness-manifesto

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pm2

README.md
[![agentmods](https://agentmods.dev/badge/commands/fmflurry/harness-manifesto/pm2/github.svg)](https://agentmods.dev/commands/fmflurry/harness-manifesto/pm2)
Your own site
<a href="https://agentmods.dev/commands/fmflurry/harness-manifesto/pm2"><img src="https://agentmods.dev/badge/commands/fmflurry/harness-manifesto/pm2/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pm2

Your own site · 80×15
<a href="https://agentmods.dev/commands/fmflurry/harness-manifesto/pm2"><img src="https://agentmods.dev/badge/commands/fmflurry/harness-manifesto/pm2.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,897 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01897
Opus 5.5 $0.00000 $0.00759
Sonnet 5.5 $0.00000 $0.00379
Haiku 4.5 $0.00000 $0.00190

Measured 15d ago against content hash 638ff26f4ede, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pm2 scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const { spawn } = require('child_process');
Origin

This is a copy

97% identical to pm2 — 11 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/pm2.md · 273 lines

How it starts

The opening of the file, as written. The whole thing — 273 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PM2 Init

Auto-analyze project and generate PM2 service commands.

Command: $ARGUMENTS


Workflow

  1. Check PM2 (install via npm install -g pm2 if missing)
  2. Scan project to identify services (frontend/backend/database)
  3. Generate config files and individual command files

Service Detection

Type Detection Default Port
Vite vite.config.* 5173
Next.js next.config.* 3000
Nuxt nuxt.config.* 3000
CRA react-scripts in package.json 3000
Express/Node server/backend/api directory + package.json 3000
FastAPI/Flask requirements.txt / pyproject.toml 8000
Go go.mod / main.go 8080

Port Detection Priority: User specified > .env > config file > scripts args > default port


Generated Files

project/
├── ecosystem.config.cjs              # PM2 config
├── {backend}/start.cjs               # Python wrapper (if applicable)
└── .claude/
    ├── commands/
    │   ├── pm2-all.md                # Start all + monit
    │   ├── pm2-all-stop.md           # Stop all
    │   ├── pm2-all-restart.md        # Restart all
    │   ├── pm2-{port}.md             # Start single + logs
    │   ├── pm2-{port}-stop.md        # Stop single
    │   ├── pm2-{port}-restart.md     # Restart single
    │   ├── pm2-logs.md               # View all logs
    │   └── pm2-status.md             # View status
    └── scripts/
        ├── pm2-logs-{port}.ps1       # Single service logs
        └── pm2-monit.ps1             # PM2 monitor

Windows Configuration (IMPORTANT)

ecosystem.config.cjs

Must use .cjs extension

module.exports = {
  apps: [
    // Node.js (Vite/Next/Nuxt)
    {
      name: 'project-3000',
      cwd: './packages/web',
      script: 'node_modules/vite/bin/vite.js',
      args: '--port 3000',
      interpreter: 'C:/Program Files/nodejs/node.exe',
      env: { NODE_ENV: 'development' }
    },
    // Python
    {
      name: 'project-8000',
      cwd: './backend',
      script: 'start.cjs',
      interpreter: 'C:/Program Files/nodejs/node.exe',
      env: { PYTHONUNBUFFERED: '1' }
    }
  ]
}

Read the full file on GitHub · 273 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago First seen · 273 lines · 0 tokens per session scan A 638ff26f4ede

Subscribe to this mod's changes

pm2 is a command published in the GitHub repository fmflurry/harness-manifesto (173 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,897 tokens. A static security scan graded it A with 1 finding (runs shell commands). It is 97% identical to pm2, differing in 11 lines, and is treated as a copy.

Related

pm2 compared with commands from other repositories

pm2 next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pm2fmflurry/harness-manifestoCommand17311d agoMITA0Claude Code
checklistgithub/spec-kitCommand153k3d agoMITA13Claude Code
clarifygithub/spec-kitCommand153k3d agoMITA27Claude Code
analyzegithub/spec-kitCommand153k3d agoMITA26Claude Code
specifygithub/spec-kitCommand153k3d agoMITA13Claude Code
convergegithub/spec-kitCommand153k3d agoMITA35Claude Code
implementgithub/spec-kitCommand153k3d agoMITA14Claude Code