Skip to main content
The 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):
JSON (default in pipes):
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.
CSV:

build

Build a dictionary database from corpus files.

Usage

Options

Examples

Build Process

  1. Ingestion: Read and parse input files
  2. Segmentation: Break text into syllables and words
  3. Frequency Calculation: Count occurrences and N-grams
  4. POS Tagging: Tag words with part-of-speech (if enabled)
  5. Enrichment: Mine confusable pairs, compounds, collocations, register tags (unless --no-enrich)
  6. 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:
  1. Path specified with --config flag
  2. Current directory: myspellchecker.yaml, myspellchecker.yml, or myspellchecker.json
  3. 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 the MYSPELL_ 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