PHPackages                             neilime/ansi-to-html-twig-extension - 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. [Templating &amp; Views](/categories/templating)
4. /
5. neilime/ansi-to-html-twig-extension

ActiveLibrary[Templating &amp; Views](/categories/templating)

neilime/ansi-to-html-twig-extension
===================================

Twig extension to convert ANSI escapes (terminal formatting/color codes) to HTML

v3.0.0(4mo ago)274MITPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Dec 19Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/neilime/ansi-to-html-twig-extension)[ Packagist](https://packagist.org/packages/neilime/ansi-to-html-twig-extension)[ Docs](http://neilime.github.io/ansi-to-html-twig-extension/)[ GitHub Sponsors](https://github.com/neilime)[ RSS](/packages/neilime-ansi-to-html-twig-extension/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (5)Dependencies (4)Versions (8)Used By (0)

 [![](https://repository-images.githubusercontent.com/76852630/716dd6ce-c977-4ff7-8185-35920024fff9)](https://neilime.github.io/ansi-to-html-twig-extension)

Ansi-To-Html Twig Extension
===========================

[](#ansi-to-html-twig-extension)

[![Continuous Integration](https://github.com/neilime/ansi-to-html-twig-extension/actions/workflows/main-ci.yml/badge.svg)](https://github.com/neilime/ansi-to-html-twig-extension/actions/workflows/main-ci.yml)[![codecov](https://camo.githubusercontent.com/ea1072be0a9ef5b822c0a7f314bd791819f386682583df30f46865167edcfeb7/68747470733a2f2f636f6465636f762e696f2f67682f6e65696c696d652f616e73692d746f2d68746d6c2d747769672d657874656e73696f6e2f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d654d7577674e7562375a)](https://codecov.io/gh/neilime/ansi-to-html-twig-extension)[![Latest Stable Version](https://camo.githubusercontent.com/02299c30c9ca328bb42e41cd2cb1ceb2b7dc5d43191ffb17a746e72ce02077da/68747470733a2f2f706f7365722e707567782e6f72672f6e65696c696d652f616e73692d746f2d68746d6c2d747769672d657874656e73696f6e2f762f737461626c65)](https://packagist.org/packages/neilime/ansi-to-html-twig-extension)[![Total Downloads](https://camo.githubusercontent.com/cc90c5274c46e66e386e6888146210307bad3ebe666ab22bf5ac739151ee80c6/68747470733a2f2f706f7365722e707567782e6f72672f6e65696c696d652f616e73692d746f2d68746d6c2d747769672d657874656e73696f6e2f646f776e6c6f616473)](https://packagist.org/packages/neilime/ansi-to-html-twig-extension)[![License](https://camo.githubusercontent.com/805ee142d405bf0af963a1c7556deda334c16b5b50585096f21bf8a8197765e4/68747470733a2f2f706f7365722e707567782e6f72672f6e65696c696d652f616e73692d746f2d68746d6c2d747769672d657874656e73696f6e2f6c6963656e7365)](https://packagist.org/packages/neilime/ansi-to-html-twig-extension)[![Sponsor](https://camo.githubusercontent.com/f55c88fe25eb9b7cab4ae4a50e9720925d200d5141d70e4224ecd6bd179de3e3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2545322539442541342d53706f6e736f722d666636396234)](https://github.com/sponsors/neilime)

📢 **Ansi-To-Html Twig Extension** is a [Twig](https://twig.symfony.com) extension to convert ANSI escapes (terminal formatting/color codes) to HTML:

It is based on [ANSI escapes to Html](https://github.com/neilime/ansi-escapes-to-html).

```
{% ansitohtml %}
Default \e[34mBlue
{% endansitohtml %}
```

Helping Project
---------------

[](#helping-project)

❤️ If this project helps you reduce time to develop and/or you want to help the maintainer of this project. You can [sponsor](https://github.com/sponsors/neilime) him. Thank you !

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

[](#contributing)

👍 If you wish to contribute to this project, please read the [CONTRIBUTING.md](CONTRIBUTING.md) file. Note: If you want to contribute don't hesitate, I'll review any PR.

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

[](#documentation)

### [Installation](./docs/installation.md)

[](#installation)

### [Usage](./docs/usage.md)

[](#usage)

### [Development](./docs/development.md)

[](#development)

### [Code Coverage](https://codecov.io/gh/neilime/ansi-to-html-twig-extension)

[](#code-coverage)

### [PHP Doc](https://neilime.github.io/ansi-to-html-twig-extension/phpdoc)

[](#php-doc)

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 54.9% 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 ~822 days

Total

5

Last Release

141d ago

Major Versions

v1.1.0 → v2.0.02024-07-06

v2.1.0 → v3.0.02025-12-22

PHP version history (5 changes)v1.0.0PHP &gt;=5.3.3

v1.1.0PHP ^7.2

v2.0.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

v2.1.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

v3.0.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0cd480ea3050a483f3e08c365a6d847402b4edb110d706111d13ef33b845ef9f?d=identicon)[neilime](/maintainers/neilime)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (78 commits)")[![neilime](https://avatars.githubusercontent.com/u/314088?v=4)](https://github.com/neilime "neilime (57 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

converttwightmlfilterhighlightansiescapes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/neilime-ansi-to-html-twig-extension/health.svg)

```
[![Health](https://phpackages.com/badges/neilime-ansi-to-html-twig-extension/health.svg)](https://phpackages.com/packages/neilime-ansi-to-html-twig-extension)
```

###  Alternatives

[twig/string-extra

A Twig extension for Symfony String

21946.0M133](/packages/twig-string-extra)[twig/markdown-extra

A Twig extension for Markdown

12114.3M83](/packages/twig-markdown-extra)[twig/html-extra

A Twig extension for HTML

777.6M41](/packages/twig-html-extra)[twig/cache-extra

A Twig extension for Symfony Cache

392.1M20](/packages/twig-cache-extra)[spress/spress

Static site generator with blogs support

37436.2k](/packages/spress-spress)[nochso/html-compress-twig

Twig extension for compressing HTML and inline CSS/Javascript

84468.6k8](/packages/nochso-html-compress-twig)

PHPackages © 2026

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