typos scans repositories for spelling mistakes in source and related files. It is designed to run quickly on large trees with few false positives for CI use.
Overview
typos is a command-line spell checker aimed at source code and text files in software projects. It walks project files, matches identifiers and words against a curated typo correction list, and reports or fixes likely mistakes without treating every unknown token as an error.
Typical usage is an audit mode that lists issues or a write mode that applies unambiguous corrections automatically. When multiple corrections are possible, the tool reports the conflict and leaves the text unchanged. Configuration via typos.toml can whitelist names, acronyms, and identifiers, exclude paths, tune file-type handling, and disable content checking for localized files while still checking filenames.
Installation options mentioned include pre-built binaries, Rust crate install, Homebrew, Conda, and Pacman packages. Integrations include a GitHub Action and pre-commit hook. For custom automation, flags support diff output, JSON lines, and stdin and stdout piping with defined exit codes.
The design favors a low false-positive rate so teams can run typos unattended on pull requests, contrasting with interactive spellers that guess corrections from a dictionary of valid words.
Key features
- Repository-wide spell scanning
- Automatic typo correction mode
- typos.toml configuration
- Identifier and word allowlists
- File type and exclude rules
- GitHub Actions integration
- pre-commit hook support
- JSON and diff output formats
Use cases
- CI spelling checks on pull requests
- Monorepo typo sweeps
- Correcting docs and comments
- Custom lint pipelines via JSON output