Skip to content

CLI reference

Terminal window
sceptre <COMMAND>
FlagDescription
--log-level <LEVEL>error, warn, info, debug, or trace. Default warn. Also settable via the EASYOCR_LOG environment variable. Logs go to stderr.

Run the full OCR pipeline over one or more images. A single Reader is built once and reused across every image passed.

Terminal window
sceptre run <IMAGES>... [OPTIONS]
FlagDescription
<IMAGES>...One or more image paths (required).
--format <text|json>Output format. Default text.
--no-detailEmit only the recognized text, omitting confidence and box detail.
--timingsPrint a per-stage (load/detect/recognize) timing breakdown to stderr.

Plus the shared overrides below.

A single image keeps the historical single-result output. Two or more images switch to batch rendering: a per-image failure is recorded in the output (and logged to stderr) and the run continues over the remaining images, exiting non-zero if any image failed.

Detect text regions only, without recognition. Prints each region’s quadrilateral.

Terminal window
sceptre detect <IMAGE> [OPTIONS]
FlagDescription
<IMAGE>Path to the input image (required).
--format <text|json>Output format. Default text.

Plus the shared overrides.

Recognize text in a single, pre-cropped line image, skipping detection.

Terminal window
sceptre recognize <IMAGE> [OPTIONS]
FlagDescription
<IMAGE>Path to the cropped line image (required).
--format <text|json>Output format. Default text.

Plus the shared overrides.

List or download the models required by the current configuration.

Terminal window
sceptre models list [OPTIONS]
sceptre models download [OPTIONS]
FlagDescription
--format <text|json>Output format. Default text.

Plus the shared overrides (notably --lang, to select which recognizers are listed or fetched).

list inspects the cache without touching the network. download fetches any missing model (requires the download feature) and reports the resulting manifest.

Print shell completions to stdout.

Terminal window
sceptre completions <SHELL>

<SHELL> is any shell supported by clap_complete (e.g. bash, zsh, fish, powershell).

Run the MCP stdio server (requires the CLI built with the mcp feature).

Terminal window
sceptre mcp [OPTIONS]

Takes only the shared overrides — there is no --format (the MCP transport shapes its own responses). See the MCP server guide.

These flags are available on every subcommand above and layer on top of the loaded OcrConfig (see Configuration for precedence):

FlagDescription
--lang <LANG>Recognition language, repeatable (e.g. --lang english --lang korean). One of english, latin, chinese-simplified, japanese, korean, cyrillic, telugu, kannada.
--threads <N>Maximum worker threads.
--backend <BACKEND>Inference backend: ort, tract, or candle.
--text-threshold <FLOAT>Detection text-confidence threshold, 0.01.0.
--link-threshold <FLOAT>Detection link-confidence threshold, 0.01.0.
--canvas-size <PX>Detection canvas size (longest side, in px). Lower cuts peak memory and detection time on large pages at some accuracy cost; the default (2560) matches EasyOCR.

--text-threshold and --link-threshold are validated at parse time — out-of-range or non-numeric values fail immediately with a clear error, rather than reaching the engine.

  • Success: exit code 0.
  • A single-image run, detect, or recognize failure: non-zero exit, error printed to stderr.
  • A batch run (2+ images): the run continues past per-image failures; exit is non-zero if any image failed, with each failure recorded in the structured output as well as logged to stderr.