cli-anything-pm2
A stateless command-line interface for PM2 process management. Communicates via the PM2 CLI subprocess. No local state or session.
Installation
Prerequisites:
- Python 3.10+
- PM2 installed globally (
npm install -g pm2)
Usage
Basic Commands
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
Command Groups
process
Process inspection commands.
lifecycle
Process lifecycle commands.
logs
Log management commands.
system
System-level commands.
Output Formats
All commands support dual output modes:
- Human-readable (default): Tables, colors, formatted text
- Machine-readable (
--jsonflag): Structured JSON for agent consumption
For AI Agents
When using this CLI programmatically:
- Always use
--jsonflag for parseable output - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
Version
1.0.0


