cli-anything-pm2
Original:🇺🇸 English
Translated
Command-line interface for PM2 - A stateless CLI for Node.js process management via the PM2 CLI. List, start, stop, restart processes, view logs, and manage system configuration.
5installs
Sourcehkuds/cli-anything
Added on
NPX Install
npx skill4agent add hkuds/cli-anything cli-anything-pm2Tags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →cli-anything-pm2
A stateless command-line interface for PM2 process management.
Communicates via the PM2 CLI subprocess. No local state or session.
Installation
bash
pip install -e .Prerequisites:
- Python 3.10+
- PM2 installed globally ()
npm install -g pm2
Usage
Basic Commands
bash
# Show help
cli-anything-pm2 --help
# Start interactive REPL mode
cli-anything-pm2
# Run with JSON output (for agent consumption)
cli-anything-pm2 --json process list
cli-anything-pm2 --json system versionREPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
bash
cli-anything-pm2
# Enter commands interactively with tab-completion and historyCommand Groups
process
Process inspection commands.
| Command | Description |
|---|---|
| List all PM2 processes |
| Get detailed info for a process |
| Get metrics for all processes |
lifecycle
Process lifecycle commands.
| Command | Description |
|---|---|
| Start a new process |
| Stop a process |
| Restart a process |
| Delete a process |
logs
Log management commands.
| Command | Description |
|---|---|
| View recent logs |
| Flush logs |
system
System-level commands.
| Command | Description |
|---|---|
| Save current process list |
| Generate startup script |
| Get PM2 version |
Output Formats
All commands support dual output modes:
- Human-readable (default): Tables, colors, formatted text
- Machine-readable (flag): Structured JSON for agent consumption
--json
bash
# Human output
cli-anything-pm2 process list
# JSON output for agents
cli-anything-pm2 --json process listFor AI Agents
When using this CLI programmatically:
- Always use flag for parseable output
--json - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
Version
1.0.0