Thanks to visit codestin.com
Credit goes to lib.rs

#ssh-server #pm2 #ssh

app pm22

A lightweight CLI tool that connects to a remote server over SSH and executes PM2 process manager commands

3 releases (breaking)

Uses new Rust 2024

0.3.0 Jun 23, 2025
0.2.0 Jun 22, 2025
0.1.0 Jun 22, 2025

#6 in #pm2

Codestin Search App

69 downloads per month

MIT license

105KB
215 lines

PM22

downloads crates

pm22 is a lightweight CLI tool that connects to a remote server over SSH and executes PM2 process manager commands.

Perfect for remotely managing Node.js applications from your terminal.

Preview

✨ Features

  • SSH into any server with your private key
  • Auto install Node.js and PM2 if not found
  • Execute any PM2 command remotely (start, stop, restart, delete, logs, etc.)
  • Supports custom ports and SSH keys
  • Optional verbose output with --verbose

🚚 Installation

You can install pm22 globally using cargo:

cargo install pm22

🚀 Usage

pm22 [OPTIONS] <host> <cmd> [args]...

🔹 Arguments

Name Description
<host> Host to connect to, including username (e.g., [email protected])
<cmd> PM2 command to execute (start, restart, status, logs, etc.)
[args]... Additional arguments passed to the PM2 command

🔹 Options

Flag Description Default
-p, --port <port> SSH port to connect to 22
-k, --key <path> Path to your SSH private key ~/.ssh/id_rsa
-v, --verbose Enable verbose output for debugging/logging
-h, --help Show help information
-V, --version Show version information

📄 License

MIT License © 2025 Tsiry Sandratraina

Dependencies

~9MB
~169K SLoC