cspell

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

Tool
npm
v10.3.5
1,688 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
89 /100 Excellent
Development Activity 100
Maintenance 96
Community 60
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
84 /100 Excellent
Architecture 85
Code Quality 88
Innovation 72
Learning Curve 90

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

4,297

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
69
Repo Health
70
Technical
82
Dependency
Built with
TypeScript 92%
Updated 1 weeks ago
Python
55%
Other

authentik

Authentication · Security

25,758

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
Python 55%
TypeScript 36%
Updated 4 days ago
Go
55%
Apache 2.0

Authgear

Authentication

2,074

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
Go 55%
HTML 24%
TypeScript 18%
Updated 1 weeks ago
TypeScript
45%
Other

Convex Backend

Databases · Developer Tools

12,617

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
TypeScript 45%
Rust 43%
Updated 6 days ago
TypeScript
75%
Apache 2.0

Fern

Developer Tools

3,787

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
TypeScript 75%
Updated 4 days ago
TypeScript
77%
Other

Joplin

Note Taking

56,513

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
60
Dependency
Built with
TypeScript 77%
JavaScript 14%
Updated 5 days ago
TypeScript
65%
Other

NocoDB

Databases · Low Code Platforms · No Code Platforms

65,098

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
TypeScript 65%
Vue 30%
Updated 6 days ago
Rust
77%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,041

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

View details
56
Repo Health
84
Technical
63
Dependency
Built with
Rust 77%
TypeScript 20%
Updated 2 months ago
Go
75%
AGPL 3.0

Teleport

Authentication · Security

20,950

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
93
Repo Health
81
Technical
68
Dependency
Built with
Go 75%
TypeScript 16%
Updated 2 weeks 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