cspell

A fast, self-contained command-line spell checker built for source code and documentation.

Tool
npm
v10.2.2
1,682stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
89/100Excellent
Development Activity100
Maintenance96
Community60
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
84/100Excellent
Architecture85
Code Quality88
Innovation72
Learning Curve90

cspell is a command-line tool and library for spell checking source code. Instead of matching raw text against a dictionary, it parses code into words first, splitting camelCase, snake_case, and compound identifiers apart, so it can catch typos in variable names, comments, and strings without flooding you with false positives on ordinary code constructs.

It ships with no external OS-level dependencies (no Hunspell or aspell) and bundles a large family of built-in dictionaries for languages, frameworks, and file formats — JavaScript, TypeScript, Python, PHP, C#, C++, LaTeX, Go, HTML, CSS, and more. It’s built to run as a linter in CI pipelines and pre-commit hooks, or interactively via the companion Code Spell Checker extension for Visual Studio Code.

What You Get

  • A cspell CLI with lint, trace, check, suggest, init, link, and dictionaries subcommands, driven by Commander
  • Camel-case, snake_case, and compound-word aware tokenization so identifiers are split into real words before checking
  • Dozens of bundled, curated dictionaries for programming languages, frameworks, and common file formats
  • Glob-based and gitignore-aware file selection so large repos can be checked selectively and quickly
  • A worker-thread based checking pipeline for parallel processing of many files
  • A --cache mode with content or metadata cache strategies to speed up repeat CI runs
  • A programmatic API (lint, trace, checkText) for embedding spell checking in other tools

Common Use Cases

  • Adding a spelling lint step to CI so typos in code, comments, and docs fail the build
  • Running as a pre-commit hook to catch misspelled identifiers and strings before they’re committed
  • Checking documentation and README files for spelling errors alongside source code
  • Powering the Code Spell Checker VS Code extension for real-time in-editor spell checking
  • Auditing changed files only via git diff --name-only | npx cspell --file-list stdin in pull requests

Under The Hood

Architecture cspell is a pnpm-workspace monorepo where the published cspell package (packages/cspell) is a thin CLI/API layer: app.mts wires Commander-based subcommands (lint, trace, check, suggest, init, link, dictionaries) which delegate to cspell-lib for settings merging, tokenization, and dictionary lookup. Supporting workspace packages — cspell-dictionary, cspell-glob, cspell-io, cspell-gitignore, cspell-config-lib — handle globbing, gitignore-aware traversal, config-file resolution, and file IO, while cspell-worker offloads per-file checking to worker threads for parallelism, coordinated through lint/processFiles.ts and lint/processFile.ts. Because every bundled dictionary is built around a shared trie format consumed through cspell-dictionary, that abstraction is the one piece the rest of the pipeline is most tightly coupled to.

Tech Stack The codebase is TypeScript throughout, targeting Node 22.18+, built with tsdown and tsc for dual ESM/CJS output. The CLI layer uses Commander for argument parsing and chalk/chalk-template for terminal output, with semver for engine checks and tinyglobby for globbing. A large family of @cspell/dict-* dictionary packages plus cspell-lib form the checking core. pnpm workspaces coordinate the monorepo, Vitest is the test runner, and ESLint plus Prettier enforce style, with GitHub Actions running test, lint, coverage, and CodeQL workflows.

Code Quality Vitest test files sit alongside source throughout src/ — commands, the application layer, lint pipeline, worker, and link modules all have companion .test.ts files, several backed by __snapshots__ directories for snapshot-based CLI output testing. The codebase is fully typed TypeScript with a dedicated cspell-types package for shared type definitions, internal dependencies are consumed as workspace:* packages rather than copy-pasted, and errors are surfaced through a dedicated ApplicationError/CheckFailed module rather than swallowed. CI runs ESLint, Prettier, CodeQL, and coverage collection on every push.

What Makes It Unique cspell doesn’t wrap an existing spell-checking engine like Hunspell or aspell — it implements its own tokenizer that understands programming-language identifier conventions (camelCase, snake_case, compound words) so it can spell-check variable and function names directly, paired with an extensive, curated set of per-language and per-framework dictionaries and a suggestion engine that proposes fixes using edit-distance and compound-word splitting. The novelty is less a single clever algorithm and more a comprehensive, actively maintained domain-specific dictionary and tokenization system that few alternatives match in coverage.

Used by 10 apps in this directory

TypeScript
92%
MIT

AI Engineer Coach

Developer Tools

3,753

A VS Code extension that reads your local AI coding session logs and turns them into actionable insights — anti-pattern detection across 45 rules, output tracking by model and harness, and skill discovery, with no data leaving your machine.

View details
68
Repo Health
70
Technical
81
Dependency
Built with
TypeScript92%
Updated 2 days ago
Python
56%
Other

authentik

Authentication · Security

25,385

The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.

View details
92
Repo Health
81
Technical
66
Dependency
Built with
Python56%
TypeScript34%
Updated yesterday
Go
54%
Apache 2.0

Authgear

Authentication

2,028

Open-source, self-hostable authentication platform with passkeys, biometric login, SSO, MFA, and GraphQL admin API — a full Auth0/Clerk/Firebase alternative for SaaS and mobile apps.

View details
88
Repo Health
81
Technical
68
Dependency
Built with
Go54%
HTML25%
TypeScript18%
Updated 3 days ago
TypeScript
45%
Other

Convex Backend

Developer Tools · Databases

12,494

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript45%
Rust43%
Updated 2 days ago
TypeScript
75%
Apache 2.0

Fern

Developer Tools

3,772

Fern turns a single OpenAPI, AsyncAPI, or Protobuf definition into type-safe SDKs for nine languages and a hosted API documentation site, all from one CLI and one source of truth.

View details
90
Repo Health
86
Technical
66
Dependency
Built with
TypeScript75%
Updated yesterday
TypeScript
76%
Other

Joplin

Note Taking

56,257

The privacy-first, open-source note-taking app with end-to-end encrypted sync, AI assistance, and a powerful plugin ecosystem across every platform.

View details
93
Repo Health
87
Technical
61
Dependency
Built with
TypeScript76%
JavaScript14%
Updated yesterday
TypeScript
64%
Other

NocoDB

No Code Platforms · Databases · Low Code Platforms

64,861

Turn any SQL database into a collaborative no-code spreadsheet with automatic REST APIs and real-time views.

View details
90
Repo Health
77
Technical
62
Dependency
Built with
TypeScript64%
Vue31%
Updated 2 days ago
Rust
77%
AGPL 3.0

Spacedrive

File Storage · Collaboration

38,913

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
58
Repo Health
84
Technical
64
Dependency
Built with
Rust77%
TypeScript20%
Updated 1 months ago
Go
75%
AGPL 3.0

Teleport

Security · Authentication

20,888

Zero-trust infrastructure access platform that replaces credentials and VPNs with short-lived certificates, SSO, and identity-aware proxies for SSH, Kubernetes, databases, RDP, and AI agents.

View details
94
Repo Health
81
Technical
68
Dependency
Built with
Go75%
TypeScript16%
Updated 4 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search