PHPackages                             mnapoli/pretty - 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. mnapoli/pretty

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

mnapoli/pretty
==============

Run all code formatting tools with one command: pretty

1.2.0(5y ago)1085.1k5[1 issues](https://github.com/mnapoli/pretty/issues)9MITPHPPHP &gt;=7.0

Since Nov 14Pushed 5y ago6 watchersCompare

[ Source](https://github.com/mnapoli/pretty)[ Packagist](https://packagist.org/packages/mnapoli/pretty)[ RSS](/packages/mnapoli-pretty/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)DependenciesVersions (11)Used By (9)

[![](https://camo.githubusercontent.com/f1c356434c812378000959d845ba350979cdbfda9fe2a1f821b2dc3dfe5196c6/68747470733a2f2f686334726370726265312e657865637574652d6170692e65752d776573742d312e616d617a6f6e6177732e636f6d2f6465763f6e616d653d6d6e61706f6c692f707265747479)](https://prettyci.com/)

**A single CLI command with sane defaults to simplify CodeSniffer and PHP-CS-Fixer.**

---

[PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) and [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) are powerful but using them is not simple. It is not always obvious which tool a project uses and whether there is a configuration file to use or whether you need to provide options to the CLI command.

Now it's easy, simply run:

```
pretty

```

*Pretty* will detect the configuration file that exist in the current directory and will run the correct tool. If no configuration file exist, *Pretty* will run PHP CodeSniffer with PSR-2 by default.

If errors are found, simply run:

```
pretty fix

```

Again, *Pretty* will run the appropriate tool (`php-cs-fixer` or `phpcbf`) to fix as many errors as possible in your code.

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

[](#installation)

If you have already [set up a global install of Composer](http://akrabat.com/php/global-installation-of-php-tools-with-composer/) just run:

```
composer global require mnapoli/pretty

```

*Pretty* comes with no dependencies so it should not bring any conflict in Composer.

You can also install it as a local dependency of your project with `composer require --dev mnapoli/pretty`. In that case you can start the tool with `vendor/bin/pretty`.

You will be able to update to new versions by running:

```
composer global update mnapoli/pretty

```

Usage
-----

[](#usage)

Running an analysis is as simple as running:

```
pretty

```

This command will not change any code. To fix errors reported by this command, simply run:

```
pretty fix

```

In case you are running the analyses in CI you might want to run:

```
pretty ci

```

This will disable the caching option of PHP-CS-Fixer or CodeSniffer (because the cache will not be kept in CI).

Hosted continuous integration
-----------------------------

[](#hosted-continuous-integration)

If you are using `pretty` in your daily development workflow you may be interested in [PrettyCI.com](https://prettyci.com/), the SaaS version of `pretty`.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~124 days

Recently: every ~203 days

Total

10

Last Release

1988d ago

Major Versions

0.1.1 → 1.0.02017-11-18

PHP version history (2 changes)0.1.0PHP ^5.5|^7.0

1.2.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/329a6111724074f5388e95dd41a03ccf3c43f4bfe1ecf27c94c9efc6f7823228?d=identicon)[mnapoli](/maintainers/mnapoli)

---

Top Contributors

[![mnapoli](https://avatars.githubusercontent.com/u/720328?v=4)](https://github.com/mnapoli "mnapoli (27 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (2 commits)")[![morozov](https://avatars.githubusercontent.com/u/59683?v=4)](https://github.com/morozov "morozov (2 commits)")[![jderusse](https://avatars.githubusercontent.com/u/578547?v=4)](https://github.com/jderusse "jderusse (1 commits)")[![alexislefebvre](https://avatars.githubusercontent.com/u/2071331?v=4)](https://github.com/alexislefebvre "alexislefebvre (1 commits)")[![ngdo-pro](https://avatars.githubusercontent.com/u/22030946?v=4)](https://github.com/ngdo-pro "ngdo-pro (1 commits)")[![RinkAttendant6](https://avatars.githubusercontent.com/u/351158?v=4)](https://github.com/RinkAttendant6 "RinkAttendant6 (1 commits)")[![jdreesen](https://avatars.githubusercontent.com/u/424602?v=4)](https://github.com/jdreesen "jdreesen (1 commits)")

---

Tags

code-formattercoding-standardscoding-stylephppsr-1psr-2codestylestandardcodingformattingprettyPSR-2PSR-1

### Embed Badge

![Health badge](/badges/mnapoli-pretty/health.svg)

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

###  Alternatives

[doctrine/coding-standard

The Doctrine Coding Standard is a set of PHPCS rules applied to all Doctrine projects.

31914.1M739](/packages/doctrine-coding-standard)[leroy-merlin-br/coding-standard

The coding standard for PHP projects on LMBR

2137.0k10](/packages/leroy-merlin-br-coding-standard)

PHPackages © 2026

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