Skip to content

greatide/ssh-speller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssh-speller

ssh-speller is a dependency-free SSH-friendly spell checker for terminals, Codex, Claude Code, and other CLI AI coding tools. It uses Hunspell or Aspell so people can use existing language dictionaries instead of rebuilding a spell-check engine for every language.

The CLI is a dependency-free Go program. Build one native binary for each server OS/architecture you need, copy it to the SSH server, and run it through SSH. The spell-check engine is the server's installed Hunspell or Aspell, so language support comes from normal system dictionary packages instead of custom dictionaries inside this project.

The primary goal is to help dyslexic developers and anyone who wants spelling support while working inside SSH sessions, terminal prompts, and AI coding CLIs.

AI CLI Integrations

Optional integrations are included for AI coding assistants:

  • Claude Code: integrations/claude
  • Codex: integrations/codex

The core spell checker remains a normal CLI, so other tools can integrate by passing text through stdin or by using a small hook that calls ssh-speller.

Install

After the public repository is created:

go install github.com/greatide/ssh-speller/cmd/ssh-speller@latest

Server-Side SSH Use

Build it:

go build -o ssh-speller ./cmd/ssh-speller

For another server OS or CPU, cross-compile with Go's standard environment variables:

GOOS=linux GOARCH=amd64 go build -o ssh-speller-linux-amd64 ./cmd/ssh-speller
GOOS=linux GOARCH=arm64 go build -o ssh-speller-linux-arm64 ./cmd/ssh-speller
GOOS=windows GOARCH=amd64 go build -o ssh-speller.exe ./cmd/ssh-speller

Copy the binary to the server, then run it with stdin:

ssh user@example.com '/usr/local/bin/ssh-speller' < notes.txt

Examples

Check stdin:

echo "Ths host has recieve errors" | ssh-speller

Check inline while typing in the SSH terminal:

ssh-speller --live

In live mode, type normally and misspelled words are underlined in red. Press Enter to start a new line, or Ctrl+D / Ctrl+C to exit.

Check a local file:

ssh-speller --file README.md

Check a server file:

ssh user@example.com '/usr/local/bin/ssh-speller --file /etc/motd'

Ignore project-specific words:

ssh-speller --word ssh --word prod-web --file notes.txt

Claude Code Hook

ssh-speller can run as an optional Claude Code UserPromptSubmit hook. Claude Code passes the submitted prompt as JSON on stdin, and ssh-speller returns spelling suggestions as additional context before Claude processes the prompt.

Install the binary somewhere on PATH, then copy the example hook config:

mkdir -p ~/.claude
cp integrations/claude/settings.example.json ~/.claude/settings.json

The default hook does not block your prompt. It adds spelling suggestions to Claude's context when misspellings are found.

To make Claude Code stop and ask you to resend a corrected prompt instead, use the blocking example:

cp integrations/claude/settings.block.example.json ~/.claude/settings.json

The hook command can also be tested directly:

printf '{"hook_event_name":"UserPromptSubmit","prompt":"Ths has a problm"}' | ssh-speller claude-hook

Codex Addon

Codex integration files live in integrations/codex. They package ssh-speller as a plugin-style addon with a Codex skill that tells Codex how to run the CLI against prompt text, terminal text, or files.

The plugin root is:

integrations/codex/ssh-speller

An example marketplace entry is available at:

integrations/codex/marketplace.example.json

Prompt-level inline spell checking in Codex depends on Codex exposing a prompt hook in the installed version. Until then, the Codex addon provides a discoverable, documented way for Codex users to invoke ssh-speller.

Exit Codes

  • 0: no misspellings found
  • 1: misspellings found
  • 2: command, SSH, or input error

Dictionary

By default, ssh-speller uses a real spell-check engine:

  1. Hunspell, when hunspell is installed.
  2. Aspell, when aspell is installed.

If neither is installed, it exits with an error telling you to install one. That keeps the checker language-neutral and avoids maintaining a fake dictionary per language.

Use installed language dictionaries with --lang:

ssh user@example.com '/usr/local/bin/ssh-speller --lang en_US' < notes.txt
ssh user@example.com '/usr/local/bin/ssh-speller --lang de_DE' < notes.txt

This means the tool does not need its own dictionary for each language. Install the normal Hunspell or Aspell dictionary packages on the SSH server and select them with --lang.

License

MIT. See LICENSE.

About

Spell checker for SSH terminals, Codex, Claude Code, and CLI AI coders using Hunspell or Aspell.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages