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.1.1(3mo ago)017.1k—3.3%2MITPHPPHP ^8.5.0CI failing

Since Oct 8Pushed 3mo agoCompare

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

READMEChangelog (8)Dependencies (30)Versions (20)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, migration, and custom operator 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

48

—

FairBetter than 93% of packages

Maintenance81

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

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

19

Last Release

98d 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 (11 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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49617.1k](/packages/blackfire-player)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k19](/packages/solspace-craft-freeform)[contao-community-alliance/dc-general

Universal data container for Contao

1680.8k92](/packages/contao-community-alliance-dc-general)

PHPackages © 2026

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