본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)58k · #3237

cli-anything-pm2

하는 일

이 스킬은 AI 에이전트가 Node.js 앱을 계속 실행해 주는 도구 PM2가 관리하는 프로그램을 다루도록 합니다. 서버에서 웹사이트나 서비스를 운영하며 빠르게 상태를 확인하고 싶은 사람에게 맞습니다.

사용하는 경우

  • ✓PM2로 관리되는 앱이 실행 중인지, 상태가 어떤지 보고 싶을 때.
  • ✓앱이 멈춰서 다시 시작해야 할 때.
  • ✓오류를 찾으려고 앱의 최근 로그를 읽고 싶을 때.

스킬 링크

https://github.com/HKUDS/CLI-Anything/blob/main/pm2/agent-harness/cli_anything/pm2/skills/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/CLI-Anything/blob/main/pm2/agent-harness/cli_anything/pm2/skills/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 (--json flag): 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:

  1. Always use --json flag for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬