Skip to content
Kotoshu Kotoshu 言修

Documentation

Documentation

Kotoshu documentation index — Ruby API, CLI reference, configuration, caching, plugins, migration, and tool comparison.

Guides and reference for the Kotoshu engine on every channel — the Ruby gem and CLI, the Python, JavaScript, Rust, and Go clients, the HTTP server, the editor LSP, and the GitHub Action.

Clients & channels

Eight ways in, one engine

Whatever you install talks to the same checking core. Each channel page carries an install command, a quick start that was actually executed, and the capability notes — what is native, what goes over the wire. Start from the channel catalog if you are not sure which is yours.

Python client

pip install kotoshu — the HTTP client, plus the kotoshu-native wheel for offline checking in-process.

JavaScript client

npm install @kotoshu/client — typed HTTP client and the @kotoshu/wasm engine for Node, Deno, Bun, and browsers.

Rust engine

cargo add kotoshu — the engine itself: dictionaries, ranked suggest, the KOSH batch ABI, the models registry.

Go client

go get kotoshu-go — context-aware check, suggest, detect, correct over the HTTP API.

HTTP API server

Seven JSON endpoints over Rack and Puma — the contract every SDK speaks, with an OpenAPI 3.1 spec.

Editor (LSP)

gem install kotoshu-lsp — diagnostics, quick-fixes, and hover suggestions in Neovim, VS Code, Emacs.

GitHub Action

kotoshu/action-kotoshu@v2 — directory mode, CI baselines, and SARIF in the Security tab, with dictionaries cached between runs.

Reference

The gem, documented

The Ruby gem has a deliberately small surface: one facade module, one CLI, three caches. These pages document each piece as it exists today — where something is a roadmap item rather than a feature, the text says so.

Ruby API

The facade module: two-stage resources, checking, suggestions, detection, and the optional semantic path.

CLI reference

check, setup, cache, completions — flags, defaults, stdin, and exit codes.

Kotoshu on Windows

The Ruby versions proven on windows-latest, path handling, soft dependencies, and the native extension’s honest status.

Configuration

Resolution order, KOTOSHU_* environment variables, XDG paths, dictionary types, and the personal dictionary.

Caching

The three resource caches, SHA-256 integrity, TTLs, offline mode, and management commands.

Performance

Measured check and sweep latency per language, tier sizes from the registry, and the tuning knobs that move them.

Plugins

Custom dictionary types, custom suggestion strategies, and document-format plugin gems.

Ignores & baselines

Inline ignore directives, CI baselines that freeze existing spelling debt, and the pre-commit hook.

Integrations

Rails and ActiveModel validation, RSpec matchers, rake kotoshu:check, and a Jekyll build gate — no new dependencies.

Migrating

From hunspell, aspell, cspell, or LanguageTool — what transfers and what does not.

Comparison

An honest feature table next to hunspell, cspell, and LanguageTool.

New here? The install page is the sixty-second path from gem install kotoshu to a checked document. For what changed and when, see the news section; for the complete generated method reference, rubydoc.info/gems/kotoshu.