PHPackages                             chr15k/php-typos - 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. chr15k/php-typos

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

chr15k/php-typos
================

Native, ultra-fast spellchecking and fixing for PHP codebases.

0.2.2(1mo ago)210↓50%MITPHPPHP ^8.3CI passing

Since Jun 24Pushed 1mo agoCompare

[ Source](https://github.com/chr15k/php-typos)[ Packagist](https://packagist.org/packages/chr15k/php-typos)[ RSS](/packages/chr15k-php-typos/feed)WikiDiscussions main Synced 2w ago

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

  ![Logo for php typos](art/header-light.png) [![GitHub Workflow Status (master)](https://camo.githubusercontent.com/af8a82e1bdcdec94ad1958a53781f69032e233a60f048b142c3b8cd14abcc0cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63687231356b2f7068702d7479706f732f6d61696e2e796d6c)](https://github.com/chr15k/php-typos/actions) [![Total Downloads](https://camo.githubusercontent.com/faac9c8da25dd4e71f6eaa1868b0a3abaaa068b5c592cab14eda23cb3b658d59/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63687231356b2f7068702d7479706f73)](https://packagist.org/packages/chr15k/php-typos) [![Latest Version](https://camo.githubusercontent.com/39d5fe159d659816240a26d44b6e83821ebdf4146104e732be061fc44ae74b84/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63687231356b2f7068702d7479706f73)](https://packagist.org/packages/chr15k/php-typos) [![License](https://camo.githubusercontent.com/7f0cccec0672093e6d1ba82ace73ad8f4dfd48073274895c4d44807a27bf21bf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f63687231356b2f7068702d7479706f73)](https://packagist.org/packages/chr15k/php-typos)

---

Typos for PHP
=============

[](#typos-for-php)

A blistering fast source code spellchecker for PHP projects, powered by the [typos](https://github.com/crate-ci/typos) Rust CLI.

The correct platform binary ships with the package — no Rust, Cargo, or Homebrew required. Run it the same way you run Pint or PHPStan, and it works the same way in CI.

---

Requirements
------------

[](#requirements)

- PHP 8.3+
- Linux (x86\_64 / ARM64), macOS (x86\_64 / ARM64), or Windows (x86\_64)

---

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

[](#installation)

Install as a development dependency:

```
composer require chr15k/php-typos --dev
```

Then initialise a configuration file in your project root:

```
./vendor/bin/typos --init
```

This copies a `_typos.toml` file to your project root where you can configure paths to exclude and words to ignore.

---

Usage
-----

[](#usage)

### Basic check

[](#basic-check)

Scan the entire project from the current directory:

```
./vendor/bin/typos
```

Scan specific paths:

```
./vendor/bin/typos app/
./vendor/bin/typos app/ tests/ config/
```

---

Flags
-----

[](#flags)

### `--init` / `-i`

[](#--init---i)

Copies the default `_typos.toml` configuration file into your project root. Safe to run on a fresh project — it will not overwrite an existing config.

```
./vendor/bin/typos --init
```

---

### `--write` / `-w`

[](#--write---w)

Automatically fix discovered typos by writing corrections directly to the affected files.

```
./vendor/bin/typos --write
./vendor/bin/typos src/ --write
```

> Cannot be used together with `--diff`.

---

### `--diff` / `-d`

[](#--diff---d)

Show a unified diff of proposed corrections without modifying any files. Useful for reviewing what `--write` would change before committing to it.

```
./vendor/bin/typos --diff
./vendor/bin/typos src/ --diff
```

> Cannot be used together with `--write`.

---

### `--files` / `-fi`

[](#--files---fi)

List the files being scanned without checking for typos.

```
./vendor/bin/typos --files
./vendor/bin/typos src/ --files
```

---

### `--identifiers` / `-id`

[](#--identifiers---id)

List all identifiers (variable names, function names, etc.) found during the scan.

```
./vendor/bin/typos --identifiers
```

---

### `--words` / `-wo`

[](#--words---wo)

List all words found during the scan.

```
./vendor/bin/typos --words
```

---

### `--format` / `-f`

[](#--format---f)

Control the output format. Defaults to `long`.

ValueDescription`long`Full output with file path, line, and correction detail (default)`brief`One line per file with typos`json`Machine-readable JSON, suitable for CI annotation tools```
./vendor/bin/typos --format=json
./vendor/bin/typos --format=brief
```

---

### `--config` / `-c`

[](#--config---c)

Path to a custom `_typos.toml` configuration file. Defaults to the one in your project root.

```
./vendor/bin/typos --config=path/to/_typos.toml
```

---

Configuration
-------------

[](#configuration)

The `_typos.toml` file controls which paths are excluded and which words are globally ignored.

```
[files]
extend-exclude = [
    "vendor",
    "node_modules",
    "bootstrap/cache",
    "storage",
    ".git",
    "public"
]

[default.extend-words]
# Words to skip globally (key and value must match)
# creeate = "creeate"
```

---

CI/CD Integration
-----------------

[](#cicd-integration)

### GitHub Actions

[](#github-actions)

```
- name: Check for typos
  run: ./vendor/bin/typos
```

For annotation-friendly output:

```
- name: Check for typos
  run: ./vendor/bin/typos --format=json
```

### Composer script

[](#composer-script)

Add a script to your `composer.json` to run alongside your other checks:

```
"scripts": {
    "typos:check": "typos",
    "ci": [
        "@lint:check",
        "@refactor:check",
        "@types:check",
        "@typos:check",
        "@unit"
    ],
}
```

---

Supported Platforms
-------------------

[](#supported-platforms)

OSArchitecturemacOSx86\_64, ARM64 (Apple Silicon)Linuxx86\_64, ARM64Windowsx86\_64---

License
-------

[](#license)

MIT — see [LICENSE](LICENSE) for details.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance91

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

4

Last Release

44d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c817e814df42c78ac76505c9394a786946a0d9517b64984eca34b6f04010df95?d=identicon)[chr15k](/maintainers/chr15k)

---

Top Contributors

[![chr15k](https://avatars.githubusercontent.com/u/67823070?v=4)](https://github.com/chr15k "chr15k (25 commits)")

---

Tags

phpclistatic analysiscode qualitytyposdeveloper-toolsspellcheckspell-checkerchr15k

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/chr15k-php-typos/health.svg)

```
[![Health](https://phpackages.com/badges/chr15k-php-typos/health.svg)](https://phpackages.com/packages/chr15k-php-typos)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[illuminate/console

The Illuminate Console package.

13046.6M7.1k](/packages/illuminate-console)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54643.3k4](/packages/jolicode-castor)[whatsdiff/whatsdiff

See what's changed in your project's dependencies

761.4k](/packages/whatsdiff-whatsdiff)[dagger/dagger

Dagger PHP SDK

261.4k](/packages/dagger-dagger)[lion/bundle

Lion-framework configuration and initialization package

122.4k5](/packages/lion-bundle)

PHPackages © 2026

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