typos
$ typos Community Low RiskFast Rust spell checker designed specifically for source code, identifiers, comments, and docs without flooding CI with false positives. Outputs structured --format json (NDJSON) findings, previews patches with --diff, and fixes unambiguously safe typos via --write-changes.
brew install typos-cli Scans entire repositories locally in milliseconds; no MCP server needed.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --format json (NDJSON), --diff, --color never, --no-ignore, and clear exit codes (0 clean, 2 typos found).
--format jsonreturns clean NDJSON typo records with candidate replacements--diffand--color neversupport clean previews
Read-only by default; skips ambiguous corrections during --write-changes and offers --diff preview.
- Read-only default and
--diffdry-run preview
Single static Rust binary via Homebrew (typos-cli), Cargo, and GitHub Releases.
- Zero-dependency native binary on macOS, Linux, and Windows
Scans massive monorepos in milliseconds with low false positives by matching known typos rather than dictionary-failing every identifier.
- Identifier-aware CamelCase/snake_case splitting and
.gitignorerespect
Actively maintained by crate-ci (Ed Page) under MIT/Apache-2.0.
- Active
crate-ci/typosrepository
Clear README covering _typos.toml configuration, false-positive exclusions, and CLI flags.
- Official README and
--helpreference
Security, Auth & Guardrails
Offline local source spell checker; no credentials stored or required.
MIT/Apache-2.0 dual-licensed Rust binary; completely free.
# typos Agent Rules - Always run `typos --format json --color never` (or `typos --diff`) before `--write-changes`. - Never run `--write-changes` blindly on public API identifiers without reviewing the diff first.
Agent-Ready Command Recipes
Safe Read-Only Queries
typos --format json --color never
Emits newline-delimited JSON objects with file path, line, typo token, and suggested corrections without editing files.
typos --diff
Displays exact unified diffs of proposed fixes without modifying disk files.
Controlled Writes & Previews
typos --write-changes
Rewrites unambiguous typo corrections across tracked files.
Strengths for Agents
- + Native
--format jsonNDJSON output and--diffpreview make spell-fix automation safe and concise. - + Low false-positive rate and millisecond Rust scan speed across large repositories.
Caveats & Pitfalls
- ! Note the Homebrew formula is
typos-cliwhile the binary istypos. - ! Exits with code
2when typos are detected;--write-changescan rename code identifiers if unreviewed.