typos 1.52.2


pip install typos

  Latest version

Released: Nov 11, 2026


Meta
Requires Python: >=3.8

Classifiers

Environment
  • Console

Intended Audience
  • Developers

Topic
  • Software Development

Operating System
  • OS Independent

License
  • OSI Approved :: MIT License
  • OSI Approved :: Apache Software License

Programming Language
  • Python
  • Python :: 3 :: Only
  • Rust
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

typos

Source code spell checker

Finds and corrects spelling mistakes among source code:

  • Fast enough to run on monorepos
  • Low false positives so you can run on PRs

Screenshot

Downloads codecov Documentation License Crates Status

Dual-licensed under MIT or Apache 2.0

Documentation

Install

Download a pre-built binary (installable via gh-install).

Or use rust to install:

$ cargo install typos-cli --locked

Or use Homebrew to install:

$ brew install typos-cli

Or use Conda to install:

$ conda install typos

Or use Pacman to install:

$ sudo pacman -S typos

Getting Started

Most commonly, you'll either want to see what typos are available with

$ typos

Or have them fixed

$ typos --write-changes
$ typos -w

If there is any ambiguity (multiple possible corrections), typos will just report it to the user and move on.

False Positives

Sometimes, what looks like a typo is intentional, like with people's names, acronyms, or localized content.

To mark a word or an identifier (grouping of words) as valid, add it to your _typos.toml by declaring itself as the valid spelling:

[default]
extend-ignore-identifiers-re = [
    # *sigh* this just isn't worth the cost of fixing
    "AttributeID.*Supress.*",
]

[default.extend-identifiers]
# *sigh* this just isn't worth the cost of fixing
AttributeIDSupressMenu = "AttributeIDSupressMenu"

[default.extend-words]
# Don't correct the surname "Teh"
teh = "teh"

For more ways to ignore or extend the dictionary with examples, see the config reference.

For cases like localized content, you can disable spell checking of file contents while still checking the file name:

[type.po]
extend-glob = ["*.po"]
check-file = false

(run typos --type-list to see configured file types)

If you need some more flexibility, you can completely exclude some files from consideration:

[files]
extend-exclude = ["localized/*.po"]

Integrations

Custom

typos provides several building blocks for custom native integrations

  • - reads from stdin, --write-changes will be written to stdout
  • --diff to provide a diff
  • --format json to get jsonlines with exit code 0 on no errors, code 2 on typos, anything else is an error.

Examples:

$ # Read file from stdin, write corrected version to stdout
$ typos - --write-changes
$ # Creates a diff of what would change
$ typos dir/file --diff
$ # Fully programmatic control
$ typos dir/file --format json

Debugging

You can see what the effective config looks like by running

$ typos --dump-config -

You can then see how typos is processing your project with

$ typos --files
$ typos --identifiers
$ typos --words

If you need to dig in more, you can enable debug logging with -v

FAQ

Why was ... not corrected?

Does the file show up in typos --files? If not, check your config with typos --dump-config -. The [files] table controls how we walk files. If you are using files.extend-exclude, are you running into #593? If you are using files.ignore-vcs = true, is the file in your .gitignore but git tracks it anyways? Prefer allowing the file explicitly (see #909).

Does the identifier show up in typos --identifiers or the word show up in typos --words? If not, it might be subject to one of typos' heuristics for detecting non-words (like hashes) or unambiguous words (like words after a \ escape).

If it is showing up, likely typos doesn't know about it yet.

typos maintains a list of known typo corrections to keep the false positive count low so it can safely run unassisted.

This is in contrast to most spell checking UIs people use where there is a known list of valid words. In this case, the spell checker tries to guess your intent by finding the closest-looking word. It then has a gauge for when a word isn't close enough and assumes you know best. The user has the opportunity to verify these corrections and explicitly allow or reject them.

For more on the trade offs of these approaches, see Design.

1.52.2 Nov 11, 2026
1.52.0 Nov 04, 2026
1.51.1 Oct 06, 2026
1.51.0 Oct 06, 2026
1.50.3 Sep 25, 2026
1.50.2 Sep 15, 2026
1.50.1 Sep 01, 2026
1.50.0 Aug 28, 2026
1.49.1 Aug 27, 2026
1.49.0 Aug 03, 2026
1.48.0 Jun 30, 2026
1.47.2 Jun 04, 2026
1.47.1 Jun 03, 2026
1.47.0 May 29, 2026
1.46.3 May 23, 2026
1.46.2 May 16, 2026
1.46.1 May 08, 2026
1.46.0 Apr 30, 2026
1.45.2 Apr 27, 2026
1.45.1 Apr 13, 2026
1.45.0 Apr 01, 2026
1.44.0 Feb 27, 2026
1.43.5 Feb 16, 2026
1.43.4 Feb 09, 2026
1.43.3 Feb 06, 2026
1.43.2 Feb 05, 2026
1.43.1 Feb 03, 2026
1.43.0 Feb 02, 2026
1.42.3 Jan 27, 2026
1.42.2 Jan 26, 2026
1.42.1 Jan 19, 2026
1.42.0 Jan 07, 2026
1.41.0 Dec 31, 2025
1.40.1 Dec 29, 2025
1.40.0 Nov 26, 2025
1.39.2 Nov 13, 2025
1.39.1 Nov 12, 2025
1.39.0 Oct 31, 2025
1.38.1 Oct 07, 2025
1.38.0 Oct 06, 2025
1.37.3 Oct 06, 2025
1.37.2 Oct 03, 2025
1.37.1 Oct 01, 2025
1.37.0 Sep 30, 2025
1.36.3 Sep 25, 2025
1.36.2 Sep 04, 2025
1.36.1 Sep 03, 2025
1.36.0 Sep 02, 2025
1.35.8 Sep 02, 2025
1.35.6 Aug 28, 2025
1.35.5 Aug 18, 2025
1.35.4 Aug 12, 2025
1.35.3 Aug 08, 2025
1.35.2 Aug 07, 2025
1.35.1 Aug 04, 2025
1.35.0 Aug 04, 2025
1.34.0 Jun 30, 2025
1.33.1 Jun 02, 2025
1.33.0 Jun 02, 2025
1.32.0 May 02, 2025
1.31.2 Apr 28, 2025
1.31.1 Mar 31, 2025
1.31.0 Mar 28, 2025
1.30.3 Mar 24, 2025
1.30.2 Mar 10, 2025
1.30.1 Mar 04, 2025
1.30.0 Mar 01, 2025
1.29.10 Feb 25, 2025
1.29.9 Feb 20, 2025
1.29.8 Feb 19, 2025
1.29.7 Feb 13, 2025
1.29.6 Feb 13, 2025
1.29.5 Jan 30, 2025
1.29.4 Jan 03, 2025
1.29.3 Jan 02, 2025
1.29.1 Jan 02, 2025
1.29.0 Dec 31, 2024
1.28.4 Dec 16, 2024
1.28.3 Dec 12, 2024
1.28.2 Dec 02, 2024
1.28.1 Nov 26, 2024
1.28.0 Nov 25, 2024
1.27.3 Nov 08, 2024
1.27.2 Nov 06, 2024
1.27.1 Nov 06, 2024
1.27.0 Nov 01, 2024
1.26.8 Oct 24, 2024
1.26.7 Oct 24, 2024
1.26.6 Oct 24, 2024
1.26.5 Oct 24, 2024
1.26.4 Oct 24, 2024
1.26.3 Oct 24, 2024
1.26.2 Oct 24, 2024
1.26.1 Oct 23, 2024
1.26.0 Oct 07, 2024
1.25.0 Oct 01, 2024
1.24.6 Sep 16, 2024
1.24.5 Sep 04, 2024
1.24.4 Sep 03, 2024
1.24.3 Aug 30, 2024
1.24.2 Aug 30, 2024
1.24.1 Aug 23, 2024
1.24.0 Aug 23, 2024
1.23.7 Aug 22, 2024
1.23.6 Jul 31, 2024
1.23.5 Jul 25, 2024
1.23.4 Jul 25, 2024
1.23.3 Jul 22, 2024
1.23.2 Jul 10, 2024
1.23.1 Jul 05, 2024
1.23.0 Jul 05, 2024
1.22.9 Jun 22, 2024
1.22.8 Jun 21, 2024
1.22.7 Jun 12, 2024
1.22.6 Jun 12, 2024
1.22.5 Jun 12, 2024
1.22.4 Jun 10, 2024
1.22.3 Jun 07, 2024
1.22.2 Jun 07, 2024
1.22.0 Jun 03, 2024
1.21.0 Apr 30, 2024
1.20.10 Apr 23, 2024
1.20.9 Apr 16, 2024
1.20.8 Apr 12, 2024
1.20.7 Apr 09, 2024
1.20.6 Apr 09, 2024
1.20.5 Apr 09, 2024
1.20.4 Apr 04, 2024
1.20.3 Apr 02, 2024
1.20.2 Apr 02, 2024
1.20.1 Apr 01, 2024
1.20.0 Apr 01, 2024
1.19.0 Mar 01, 2024
1.18.2 Feb 08, 2024
1.18.1 Feb 05, 2024
1.18.0 Feb 01, 2024
1.17.2 Jan 19, 2024
1.17.1 Jan 12, 2024
1.17.0 Jan 03, 2024
1.16.26 Dec 27, 2023
1.16.25 Dec 13, 2023
1.16.24 Dec 08, 2023
1.16.23 Nov 06, 2023
1.16.22 Nov 01, 2023
1.16.21 Oct 27, 2023
1.16.20 Oct 16, 2023
1.16.19 Oct 12, 2023
1.16.18 Oct 09, 2023
1.16.17 Oct 02, 2023
1.16.15 Sep 27, 2023
1.16.14 Sep 25, 2023
1.16.13 Sep 23, 2023
1.16.12 Sep 18, 2023
1.16.11 Sep 06, 2023
1.16.10 Sep 01, 2023
1.16.9 Aug 30, 2023
1.16.8 Aug 21, 2023
1.16.7 Aug 21, 2023
1.16.6 Aug 18, 2023
1.16.5 Aug 14, 2023
1.16.4 Aug 12, 2023
1.16.3 Aug 09, 2023
1.16.2 Aug 01, 2023
1.16.1 Jul 14, 2023
1.16.0 Jul 10, 2023
1.15.10 Jul 03, 2023
1.15.9 Jun 30, 2023
1.15.8 Jun 29, 2023
1.15.7 Jun 26, 2023
1.15.6 Jun 26, 2023
1.15.5 Jun 22, 2023
1.15.4 Jun 22, 2023
1.15.3 Jun 21, 2023
1.15.2 Jun 20, 2023
1.15.1 Jun 19, 2023
1.15.0 Jun 08, 2023
1.14.12 Jun 02, 2023
1.14.11 May 22, 2023
1.14.10 May 19, 2023
1.14.9 May 03, 2023
1.14.8 Apr 19, 2023
1.14.7 Apr 19, 2023
1.14.6 Apr 13, 2023
1.14.5 Apr 04, 2023
1.14.4 Apr 03, 2023
1.14.3 Mar 23, 2023
1.14.2 Mar 22, 2023
1.14.1 Mar 22, 2023
1.14.0 Mar 22, 2023
1.13.26 Mar 16, 2023
1.13.25 Mar 16, 2023
1.13.24 Mar 16, 2023
1.13.23 Mar 14, 2023
1.13.22 Mar 13, 2023
1.13.21 Mar 13, 2023
1.13.20 Mar 09, 2023
No dependencies