PHPackages                             ramsey/devtools-lib - 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. ramsey/devtools-lib

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

ramsey/devtools-lib
===================

The library behind ramsey/devtools, allowing for extension of the ramsey/devtools Composer plugin.

2.2.2(1y ago)2333.9k↑300%8[2 PRs](https://github.com/ramsey/devtools-lib/pulls)2MITPHPPHP ^8.1CI passing

Since Oct 9Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/ramsey/devtools-lib)[ Packagist](https://packagist.org/packages/ramsey/devtools-lib)[ RSS](/packages/ramsey-devtools-lib/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (26)Versions (21)Used By (2)

ramsey/devtools-lib
===================

[](#ramseydevtools-lib)

 **The library behind [ramsey/devtools](https://github.com/ramsey/devtools), allowing for extension of the ramsey/devtools Composer plugin.**

 [![Source Code](https://camo.githubusercontent.com/5057f10b3fd6115a4991bfdd1b3624504127aedc037eceb08375b5bdf3593ffd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d72616d7365792f646576746f6f6c732d2d6c69622d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/ramsey/devtools-lib) [![Download Package](https://camo.githubusercontent.com/6f3e5f1082ee2bcd2381a6d85342d50105b6473ae10dd7bfe510e08da10af522/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72616d7365792f646576746f6f6c732d6c69622e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://packagist.org/packages/ramsey/devtools-lib) [![PHP Programming Language](https://camo.githubusercontent.com/60c88b279e873b789d9d97921e7affabad90e2f829d8f52693aca38705c09dd0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f72616d7365792f646576746f6f6c732d6c69622e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d253233383839324246)](https://php.net) [![Read License](https://camo.githubusercontent.com/87ead0731d16ca6a4cbdd36e0d7a267f82b726e2f55a4f85fd08260f0fb70f2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72616d7365792f646576746f6f6c732d6c69622e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d6461726b6379616e)](https://github.com/ramsey/devtools-lib/blob/main/LICENSE) [![Build Status](https://camo.githubusercontent.com/fa5b4a15b87c3d3bbe8c445daba9930bb376daa00db703174eb8e16a10622ec1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72616d7365792f646576746f6f6c732d6c69622f636f6e74696e756f75732d696e746567726174696f6e2e796d6c3f6272616e63683d322e78267374796c653d666c61742d737175617265266c6f676f3d676974687562)](https://github.com/ramsey/devtools-lib/actions/workflows/continuous-integration.yml) [![Codecov Code Coverage](https://camo.githubusercontent.com/1c61b6b676dea3d7238fd81ab6734e2cb12beefa8f7b5cf3dc36086ed8d1ada0/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f72616d7365792f646576746f6f6c732d6c69623f6c6162656c3d636f6465636f76266c6f676f3d636f6465636f76267374796c653d666c61742d737175617265)](https://codecov.io/gh/ramsey/devtools-lib) [![Psalm Type Coverage](https://camo.githubusercontent.com/ae699ed2bec5b98a93daa5dcb12a5604a2c15465063acf9a147b9ab6ee5fb685/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d687474707325334125324625324673686570686572642e64657625324667697468756225324672616d736579253246646576746f6f6c732d6c6962253246636f766572616765)](https://shepherd.dev/github/ramsey/devtools-lib)

About
-----

[](#about)

This library is what powers the [ramsey/devtools](https://github.com/ramsey/devtools)[Composer](https://getcomposer.org) plugin. Since you can't extend Composer plugins, this exists to allow for extension. If you don't need to extend this for your own plugin needs, and you want the functionality provided by the plugin, check out [ramsey/devtools](https://github.com/ramsey/devtools) instead.

This package also provides the `devtools` CLI tool, which you may use even if you do not want to use the plugin functionality.

This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). By participating in this project and its community, you are expected to uphold this code.

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

[](#installation)

Install this package with [Composer](https://getcomposer.org).

```
composer require --dev ramsey/devtools-lib
```

Usage
-----

[](#usage)

If using this library as a standalone tool, and not as a Composer plugin, type `./vendor/bin/devtools list` to see the list of commands this library provides.

```
./vendor/bin/devtools list
```

Note

Install [ramsey/devtools](https://github.com/ramsey/devtools), instead, if you do not need to extend this library to create your own Composer plugin.

### Extending or Overriding ramsey/devtools-lib Commands

[](#extending-or-overriding-ramseydevtools-lib-commands)

Maybe the commands ramsey/devtools-lib provides don't do everything you need, or maybe you want to replace them entirely. The configuration allows you to do this!

Using the `ramsey/devtools.commands` property in the `extra` section of `composer.json`, you may specify any command (*without* your custom prefix, if you've configured one) as having other scripts to run, in addition to the command's default behavior, or you may override the default behavior entirely.

Tip

If you don't want to use the property name "ramsey/devtools," you may use "devtools" instead. However, if there is a conflict with another package that uses the `extra.devtools` property, `extra.ramsey/devtools` takes precedence, so you may use it to avoid conflicts.

Specifying additional scripts works exactly like [writing custom commands](https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands)in `composer.json`, but the location is different. Everything you can do with a custom Composer command, you can do here because they're the same thing.

```
{
    "extra": {
        "ramsey/devtools": {
            "command-prefix": "my-prefix",
            "commands": {
                "lint:all": {
                    "script": "@mylint"
                },
                "test:all": {
                    "script": [
                        "@mylint",
                        "@phpbench"
                    ]
                }
            }
        }
    },
    "scripts": {
        "mylint": "parallel-lint src tests",
        "phpbench": "phpbench run"
    }
}
```

In this way, when you run `./vendor/bin/devtools lint:all` or `./vendor/bin/devtools test:all`, it will execute the default behavior first and then run your additional commands. To override the default behavior so that it doesn't run at all and only your scripts run, specify the `override` property and set it to `true`.

```
{
    "extra": {
        "ramsey/devtools": {
            "commands": {
                "lint:all": {
                    "override": true,
                    "script": "parallel-lint src tests"
                }
            }
        }
    }
}
```

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

[](#contributing)

Contributions are welcome! To contribute, please familiarize yourself with [CONTRIBUTING.md](CONTRIBUTING.md).

Coordinated Disclosure
----------------------

[](#coordinated-disclosure)

Keeping user information safe and secure is a top priority, and we welcome the contribution of external security researchers. If you believe you've found a security issue in software that is maintained in this repository, please read [SECURITY.md](SECURITY.md) for instructions on submitting a vulnerability report.

Copyright and License
---------------------

[](#copyright-and-license)

The ramsey/devtools-lib library is copyright © [Ben Ramsey](https://benramsey.com)and licensed for use under the terms of the MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance52

Moderate activity, may be stable

Popularity38

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 61.3% 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 ~84 days

Recently: every ~170 days

Total

20

Last Release

438d ago

Major Versions

1.x-dev → 2.0.02023-04-24

PHP version history (2 changes)1.0.0PHP ^7.4 || ^8

2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f514481fa9cfdfd5dbcaccb3e5b480f18ea05ebf331cddf9b1c5a2a96a78fef5?d=identicon)[ramsey](/maintainers/ramsey)

---

Top Contributors

[![ramsey](https://avatars.githubusercontent.com/u/42941?v=4)](https://github.com/ramsey "ramsey (155 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (92 commits)")[![wldgrlc](https://avatars.githubusercontent.com/u/70677517?v=4)](https://github.com/wldgrlc "wldgrlc (3 commits)")[![Lewiscowles1986](https://avatars.githubusercontent.com/u/2605791?v=4)](https://github.com/Lewiscowles1986 "Lewiscowles1986 (1 commits)")[![mallardduck](https://avatars.githubusercontent.com/u/619938?v=4)](https://github.com/mallardduck "mallardduck (1 commits)")[![upyx](https://avatars.githubusercontent.com/u/6064612?v=4)](https://github.com/upyx "upyx (1 commits)")

---

Tags

composer-plugindeveloper-toolsdevelopmentphpdevelopmenttools

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ramsey-devtools-lib/health.svg)

```
[![Health](https://phpackages.com/badges/ramsey-devtools-lib/health.svg)](https://phpackages.com/packages/ramsey-devtools-lib)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[franzl/studio

Develop your Composer libraries with style

1.1k634.5k15](/packages/franzl-studio)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.2M122](/packages/ramsey-conventional-commits)

PHPackages © 2026

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