PHPackages                             cline/ruler - 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. cline/ruler

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

cline/ruler
===========

Fluent rule engine with proposition-based evaluation and 50+ operators for building conditional business logic

5.0.1(2mo ago)08.8k↑18.3%2MITPHPPHP ^8.5.0CI failing

Since Oct 8Pushed 2mo agoCompare

[ Source](https://github.com/faustbrian/ruler)[ Packagist](https://packagist.org/packages/cline/ruler)[ RSS](/packages/cline-ruler/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelog (8)Dependencies (20)Versions (18)Used By (2)

[![GitHub Workflow Status](https://github.com/faustbrian/ruler/actions/workflows/quality-assurance.yaml/badge.svg)](https://github.com/faustbrian/ruler/actions)[![Latest Version on Packagist](https://camo.githubusercontent.com/82a88b9c6553578402c20885d838a502db15ddff654dfa66d829ae6ee0dcabad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c696e652f72756c65722e737667)](https://packagist.org/packages/cline/ruler)[![Software License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/f6b071428b453761b08c1aadbce9d74f8a7c259bc622aebe7990c8dde187affe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c696e652f72756c65722e737667)](https://packagist.org/packages/cline/ruler)

---

Fluent rule engine with proposition-based evaluation and 50+ operators for building conditional business logic.

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

[](#requirements)

> **Requires [PHP 8.4+](https://php.net/releases/)**

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

[](#installation)

```
composer require cline/ruler
```

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

[](#documentation)

- **[Getting Started](https://docs.cline.sh/ruler/getting-started/)** - Installation and basic usage
- **[Operators](https://docs.cline.sh/ruler/operators/)** - 50+ comparison, math, set operators
- **[Rules and Context](https://docs.cline.sh/ruler/rules-and-context/)** - Rule composition and dynamic context
- **[Text-Based DSL](https://docs.cline.sh/ruler/text-dsl/)** - Wirefilter-style text syntax
- **[DSL Implementations](https://docs.cline.sh/ruler/dsl-implementations/)** - All five DSL options compared
- **[Persisted Rules](DOCS.md#doc-docs-persisted-rules)** - Versioning and migration guidance for stored definitions
- **[Mutation Testing Strategy](DOCS.md#doc-docs-mutation-testing)** - Tooling decision and scope for mutation gates

Change log
----------

[](#change-log)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please use the [GitHub security reporting form](https://github.com/faustbrian/ruler/security) rather than the issue queue.

Credits
-------

[](#credits)

- [Brian Faust](https://github.com/faustbrian)
- [bobthecow/Ruler](https://github.com/bobthecow/Ruler)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance87

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~9 days

Total

17

Last Release

76d ago

Major Versions

1.x-dev → 2.0.02025-10-15

2.0.0 → 3.0.02025-10-22

3.x-dev → 4.0.02026-02-11

4.x-dev → 5.0.02026-03-04

PHP version history (2 changes)1.0.0PHP ^8.4.0

3.1.0PHP ^8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22145591?v=4)[Brian Faust](/maintainers/faustbrian)[@faustbrian](https://github.com/faustbrian)

---

Top Contributors

[![faustbrian](https://avatars.githubusercontent.com/u/22145591?v=4)](https://github.com/faustbrian "faustbrian (10 commits)")

---

Tags

phpContextDSLEvaluationbusiness-rulesfluent-interfaceoperatorsrule-engineconditional-logicproposition

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/cline-ruler/health.svg)

```
[![Health](https://phpackages.com/badges/cline-ruler/health.svg)](https://phpackages.com/packages/cline-ruler)
```

###  Alternatives

[ginq/ginq

LINQ to Object inspired DSL for PHP

192257.5k3](/packages/ginq-ginq)

PHPackages © 2026

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