PHPackages                             adrian-dussan/console-diff-renderer - 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. adrian-dussan/console-diff-renderer

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

adrian-dussan/console-diff-renderer
===================================

only write output to a console that has changed

0.6.2(7y ago)02MITPHPPHP ^5.6 | ^7.0

Since Jun 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/adrian-dussan/console-diff-renderer)[ Packagist](https://packagist.org/packages/adrian-dussan/console-diff-renderer)[ Docs](https://github.com/graze/console-diff-renderer)[ RSS](/packages/adrian-dussan-console-diff-renderer/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (5)Versions (14)Used By (0)

Console Diff Renderer
=====================

[](#console-diff-renderer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2637db788a4d13aab279e14add90ca314e6b350c734a7cd39072f872fe9d3091/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772617a652f636f6e736f6c652d646966662d72656e64657265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/console-diff-renderer)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/1504461d8aeec2de77e295b23057d356decaa32d32ddd51f90af0dcb9f6a270c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6772617a652f636f6e736f6c652d646966662d72656e64657265722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/graze/console-diff-renderer)[![Coverage Status](https://camo.githubusercontent.com/e05b3a7bd7805cf823d8d7c43555dadf0be05fbc884f8819208cc1954f706354/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6772617a652f636f6e736f6c652d646966662d72656e64657265722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/console-diff-renderer/code-structure)[![Quality Score](https://camo.githubusercontent.com/54dcecf2e94eabb25e9043498453950b7334de7480e01d54e4237cef3bc52e3b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6772617a652f636f6e736f6c652d646966662d72656e64657265722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/console-diff-renderer)[![Total Downloads](https://camo.githubusercontent.com/3d92ef1f626fed096d978e013514422507cea587270d3269385f87d28381c9c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772617a652f636f6e736f6c652d646966662d72656e64657265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/console-diff-renderer)

Only render things that have changed to the console.

[![asciicast](https://camo.githubusercontent.com/92a47c5c0b0a31f5d1069fe0b4cdbc8c11c0c2f142917290a76e596057a874a4/68747470733a2f2f61736369696e656d612e6f72672f612f39323333756d7575796f386769306769666d6e75646a7a32362e706e67)](https://asciinema.org/a/9233umuuyo8gi0gifmnudjz26)

Usage
-----

[](#usage)

```
$output = new DiffConsoleOutput($existing);

$output->reWrite([
    'first line',
    'second line',
]);

$output->reWrite([
    'first line here',
    'second line',
]);
```

This will navigate the cursor to the end of `first line` and write ` here` then navigate the cursor back to the end.

- Supports Formatting
- Supports ANSI control codes
- Will wrap around based on the terminal size
- Can trim based on the terminal size
- Will only write the number of lines that are visible to the user

Install
-------

[](#install)

Via Composer

```
$ composer require graze/console-diff-renderer
```

Development
-----------

[](#development)

```
$ make build
```

### Testing

[](#testing)

```
$ make test
```

### Contributing

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Harry Bragg](https://github.com/h-bragg)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~31 days

Recently: every ~92 days

Total

13

Last Release

2887d ago

PHP version history (2 changes)0.1PHP ^5.6 | ^7.0

0.4.2PHP ^5.5 | ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/72cd26b253a0276bf3b7d65db8310f6e9f37413427a2401cff6740c79d2dc654?d=identicon)[adrian-dussan](/maintainers/adrian-dussan)

---

Top Contributors

[![biggianteye](https://avatars.githubusercontent.com/u/1482649?v=4)](https://github.com/biggianteye "biggianteye (1 commits)")[![peterjaap](https://avatars.githubusercontent.com/u/431360?v=4)](https://github.com/peterjaap "peterjaap (1 commits)")

---

Tags

grazeconsole-diff-renderer

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/adrian-dussan-console-diff-renderer/health.svg)

```
[![Health](https://phpackages.com/badges/adrian-dussan-console-diff-renderer/health.svg)](https://phpackages.com/packages/adrian-dussan-console-diff-renderer)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)[graze/parallel-process

run a pool of processes simultaneously

103214.3k1](/packages/graze-parallel-process)[madewithlove/license-checker

CLI tool to verify allowed licenses for composer dependencies

54449.8k21](/packages/madewithlove-license-checker)[shel/neos-terminal

Neos CMS Ui terminal for running Eel expressions and other commands

1441.3k](/packages/shel-neos-terminal)

PHPackages © 2026

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