typos
Source code spell checker that reports known misspellings, applies unambiguous corrections, and supports project-specific dictionaries and CI checks.
typos is a spell checker for source code. Running typos reports misspellings in a project, and typos --write-changes (or -w) applies the corrections in place. If a typo has more than one possible correction, it reports the typo and moves on without changing the file.
Instead of guessing the closest valid word from a dictionary, typos keeps a list of known typo corrections. This approach targets recognized misspellings and supports automated checks on pull requests. Heuristics skip non-words such as hashes. Intentional spellings such as names, acronyms and localized content can be allowed in _typos.toml with extend-words, extend-identifiers or extend-ignore-identifiers-re. File types can be configured to skip content checks while still checking file names (check-file = false), and files can be excluded with files.extend-exclude.
For debugging, --dump-config - shows the effective config, and --files, --identifiers and --words show how the project is being processed. -v enables debug logging. For custom integrations, - reads from stdin and writes corrections to stdout with --write-changes. --diff outputs a diff, and --format json emits jsonlines, with exit code 0 for no typos and 2 when typos are found. Documented integrations include GitHub Actions, pre-commit, GitLab Code Quality, a VS Code extension, a language server (typos-lsp) and a Putout processor. It suits developers and CI maintainers who want automated spell checking of code and documentation.
Installation
# via Homebrew
brew install typos-cli
# via Cargo
cargo install typos-cli --locked
# via Conda
conda install typos

Alternatives & related tools
lychee
Async, stream-based link checker written in Rust that finds broken URLs and email addresses in Markdown, HTML, reStructuredText, and websites.
dprint
Pluggable code formatting platform that runs multiple language formatters, including TypeScript, JSON, Markdown, TOML and wrappers for Prettier, Biome and Ruff.
bacon
Background code checker for Rust projects that runs continuously alongside your editor
pastel
Command-line tool to generate, analyze, convert and manipulate colors across multiple formats and color spaces
jscpd
Copy/paste detector for 224 source formats with a Rust engine. Also reports dead code, complexity, git-history duplication trends, and a health score.
add a badge to your README
Maintain typos? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/typos?utm_source=badge)<a href="https://www.trmn.sh/tools/typos?utm_source=badge"><img src="https://www.trmn.sh/badge/typos.svg" alt="Featured on trmn" height="20"></a>