PHPackages                             php-forge/foxy - 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. php-forge/foxy

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

php-forge/foxy
==============

Fast, reliable, and secure Bun/NPM/Yarn/pnpm bridge for Composer

0.2.0(5mo ago)45136.3k↑503.7%[3 PRs](https://github.com/php-forge/foxy/pulls)4BSD-3-ClausePHPPHP ^8.1CI passing

Since Jan 21Pushed 1w ago2 watchersCompare

[ Source](https://github.com/php-forge/foxy)[ Packagist](https://packagist.org/packages/php-forge/foxy)[ Docs](https://github.com/fxpio/foxy)[ GitHub Sponsors](https://github.com/sponsors/terabytesoftw)[ RSS](/packages/php-forge-foxy/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (5)Dependencies (12)Versions (10)Used By (4)

 [ ![PHP Forge](https://avatars.githubusercontent.com/u/103309199?s=400&u=ca3561c692f53ed7eb290d3bb226a2828741606f&v=4) ](https://github.com/php-forge/support)

Foxy
====

[](#foxy)

 [ ![PHPUnit](https://camo.githubusercontent.com/3c23d83519d0f193359ec28e1b1385079b9970d178375051628402cb7d721af1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068702d666f7267652f666f78792f6275696c642e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d504850556e6974266c6f676f3d676974687562) ](https://github.com/php-forge/foxy/actions/workflows/build.yml) [ ![Mutation Testing](https://camo.githubusercontent.com/f673a1661935e5a2282c5be4fe2ae6e9ce37cba63acae570d831d06a8a912b35/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666f722d7468652d62616467652675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532467068702d666f726765253246666f78792532466d61696e) ](https://dashboard.stryker-mutator.io/reports/github.com/php-forge/foxy/main) [ ![Easy Coding Standard](https://camo.githubusercontent.com/a384fb2477804224d951d3cfa63a814bf638d9801c347a93065709796d1456f4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068702d666f7267652f666f78792f6563732e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d454353266c6f676f3d676974687562) ](https://github.com/php-forge/foxy/actions/workflows/ecs.yml) [ ![Dependency Check](https://camo.githubusercontent.com/94392303806b45231c2dbde8f5d064e3f12b2d730726671c69502022a24ac558/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068702d666f7267652f666f78792f646570656e64656e63792d636865636b2e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d446570656e64656e6379253230436865636b266c6f676f3d676974687562) ](https://github.com/php-forge/foxy/actions/workflows/dependency-check.yml)

 **Foxy is a Composer plugin that aggregates asset dependencies from Composer packages into a single package.json and runs Bun, npm, Yarn, or pnpm while preserving the Composer state on failures.**

Features
--------

[](#features)

  ![Feature Overview](./docs/svgs/features-mobile.svg)Installation
------------

[](#installation)

```
composer require php-forge/foxy:^0.1
```

Manager can be `bun`, `npm`, `yarn` or `pnpm`. For default, `npm` is used.

```
{
    "require": {
        "php-forge/foxy": "^0.1"
    },
    "config": {
        "foxy": {
            "manager": "bun"
        }
    }
}
```

Quick start
-----------

[](#quick-start)

### Standard PHP project (Yii2)

[](#standard-php-project-yii2)

In a standard PHP application, keep a `package.json` file at the project root. Foxy will merge asset dependencies from installed Composer packages and run the configured manager during Composer install and update.

Example (Yii2 app template):

[Yii2 app template](https://github.com/yiisoft/yii2-app-basic/tree/22)

```
{
    "require": {
        "php-forge/foxy": "^0.1"
    },
    "config": {
        "foxy": {
            "manager": "npm"
        }
    }
}
```

### Drupal layout (package.json under web/)

[](#drupal-layout-packagejson-under-web)

In a typical Drupal proof-of-concept workflow, Composer stays at the repository root while frontend tooling and builds live under `web/`.

Foxy lets you keep that layout while still aggregating asset dependencies and running npm in the correct directory, with Composer state preserved if the install fails.

- Aggregates asset dependencies declared by Composer packages into a single npm install.
- Keeps asset tooling configuration consistent across local and CI environments.
- Restores Composer lock and PHP dependencies if npm exits with an error.
- Runs npm against the `web/` package.json without moving Composer files.

```
{
    "config": {
        "foxy": {
            "manager": "npm",
            "root-package-json-dir": "web"
        }
    }
}
```

Documentation
-------------

[](#documentation)

- 📚 [Guide](resources/doc/index.md)
- 💡 [Usage](resources/doc/usage.md)
- ⚙️ [Configuration](resources/doc/config.md)
- 📅 [Events](resources/doc/events.md)
- ❓ [FAQs](resources/doc/faqs.md)
- 🧪 [Testing Guide](docs/testing.md)
- 🛠️ [Development Guide](docs/development.md)

Package information
-------------------

[](#package-information)

[![PHP](https://camo.githubusercontent.com/8c0cc099469e78d1c3ab294bd8b4e29dd7ad459d84ca953058f4034eeb3e0695/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f253345253344382e312d3737374242342e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net/releases/8.1/en.php)[![Latest Stable Version](https://camo.githubusercontent.com/9d522e8857440a9bea7d33efb8a1d8298cdd0ccfcbb0b18819255ce52b415d39/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d666f7267652f666f78792e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d537461626c65)](https://packagist.org/packages/php-forge/foxy)[![Total Downloads](https://camo.githubusercontent.com/be13b230ea5c8bd4ba83d9165fcae943d37294dfd8a28ee1930b1fac6d0048b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d666f7267652f666f78792e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d636f6d706f736572266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/php-forge/foxy)

Quality code
------------

[](#quality-code)

[![Codecov](https://camo.githubusercontent.com/ee52f73806824374ef964b72c7a46b4bced3e8ebe6384f1e66f927aa664a6311/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7068702d666f7267652f666f78792e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d636f6465636f76266c6f676f436f6c6f723d7768697465266c6162656c3d436f766572616765)](https://codecov.io/gh/php-forge/foxy)[![PHPStan Level Max](https://camo.githubusercontent.com/4f83f1e4d230880162b6fb8d639220e6c255c2d84fa0c859c54e6c7f1e10412a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c253230352d3446354439352e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.com/php-forge/foxy/actions/workflows/static.yml)[![Super-Linter](https://camo.githubusercontent.com/5e81f0e86dd2f5cc98648c2753fa9d9c266201a6fd58b6226c15d2ceba212c09/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068702d666f7267652f666f78792f6c696e7465722e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d53757065722d4c696e746572266c6f676f3d676974687562)](https://github.com/php-forge/foxy/actions/workflows/linter.yml)[![Dependency Check](https://camo.githubusercontent.com/94392303806b45231c2dbde8f5d064e3f12b2d730726671c69502022a24ac558/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068702d666f7267652f666f78792f646570656e64656e63792d636865636b2e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d446570656e64656e6379253230436865636b266c6f676f3d676974687562)](https://github.com/php-forge/foxy/actions/workflows/dependency-check.yml)

Our social networks
-------------------

[](#our-social-networks)

[![Follow on X](https://camo.githubusercontent.com/332c1b1e043dfb940b95825f7863dc473f6924ddacdd6738cbbbba08f49e1862/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d466f6c6c6f772532306f6e253230582d3144413146322e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d78266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d303030303030)](https://x.com/Terabytesoftw)

License
-------

[](#license)

[![License](https://camo.githubusercontent.com/680c8d62ba2d5a71d7099b6e81114fb0b22d99086c121fd178e1149afc669d44/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4253442d2d332d2d436c617573652d627269676874677265656e2e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6f70656e736f75726365696e6974696174697665266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535)](LICENSE)

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance86

Actively maintained with recent releases

Popularity43

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.1% 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 ~183 days

Total

5

Last Release

160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/524d2b46690f41fce7188d369488a35e7624e6c5a264d82aacd08548bfd156ab?d=identicon)[terabytesoftw](/maintainers/terabytesoftw)

---

Top Contributors

[![terabytesoftw](https://avatars.githubusercontent.com/u/42547589?v=4)](https://github.com/terabytesoftw "terabytesoftw (70 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")

---

Tags

assetsbunnpmphppnpmyarncomposerpackageBridgenodejsassetbunyarnnpmdependency manager

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/php-forge-foxy/health.svg)

```
[![Health](https://phpackages.com/badges/php-forge-foxy/health.svg)](https://phpackages.com/packages/php-forge-foxy)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[foxy/foxy

Fast, reliable, and secure NPM/Yarn/pnpm bridge for Composer

182290.8k26](/packages/foxy-foxy)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[fxp/composer-asset-plugin

NPM/Bower Dependency Manager for Composer

9434.8M41](/packages/fxp-composer-asset-plugin)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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