PHPackages                             prageeth-peiris/connect-to-rpm2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. prageeth-peiris/connect-to-rpm2

ActiveLibrary[HTTP &amp; Networking](/categories/http)

prageeth-peiris/connect-to-rpm2
===============================

A Simple Laravel Package to connect with rpm2 server (An express JS server that connects to pm2 node process manager)

1.2.3(3y ago)01801[1 issues](https://github.com/prageeth-peiris/connect-to-rpm2/issues)MITPHPPHP ^8.0

Since Jun 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/prageeth-peiris/connect-to-rpm2)[ Packagist](https://packagist.org/packages/prageeth-peiris/connect-to-rpm2)[ Docs](https://github.com/prageeth-peiris/connect-to-rpm2)[ RSS](/packages/prageeth-peiris-connect-to-rpm2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (5)Used By (0)

This Laravel package helps you to connect to a RPM2 Server and manipulates PM2 processes.

[https://github.com/FizzyApple12/rpm2](#FizzyApple12/rpm2)

How to set up RPM2 Server
-------------------------

[](#how-to-set-up-rpm2-server)

```
npm i rpm2 -g
npx rpm2 start
```

This commands should run a RPM2 Server in 8008 port in default

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require prageeth-peiris/connect-to-rpm2
```

Requirements
------------

[](#requirements)

- Laravel 8 or above
- PHP 8.1

ENV Setup
---------

[](#env-setup)

```
RPM2_HOST = "2.3.5.4:8080"
PM2_SCRIPT_LOCATION = "/app/myapp/test"
PM2_SCRIPT_NAME = "index.js"
DEFAULT_PM2_SCRIPT_ARGUMENTS = "-x  foo -y bar"

```

Usage
-----

[](#usage)

```
//create an instance of manager class
$manager = new \PrageethPeiris\ConnectToRpm2\Manager\Rpm2Manager()

//optionally you can pass your custom rpm2Client to manager
$rpm2Client = new \PrageethPeiris\ConnectToRpm2\Clients\Rpm2Client();
$rpm2Client->setHost('x')->setScriptLocation('/ssss/ssss')
$manager = new \PrageethPeiris\ConnectToRpm2\Manager\Rpm2Manager($rpm2Client)

//execute new process with arguments
$response =  $manager->run("-x1 customArg1 -x2 CustomArg2")

//stop process by processName
// package automatically  generates processName using Unix Timestamp
$response = $manager->stop(12345678);

//kill an process by processName
$response = $manager->kill(12345798)

// list all processList
$response = $manager->listAll();

// check status of a process by process name
$response = $manager->check(123456789)

//dump response
dd($response);
```

### Testing

[](#testing)

```
composer test
```

You need an actual rpm2 server to run tests. Also set env variables in config file.

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Prageeth Peiris](https://github.com/prageeth-peiris)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

4

Last Release

1414d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfaffa19f7b769d94631a89264b8a89517960ba5f9210af17983cecd8cd6e11a?d=identicon)[prageeth-peiris](/maintainers/prageeth-peiris)

---

Top Contributors

[![prageeth-peiris](https://avatars.githubusercontent.com/u/57320631?v=4)](https://github.com/prageeth-peiris "prageeth-peiris (12 commits)")

---

Tags

prageeth-peirisconnect-to-rpm2

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/prageeth-peiris-connect-to-rpm2/health.svg)

```
[![Health](https://phpackages.com/badges/prageeth-peiris-connect-to-rpm2/health.svg)](https://phpackages.com/packages/prageeth-peiris-connect-to-rpm2)
```

###  Alternatives

[danharrin/livewire-rate-limiting

Apply rate limiters to Laravel Livewire actions.

40423.1M27](/packages/danharrin-livewire-rate-limiting)[mateusjunges/laravel-kafka

A kafka driver for laravel

7163.1M17](/packages/mateusjunges-laravel-kafka)[ricorocks-digital-agency/soap

A SOAP client that provides a clean interface for handling requests and responses.

4281.8M5](/packages/ricorocks-digital-agency-soap)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)[illuminatech/data-provider

Allows easy build for DB queries from API requests

4413.3k](/packages/illuminatech-data-provider)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
