
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
Your PM2 Autopilot - Interactive CLI for PM2 process management with AI assistance
Your PM2 Autopilot - Modern interactive CLI for PM2 process management with AI assistance, built with TypeScript, ESM, and pnpm.

🎬 See PM2 Pilot in Action: Watch how PM2 Pilot intelligently analyzes process errors, provides AI-powered diagnosis, and suggests actionable solutions—all through natural language interaction!
npm install -g pm2)Install PM2 Pilot globally to use it anywhere:
npm install -g pm2-pilot
After installation, start the interactive CLI:
pm2pilot
Once you start the CLI with pnpm start, you'll enter an interactive shell where you can use these commands:
/status or /ps - Show PM2 process status/list or /ls - List all PM2 processes/restart <name> - Restart a specific process/stop <name> - Stop a specific process/start <name> - Start a specific process/all <operation> - Batch operations on all processes/health or /check - Run comprehensive health checks/watch <name> [mem] [cpu] - Auto-recovery monitoring with thresholds/watch stop - Stop watching processes/metrics or /m - System metrics and health score/history - Performance history and trends/history collect - Start collecting metrics/history clear - Clear history data/logs <name> - Stream real-time logs with automatic error detection/logs smart <name> - AI-powered log analysis with error diagnosis/grep <pattern> [name] - Search across all logs/errors or /err - Show recent errors only/save [filename] - Save PM2 ecosystem configuration/load [filename] - Load saved configuration/ai <question> - Ask AI assistant about processes/ai config - Show AI configuration status/ai provider <openai|gemini> - Switch AI provider/ai providers - List available AI providers/ai presets - Show speed/quality presets for current provider/ai preset <name> - Apply speed preset (lightning, fast, smart, reasoning)/diagnose [process] - AI-powered issue diagnosis/doctor logs [process] - Comprehensive log analysis and error diagnosis/doctor errors [process] - Focused error analysis with critical issue detection/optimize [process] - Get AI optimization suggestions/help or /h - Show available commands/clear or /cls - Clear the terminal screen/history - View and search command history/exit, /quit, or /q - Exit the CLI# Start the interactive CLI
pm2pilot
# Basic monitoring:
> /status
> /metrics
> /health
# Intelligent log analysis:
> /logs smart my-app # AI-powered error analysis
> /doctor logs # Comprehensive diagnosis
> /doctor errors my-app # Critical error focus
# Advanced features:
> /watch my-app 500 80 # Auto-restart if >500MB or >80% CPU
> /grep "error" my-app # Search logs for errors
> /all restart # Restart all processes
# AI-powered insights (requires OpenAI or Gemini API key):
> my app is slow, can you help? # Natural language
> /ai why is my-app slow? # Direct AI query
> /diagnose my-app # Process diagnosis
> /optimize # Optimization suggestions
# Configuration:
> /save production-config
> /load production-config
> /exit
The AI features support both OpenAI and Google Gemini. Choose your preferred provider:
# Option 1: Environment variable
export OPENAI_API_KEY=your-openai-api-key
# Option 2: Configure via CLI
> /ai provider openai
> /ai config
# Option 1: Environment variable
export GEMINI_API_KEY=your-gemini-api-key
# Option 2: Configure via CLI
> /ai provider gemini
> /ai config
# List available providers
> /ai providers
# Switch between providers
> /ai provider gemini
> /ai provider openai
# Check current configuration
> /ai config
# Speed presets for optimal performance
> /ai presets # Show available speed presets
> /ai preset lightning # GPT-5 nano - Ultra fast responses
> /ai preset fast # GPT-4o - Balanced speed and quality (recommended)
> /ai preset smart # GPT-5 - Highest intelligence for complex analysis
> /ai preset reasoning # GPT-5 mini - Deep thinking for complex problems
PM2 Pilot uses a unified configuration file in your home directory with safe concurrent access:
~/.pm2pilot-config.jsonThis single file manages all PM2 Pilot settings with enterprise-grade reliability and concurrent access protection.
# View current configuration
> /ai config
# The config file structure:
{
"provider": "openai",
"userPreferences": {
"autoExecute": false,
"verbosity": "detailed",
"confirmationLevel": "destructive"
},
"openai": {
"apiKey": "sk-...",
"model": "gpt-4o",
"activePreset": "fast"
},
"gemini": {
"apiKey": "AI...",
"model": "gemini-2.5-flash"
}
}
PM2 Pilot is evolving toward an AI-native experience where natural language becomes the primary interface:
> my app is slow
❌ Commands must start with /. Type /help for available commands.
> /ai my app is slow
🤖 AI Assistant is thinking...
[AI response without actions]
> my app is slow
🤖 Analyzing your processes...
I can see that "my-app" is using 85% CPU and 420MB memory. This could be causing slowness.
Let me check the logs for errors:
[Automatically shows recent errors]
Suggestions:
• Restart the process: restart my-app
• Check memory usage: /metrics my-app
• Would you like me to restart it now?
> yes restart it
🔄 Restarting my-app...
✅ my-app restarted successfully
📊 New metrics: CPU 12%, Memory 89MB - much better!
# Process troubleshooting
> why did my-app crash?
🤖 Analyzing crash logs... Found memory limit exceeded at 2:34 AM
🔧 Suggesting: increase max_memory_restart to 800MB
# Batch operations
> restart all errored processes
🤖 Found 3 errored processes: api-server, worker-1, notifications
🔄 Restarting all... Done! All processes now online.
# Performance optimization
> optimize my cluster setup
🤖 Analysis: Your 4 instances are underutilized (avg 15% CPU)
💡 Recommendation: Reduce to 2 instances to save 180MB memory
🚀 Would you like me to scale down automatically?
# Learning and discovery
> how do I monitor memory usage over time?
🤖 I can help! Use `/history collect` to start tracking, then `/history` to view trends.
📊 Starting collection now... You'll have data in 30 seconds.
pm2 typingContributions are welcome! Please see the Contributing Guide for details on:
For technical details, see:
MIT License - see LICENSE file for details.
FAQs
Your PM2 Autopilot - Interactive CLI for PM2 process management with AI assistance
We found that pm2-pilot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.