PHPackages                             stolt/readme-lint - 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. stolt/readme-lint

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

stolt/readme-lint
=================

A library and CLI for linting, spell-checking, and creating README.md files.

v0.2.0(6mo ago)11[2 issues](https://github.com/raphaelstolt/readme-lint/issues)MITPHPPHP &gt;=8.1CI failing

Since Oct 8Pushed 5mo agoCompare

[ Source](https://github.com/raphaelstolt/readme-lint)[ Packagist](https://packagist.org/packages/stolt/readme-lint)[ RSS](/packages/stolt-readme-lint/feed)WikiDiscussions main Synced 1mo ago

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

 [![Readme-lint logo](readme-lint-logo.png "Readme-lint logo")](readme-lint-logo.png)

[![Test Status](https://github.com/raphaelstolt/readme-lint/workflows/test/badge.svg)](https://github.com/raphaelstolt/readme-lint/workflows/test/badge.svg)[![Version](https://camo.githubusercontent.com/a9043beef573ed2132aae40bacf8d55c203caf2b5b771e5eb1fb6b4a11534e92/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746f6c742f726561646d652d6c696e742e7376673f7374796c653d666c6174)](https://packagist.org/packages/stolt/readme-lint)[![PHP Version](https://camo.githubusercontent.com/770d43133153ead0a9b8526e3352ca9933aa60cadcac54fd28aca42c3f71a613/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312b2d6666363962342e737667)](https://camo.githubusercontent.com/770d43133153ead0a9b8526e3352ca9933aa60cadcac54fd28aca42c3f71a613/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312b2d6666363962342e737667)[![Downloads](https://camo.githubusercontent.com/47137c64771953dbd899710df1e70c2464501905d5f0814a53c3351b78134639/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746f6c742f726561646d652d6c696e74)](https://camo.githubusercontent.com/47137c64771953dbd899710df1e70c2464501905d5f0814a53c3351b78134639/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746f6c742f726561646d652d6c696e74)[![PDS Skeleton](https://camo.githubusercontent.com/3c7140ee36205075ed977142f25c29eb1fb7809e9b86a865461fc21776ad1665/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d736b656c65746f6e2d626c75652e7376673f7374796c653d666c6174)](https://github.com/php-pds/skeleton)

readme-lint
===========

[](#readme-lint)

This library and its CLI supports you in linting `README.md` Markdown files via PHP. For inspiration for good READMEs, please have a look at the [Awesome README](https://github.com/matiassingers/awesome-readme) repository.

Installation and usage
----------------------

[](#installation-and-usage)

```
composer require --dev stolt/readme-lint
```

### Available CLI commands

[](#available-cli-commands)

The following list shows the currently three available CLI commands to interact with a README.md file.

```
php bin/readme-lint list

readme-lint 0.0.2

Available commands:
  init        Create an initial README.md file in the current working directory
  lint        Lint a README.md file for common quality issues
  spellcheck  Check a README.md file for wording or spelling mistakes
```

Available lint rules can be found in the [Rules](src/Rules) directory.

### Configuration

[](#configuration)

To configure the lint rules to apply, you have several options:

1. Create a `.readme-lint.php` file in the root of your project, which will be used as a default configuration when present.
2. Create a `some-readme-lint-configuration-file.php` file which you pass to the CLI via an option.

```
php bin/readme-lint lint --config=some-readme-lint-configuration-file.php
```

3. Pass a list of rules as a comma-separated string to the CLI. You can use FQCNs or base names for the rules to apply.

```
php bin/readme-lint lint --rules Stolt\ReadmeLint\Rules\LogoPresenceRule,NoTodoCommentRule
```

Note

To add `custom lint rules`, you must first create classes which implement the `Stolt\ReadmeLint\Rule\RuleInterface` interface and then make them available via your `readme-lint` configuration file like shown next.

```
