# typos

> Source code spell checker that reports known misspellings, applies unambiguous corrections, and supports project-specific dictionaries and CI checks.

Stars: 4.2k · Language: Rust · License: Apache-2.0 · Categories: Dev Tools

- Repository: https://github.com/crate-ci/typos
- Page: https://www.trmn.sh/tools/typos

## Install

- Homebrew: `brew install typos-cli`
- Cargo: `cargo install typos-cli --locked`
- Conda: `conda install typos`

## Overview

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

```bash
# via Homebrew
brew install typos-cli
```

```bash
# via Cargo
cargo install typos-cli --locked
```

```bash
# via Conda
conda install typos
```

![typos terminal output showing detected spelling mistakes](https://media.trmn.sh/cached/013704e55a65224157ed64b37ed1504c2f2a7148bb761ce50f1ca92fbca39245.png)

## Alternatives

- [lychee](https://www.trmn.sh/tools/lychee.md): Async, stream-based link checker written in Rust that finds broken URLs and email addresses in Markdown, HTML, reStructuredText, and websites. (Rust, 4.2k stars)
- [dprint](https://www.trmn.sh/tools/dprint.md): Pluggable code formatting platform that runs multiple language formatters, including TypeScript, JSON, Markdown, TOML and wrappers for Prettier, Biome and Ruff. (Rust, 4.1k stars)
- [bacon](https://www.trmn.sh/tools/bacon.md): Background code checker for Rust projects that runs continuously alongside your editor (Rust, 3.5k stars)
- [pastel](https://www.trmn.sh/tools/pastel.md): Command-line tool to generate, analyze, convert and manipulate colors across multiple formats and color spaces (Rust, 6.6k stars)
- [jscpd](https://www.trmn.sh/tools/jscpd.md): Copy/paste detector for 224 source formats with a Rust engine. Also reports dead code, complexity, git-history duplication trends, and a health score. (Rust, 6.6k stars)

---

Canonical: https://www.trmn.sh/tools/typos
