PHPackages                             nikaia/php-node-bridge - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nikaia/php-node-bridge

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nikaia/php-node-bridge
======================

Call your NodeJS scripts from Php

v1.0.0(3y ago)117MITPHPPHP ^8.0

Since Nov 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nikaia/php-node-bridge)[ Packagist](https://packagist.org/packages/nikaia/php-node-bridge)[ Docs](https://github.com/nikaia/php-node-bridge)[ RSS](/packages/nikaia-php-node-bridge/feed)WikiDiscussions main Synced yesterday

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

PHP NodeJS Bridge
=================

[](#php-nodejs-bridge)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8eb93c08fc4710da6b882b31c3b23db83a40265c094d306cb7fe3100f99bf260/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e696b6169612f7068702d6e6f64652d6272696467652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nikaia/php-node-bridge)\[[![Tests](https://github.com/nikaia/php-node-bridge/actions/workflows/tests.yml)](https://github.com/nikaia/php-node-bridge/actions/workflows/tests.yml)

Call your NodeJS scripts from Php

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

[](#installation)

You can install the package via composer:

```
composer require nikaia/php-node-bridge
```

Usage
-----

[](#usage)

The bridge work by executing a node script that accept piped json arbitary data, and returns json response.

> check [tests/\_fixtures/ok.script.js](tests/_fixtures/ok.script.js) for a working example.

```
use Nikaia\NodeBridge\Bridge;

try {
    $response = Bridge::create()
        ->setNode('/usr/local/bin/node')        // the path to the node (You can omit if in system path)
        ->setScript('/path/to/your/script.js')  // the path to your script
        ->pipe(['foo' => 'bar'])                // the data to pipe to the script
        ->run();
}
catch (BridgeException $e) {
    echo $e->getMessage();
}

var_dump($response->json());   // ['foo' => 'bar']
var_dump($response->output()); // the raw output of the script {"foo":"bar"}
```

```

```

```

```

Changelog
---------

[](#changelog)

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

Releases
--------

[](#releases)

This package use [semver](https://semver.org/) releases. Releases are managed using [standard-version](https://github.com/conventional-changelog/standard-version) node package, and requires adhering to [conventionalcommit](https://conventionalcommits.org) commit styles.

1. Implement a feature or a fix etc.
2. Use commit message like `fix: Fix an issue` or `feat: Implement a feature ...`
3. Or rewrite the commit message while squashing/closing the PR!!
4. Update your local project, checkout `main` branch
5. Run : `composer release` to generate changelog, and to tag to new release.
6. Check everything is okay.
7. Push the tag using `git push --follow-tags origin main`

> This repository is using [Semantic Pull Request bot](https://github.com/zeke/semantic-pull-requests) to enforce conventional commit message and PR titles

Credits
-------

[](#credits)

- [Nassif Bourguig](https://github.com/nbourguig)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

1325d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/276832?v=4)[Nassif Bourguig](/maintainers/nbourguig)[@nbourguig](https://github.com/nbourguig)

---

Top Contributors

[![nbourguig](https://avatars.githubusercontent.com/u/276832?v=4)](https://github.com/nbourguig "nbourguig (17 commits)")

---

Tags

Nikaiaphp-node-bridge

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nikaia-php-node-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/nikaia-php-node-bridge/health.svg)](https://phpackages.com/packages/nikaia-php-node-bridge)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)

PHPackages © 2026

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