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 sys
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-cli-anything-pm2-934366c94ec6 ,按照其中的说明把「cli-anything-pm2」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
A stateless command-line interface for PM2 process management. Communicates via the PM2 CLI subprocess. No local state or session.
pip install -e .
Prerequisites:
npm install -g pm2)# 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 version
When invoked without a subcommand, the CLI enters an interactive REPL session:
cli-anything-pm2
# Enter commands interactively with tab-completion and history
Process inspection commands.
| Command | Description |
|---|---|
list | List all PM2 processes |
describe <name> | Get detailed info for a process |
metrics | Get metrics for all processes |
Process lifecycle commands.
| Command | Description |
|---|---|
start <script> --name <name> | Start a new process |
stop <name> | Stop a process |
restart <name> | Restart a process |
delete <name> | Delete a process |
Log management commands.
| Command | Description |
|---|---|
view <name> --lines 50 | View recent logs |
flush [name] | Flush logs |
System-level commands.
| Command | Description |
|---|---|
save | Save current process list |
startup | Generate startup script |
version | Get PM2 version |
All commands support dual output modes:
--json flag): Structured JSON for agent consumption# Human output
cli-anything-pm2 process list
# JSON output for agents
cli-anything-pm2 --json process list
When using this CLI programmatically:
--json flag for parseable output1.0.0