Skip to content

CLI reference

Terminal window
sceptre <COMMAND>
Flag Description
--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]
Flag Description
<IMAGES>... One or more image paths (required).
--format <text|json> Output format. Default text.
--no-detail Emit only the recognized text, omitting confidence and box detail.
--timings Print 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]
Flag Description
<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]
Flag Description
<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]
Flag Description
--all Cover every supported language instead of the configured ones. Conflicts with --lang.
--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.

Languages default to [english], so a bare sceptre models download fetches only CRAFT and english_g2. Use --all to pre-seed the complete set — see Offline and CI.

Report the runtime the current configuration would execute on: sceptre version, OS and arch, the selected backend, the requested and actually-registered accelerator, and — for the ort backend — the ONNX Runtime provisioning strategy (bundled, dynamic, or system), ORT_DYLIB_PATH when set, and the runtime’s build-info string and version.

Terminal window
sceptre env
sceptre env --format json
Flag Description
--format <text|json> Output format. Default text.

Plus the shared overrides--backend and --accelerator in particular, to ask what a given selection would actually resolve to before committing a run to it. This is the environment record that belongs alongside any parity or benchmark artifact.

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):

Flag Description
--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. The backend must be compiled in — tract and candle need the CLI’s matching feature, neither of which is in the default set.
--accelerator <ACCELERATOR> Hardware the backend runs on: cpu (default), auto, coreml, directml, metal, or cuda. Which ones a backend accepts differs — ort takes coreml/directml/cuda, candle takes metal/cuda, tract is CPU-only. An explicitly requested one that cannot be used is a hard error, not a silent fall back to CPU; only auto falls back. See Backends.
--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.