myspellchecker CLI is installed with the package and provides commands for checking text, building dictionaries, training AI models, segmenting text, and managing configuration.
Installation
The CLI is installed automatically with the package:Commands Overview
check
Check text for spelling errors. This is the default command: if no subcommand is recognized,check is assumed.
Usage
Arguments
Options
Note:
--color and --no-color are mutually exclusive.
Examples
Output Formats
Rich (default in terminal): Colored, formatted output with panels and tables using the Rich library. Auto-selected when running in an interactive terminal. Text (grep-like):Additional fields appear in each error object depending on the error type:
action and message for syllable errors, syllable_count for word errors, and probability and prev_word for context errors.build
Build a dictionary database from corpus files.Usage
Options
Examples
Build Process
- Ingestion: Read and parse input files
- Segmentation: Break text into syllables and words
- Frequency Calculation: Count occurrences and N-grams
- POS Tagging: Tag words with part-of-speech (if enabled)
- Enrichment: Mine confusable pairs, compounds, collocations, register tags (unless
--no-enrich) - Packaging: Create optimized SQLite database
train-model
Train semantic models for context checking.Usage
Options
Architectures
Examples
segment
Segment text into words and optionally tag with POS.Usage
Options
Examples
Output
Word mode with tags:config
Manage configuration files.Usage
Subcommands
config init Options
Examples
Configuration File Locations
Configuration files are searched in this order:- Path specified with
--configflag - Current directory:
myspellchecker.yaml,myspellchecker.yml, ormyspellchecker.json - User config directory:
~/.config/myspellchecker/myspellchecker.{yaml,yml,json}
infer-pos
Infer POS tags for untagged words in the database using a rule-based engine.Usage
Options
Inference Sources
Examples
completion
Generate shell completion scripts.Usage
Options
Examples
Global Options
Available for all commands:
Note:
--verbose/-v is available on most subcommands (check, build, segment, infer-pos) but is defined per-subcommand, not globally.
Exit Codes
Configuration File
Create~/.config/myspellchecker/myspellchecker.yaml:
Environment Variables
All environment variables use theMYSPELL_ prefix. They override config file values but are overridden by CLI flags.
Core Settings
POS Tagger Settings
Provider Settings
Semantic Checker Settings
SymSpell Settings
N-gram Context Settings
Phonetic Settings
Ranker Settings
Next Steps
- Configuration - Full configuration options
- Data Pipeline - Building dictionaries
- API Reference - Python API