cli-anything-pm2
できること
このスキルは、Node.jsアプリを動かし続けるツールPM2で管理されているプログラムを、AIエージェントが操作できるようにします。サーバー上でウェブサイトやサービスを動かし、状態をすばやく確認したい人向けです。
使う場面
- ✓PM2で管理されているアプリが動いていて、どんな状態かを確認したいとき。
- ✓アプリが止まったので、再起動したいとき。
- ✓最近のログを読み、エラーを探したいとき。
スキルのリンク
https://github.com/HKUDS/CLI-Anything/blob/main/pm2/agent-harness/cli_anything/pm2/skills/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“PM2でウェブサイトのプロセスが動いているか確認し、直近50行のログを表示してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、お使いのマシン上のPM2プログラムにコマンドを送り、結果を読み取ります。実行の間で自分の記憶は保持しません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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
よくある質問
PM2のインストールが必要ですか?
はい。通常はnpmを使って、PM2をグローバルにインストールしておく必要があります。
プロセスを削除できますか?
はい。deleteコマンドでPM2からプロセスを削除できるため、注意して使ってください。
アプリがどれだけリソースを使っているか確認できますか?
はい。metricsコマンドで、すべてのプロセスの指標を表示できます。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 58k
- ランキング
- #3237
- ライセンス
- Apache-2.0
- 更新日
- 2026/9/21
コメント
- …
このリポジトリの他のスキル
cli-anything-3mf
58kエージェントが3Dプリントのファイルを調べて直せるようにします。丸い穴を見つける、そのサイズを変える、メッシュを修復する、2つのファイルを比べることができます。
cli-anything-qgis
58kエージェントがターミナルからQGISのマッププロジェクトを開き、編集し、書き出せるようにします。レイヤー、フィーチャー、印刷レイアウト、処理ツールを含みます。
cli-anything-adguardhome
58kエージェントがAdGuard Homeを管理できるようにします。AdGuard Homeはネットワーク全体で広告を遮断するツールで、フィルター、DNSの書き換え、クライアント、クエリのログを扱います。
cli-anything-anygen
58kエージェントが、AnyGenのサービスを使って、書かれたプロンプトからスライド、文書、ウェブサイト、図を生成できるようにします。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。