cli-anything-pm2
What it does
This skill lets an AI agent manage the programs run by PM2, a tool that keeps Node.js apps running. It is for people who run websites or services on a server and want quick status checks.
When to use it
- ✓When you want to see which PM2-managed apps are running and how they are doing.
- ✓When an app has stopped and you need to restart it.
- ✓When you want to read the recent logs of an app to find an error.
Skill link
https://github.com/HKUDS/CLI-Anything/blob/main/pm2/agent-harness/cli_anything/pm2/skills/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“I want to check whether my website process is running in PM2 and see the last 50 log lines.”
5 new skills a week. 1 minute to read.
How it works
The agent sends commands to the PM2 program on your machine and reads back the results. It does not keep its own memory between runs.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
cli-anything-pm2
A stateless command-line interface for PM2 process management. Communicates via the PM2 CLI subprocess. No local state or session.
Installation
pip install -e .
Prerequisites:
- Python 3.10+
- PM2 installed globally (
npm install -g pm2)
Usage
Basic Commands
# 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
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
cli-anything-pm2
# Enter commands interactively with tab-completion and history
Command Groups
process
Process inspection commands.
| Command | Description |
|---|---|
list |
List all PM2 processes |
describe <name> |
Get detailed info for a process |
metrics |
Get metrics for all processes |
lifecycle
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 |
logs
Log management commands.
| Command | Description |
|---|---|
view <name> --lines 50 |
View recent logs |
flush [name] |
Flush logs |
system
System-level commands.
| Command | Description |
|---|---|
save |
Save current process list |
startup |
Generate startup script |
version |
Get PM2 version |
Output Formats
All commands support dual output modes:
- Human-readable (default): Tables, colors, formatted text
- Machine-readable (
--jsonflag): Structured JSON for agent consumption
# Human output
cli-anything-pm2 process list
# JSON output for agents
cli-anything-pm2 --json process list
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
FAQ
Do I need PM2 installed?
Yes. PM2 must be installed globally, usually with npm, before the skill can use it.
Can it remove a process?
Yes. A delete command removes a process from PM2, so use it with care.
Can it show how much resources an app uses?
Yes. A metrics command shows metrics for all of the processes.
Details
Original description by the author
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.
repo: HKUDS/CLI-Anything
Popularity
- GitHub stars
- 58k
- Ranking position
- #3237
- License
- Apache-2.0
- Updated
- 9/21/2026
Comments
- …
More skills from this repository
cli-anything-3mf
58kLets your agent inspect and fix 3D printing files, including finding round holes, resizing them, repairing meshes, and comparing two files.
cli-anything-qgis
58kLets your agent open, edit, and export QGIS map projects from the terminal, including layers, features, print layouts, and processing tools.
cli-anything-adguardhome
58kLets your agent manage AdGuard Home, a network-wide ad blocker, including filters, DNS rewrites, clients, and query logs.
cli-anything-anygen
58kLets your agent generate slides, documents, websites, and diagrams from a written prompt using the AnyGen service.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.