Download the PHP package chr15k/php-typos without Composer
On this page you can find all versions of the php package chr15k/php-typos. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chr15k/php-typos
More information about chr15k/php-typos
Files in chr15k/php-typos
Package php-typos
Short Description Native, ultra-fast spellchecking and fixing for PHP codebases.
License MIT
Informations about the package php-typos
Typos for PHP
A blistering fast source code spellchecker for PHP projects, powered by the 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
- PHP 8.3+
- Linux (x86_64 / ARM64), macOS (x86_64 / ARM64), or Windows (x86_64)
Installation
Install as a development dependency:
Then initialise a configuration file in your project root:
This copies a _typos.toml file to your project root where you can configure paths to exclude and words to ignore.
Usage
Basic check
Scan the entire project from the current directory:
Scan specific paths:
Flags
--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.
--write / -w
Automatically fix discovered typos by writing corrections directly to the affected files.
Cannot be used together with
--diff.
--diff / -d
Show a unified diff of proposed corrections without modifying any files. Useful for reviewing what --write would change before committing to it.
Cannot be used together with
--write.
--files / -fi
List the files being scanned without checking for typos.
--identifiers / -id
List all identifiers (variable names, function names, etc.) found during the scan.
--words / -wo
List all words found during the scan.
--format / -f
Control the output format. Defaults to long.
| Value | Description |
|---|---|
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 |
--config / -c
Path to a custom _typos.toml configuration file. Defaults to the one in your project root.
Configuration
The _typos.toml file controls which paths are excluded and which words are globally ignored.
CI/CD Integration
GitHub Actions
For annotation-friendly output:
Composer script
Add a script to your composer.json to run alongside your other checks:
Supported Platforms
| OS | Architecture |
|---|---|
| macOS | x86_64, ARM64 (Apple Silicon) |
| Linux | x86_64, ARM64 |
| Windows | x86_64 |
License
MIT — see LICENSE for details.