PHPackages                             phpty/reline - 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. [CLI &amp; Console](/categories/cli)
4. /
5. phpty/reline

ActiveLibrary[CLI &amp; Console](/categories/cli)

phpty/reline
============

A port of Ruby's Reline line editor: Unicode width, grapheme and key-input handling for PHP terminal programs.

v0.2.0(yesterday)01↑2900%(Ruby OR BSD-2-Clause)PHP ^7.4 || ^8.0

Since Jul 19Compare

[ Source](https://github.com/phpty-org/reline)[ Packagist](https://packagist.org/packages/phpty/reline)[ RSS](/packages/phpty-reline/feed)WikiDiscussions Synced today

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

phpty/reline
============

[](#phptyreline)

A port of Ruby's [Reline](https://github.com/ruby/reline) line editor: Unicode width, grapheme and key-input handling for PHP terminal programs.

> **Read-only mirror.** The canonical development repository is [phpty-org/phpty](https://github.com/phpty-org/phpty), a monorepo. This `phpty/reline` repository is split out from it for distribution and is read-only: issues and pull requests are disabled, and any pull request opened here is closed automatically. Please contribute upstream.

Status
------

[](#status)

**Port complete** against Reline gem 0.6.3. The incremental tier plan (tiers 0-7) is finished: Unicode width and grapheme measurement, the IO gates, the full single- and multi-line editor with the upstream-shape renderer, history and incremental search, completion and the dialog UI, both vi keymaps and the `vi_*`commands, Face SGR theming, and the inputrc parser.

A handful of upstream surfaces are deliberately **not** ported, consistent with the unix/UTF-8-first milestone: the right prompt (`rprompt`), `auto_indent_proc` / `output_modifier_proc`, the upstream-undefined `vi_alias` / `vi_comment_out`, the Windows IO gate, and non-UTF-8 encodings (SJIS/EUC-JP). See [`CONTEXT.md`](CONTEXT.md) for the exhaustive list.

See [`CONTEXT.md`](CONTEXT.md) and the monorepo's [`docs/porting/`](https://github.com/phpty-org/phpty/tree/main/docs/porting) for the tier plan and the porting decisions.

Install
-------

[](#install)

```
composer require phpty/reline
```

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

[](#requirements)

- PHP `^7.4 || ^8.0`, with the `mbstring` extension

Grapheme clustering is done with PCRE's `\X` (the bundled PCRE2), so `ext-intl`is **not** required.

License
-------

[](#license)

Reline is a port and keeps its upstream terms rather than the MPL-2.0 the rest of PhPty ships under. Upstream Reline is offered under a dual grant — the Ruby license or the 2-clause BSD license (© Yukihiro Matsumoto) — and vendors rb-readline under a 2-clause BSD notice (© 2009 Park Heesob). All three travel with this module:

- [`COPYING`](COPYING) — the Ruby license
- [`BSDL`](BSDL) — the 2-clause BSD alternative
- [`license_of_rb-readline`](license_of_rb-readline) — the rb-readline BSD notice

The `composer.json` `license` field expresses this as the SPDX expression `(Ruby OR BSD-2-Clause)`. For how licensing works across PhPty as a whole — and why this module is the one exception to the uniform MPL-2.0 — see [the monorepo's LICENSE](https://github.com/phpty-org/phpty/blob/main/LICENSE.md).

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

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

1d ago

### Community

Maintainers

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

---

Tags

terminalunicodereadlinerelineline-editoreast-asian-width

### Embed Badge

![Health badge](/badges/phpty-reline/health.svg)

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

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B14.2k](/packages/symfony-console)[league/climate

PHP's best friend for the terminal. CLImate allows you to easily output colored text, special formats, and more.

1.9k14.7M304](/packages/league-climate)[php-school/cli-menu

A command line menu helper in PHP

1.9k1.2M30](/packages/php-school-cli-menu)[mathieuviossat/arraytotexttable

Display arrays in terminal

737.5M7](/packages/mathieuviossat-arraytotexttable)[clue/stdio-react

Async, event-driven console input &amp; output (STDIN, STDOUT) for truly interactive CLI applications, built on top of ReactPHP

20011.0M27](/packages/clue-stdio-react)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

6011.0M15](/packages/php-tui-php-tui)

PHPackages © 2026

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