ko·to·shu 言修 n.
The fixing and embellishing of words.
A spell checker for everything you write — terminal, editor, CI. Pure Ruby underneath; the right dictionary and language model arrive on demand, and nothing ever downloads without your say-so.
Client + wasm engine
npm install @kotoshu/client @kotoshu/wasm実演See it work
Misspellings, surfaced and mended
A small taste of the interactive experience — the editor extension and CLI do this against the full engine, live.
Click a wavy word to see ranked suggestions, then a chip to apply the fix.
No install at all? The playground runs the engine itself in your browser — or point one at your own server.
使う人Who it's for
One engine, many hands
Five audiences, five entry points — from a Ruby API to a one-line GitHub Action.
Ruby developers
A spell checker that behaves like a Ruby gem
gem install kotoshu
文Writers & editors
Squiggles and one-keystroke fixes, in your editor
gem install kotoshu-lsp
検Maintainers & CI
Spell checks that fail the build — nicely
uses: kotoshu/action-kotoshu@v2
橋Non-Ruby teams
One HTTP service, every language ecosystem
gem install kotoshu-server # or docker run ghcr.io/kotoshu/ci
言葉Multilingual writers
Every language you write, resolved on demand
gem install kotoshu
生態系The ecosystem
A gem at the center, a ring of surfaces around it
Every surface is a thin adapter over the same engine — nothing duplicates the checking logic.
kotoshu
liveThe core spell checker
Pure-Ruby, Hunspell-compatible spell checking with affix morphology, frequency-ranked suggestions, and an optional FastText/ONNX semantic layer. Two-stage resources: explicit setup, cache-only hot path.
kotoshu-lsp
liveLanguage Server Protocol server
Inline squiggles, quick-fixes, and hover suggestions in every LSP-capable editor — VS Code, Neovim, Emacs (lsp-mode / eglot), JetBrains, Helix, Zed. Diagnostics carry ranked suggestions as code actions.
kotoshu-server
liveSelf-hostable HTTP API
A Sinatra/Puma service exposing /v1/check, /v1/suggest, /v1/detect over JSON, with an OpenAPI 3.1 spec and a Docker image. The deployment surface for every non-Ruby SDK.
action-kotoshu
liveGitHub Action
One line to spell-check a repo in CI: caches dictionaries between runs, runs kotoshu check, uploads SARIF to the GitHub Security tab. Tagged v1.
言葉What's supported
36 languages fully featured, ninety-eight staged
Full feature means spelling with affixes, semantic reranking, and keyboard-aware suggestions — frequency ranking rides along where Kelly data exists.
see also zh — frequency tiers only
36
full feature
98
dictionaries staged
176
auto-detected
思想Principles
How Kotoshu is built
Pure Ruby
No shelling out to hunspell or aspell. The only native dependency is the optional onnxruntime — everything else is Ruby that ships in the gem.
Two-stage resources
Setup is explicit and downloads once; the hot path is cache-only and raises instead of ever touching the network. Metered and air-gapped hosts are safe.
Semantic when you want it
FastText embeddings via ONNX rerank candidates by context and rescue out-of-vocabulary words. Install onnxruntime to enable; everything works without it.
Every language, on demand
Given any text, Kotoshu detects the language and resolves the dictionary, frequency list, and model it needs — cached, verified, with TTLs.