{"id":13519253,"url":"https://github.com/mnapoli/pretty","last_synced_at":"2025-04-13T08:27:57.686Z","repository":{"id":57018471,"uuid":"110749530","full_name":"mnapoli/pretty","owner":"mnapoli","description":"✨ CLI command with sane defaults to simplify CodeSniffer and PHP-CS-Fixer","archived":false,"fork":false,"pushed_at":"2020-12-07T13:32:34.000Z","size":28,"stargazers_count":106,"open_issues_count":1,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-27T00:12:08.266Z","etag":null,"topics":["code-formatter","coding-standards","coding-style","php","psr-1","psr-2"],"latest_commit_sha":null,"homepage":"https://prettyci.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mnapoli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-14T21:56:12.000Z","updated_at":"2025-02-11T21:33:41.000Z","dependencies_parsed_at":"2022-08-22T20:20:24.502Z","dependency_job_id":null,"html_url":"https://github.com/mnapoli/pretty","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnapoli%2Fpretty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnapoli%2Fpretty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnapoli%2Fpretty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnapoli%2Fpretty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mnapoli","download_url":"https://codeload.github.com/mnapoli/pretty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248683499,"owners_count":21144917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-formatter","coding-standards","coding-style","php","psr-1","psr-2"],"created_at":"2024-08-01T05:01:56.405Z","updated_at":"2025-04-13T08:27:57.665Z","avatar_url":"https://github.com/mnapoli.png","language":"PHP","readme":"[![](https://hc4rcprbe1.execute-api.eu-west-1.amazonaws.com/dev?name=mnapoli/pretty)](https://prettyci.com/)\n\n**A single CLI command with sane defaults to simplify CodeSniffer and PHP-CS-Fixer.**\n\n---\n\n[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.\n\nNow it's easy, simply run:\n\n```\npretty\n```\n\n*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.\n\nIf errors are found, simply run:\n\n```\npretty fix\n```\n\nAgain, *Pretty* will run the appropriate tool (`php-cs-fixer` or `phpcbf`) to fix as many errors as possible in your code.\n\n## Installation\n\nIf you have already [set up a global install of Composer](http://akrabat.com/php/global-installation-of-php-tools-with-composer/) just run:\n\n```\ncomposer global require mnapoli/pretty\n```\n\n*Pretty* comes with no dependencies so it should not bring any conflict in Composer.\n\nYou 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`.\n\nYou will be able to update to new versions by running:\n\n```\ncomposer global update mnapoli/pretty\n```\n\n## Usage\n\nRunning an analysis is as simple as running:\n\n```\npretty\n```\n\nThis command will not change any code. To fix errors reported by this command, simply run:\n\n```\npretty fix\n```\n\nIn case you are running the analyses in CI you might want to run:\n\n```\npretty ci\n```\n\nThis will disable the caching option of PHP-CS-Fixer or CodeSniffer (because the cache will not be kept in CI).\n\n## Hosted continuous integration\n\nIf you are using `pretty` in your daily development workflow you may be interested in [PrettyCI.com](https://prettyci.com/), the SaaS version of `pretty`.\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnapoli%2Fpretty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmnapoli%2Fpretty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnapoli%2Fpretty/lists"}