CLI reference
sceptre <COMMAND>Global options
Section titled “Global options”| 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. |
sceptre run
Section titled “sceptre run”Run the full OCR pipeline over one or more images. A single Reader is built once and reused
across every image passed.
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.
sceptre detect
Section titled “sceptre detect”Detect text regions only, without recognition. Prints each region’s quadrilateral.
sceptre detect <IMAGE> [OPTIONS]| Flag | Description |
|---|---|
<IMAGE> |
Path to the input image (required). |
--format <text|json> |
Output format. Default text. |
Plus the shared overrides.
sceptre recognize
Section titled “sceptre recognize”Recognize text in a single, pre-cropped line image, skipping detection.
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.
sceptre models
Section titled “sceptre models”List or download the models required by the current configuration.
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.
sceptre env
Section titled “sceptre env”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.
sceptre envsceptre 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.
sceptre completions
Section titled “sceptre completions”Print shell completions to stdout.
sceptre completions <SHELL><SHELL> is any shell supported by clap_complete (e.g. bash, zsh, fish, powershell).
sceptre mcp
Section titled “sceptre mcp”Run the MCP stdio server (requires the CLI built with the mcp feature).
sceptre mcp [OPTIONS]Takes only the shared overrides — there is no --format (the MCP transport
shapes its own responses). See the MCP server guide.
Shared overrides
Section titled “Shared overrides”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.0–1.0. |
--link-threshold <FLOAT> |
Detection link-confidence threshold, 0.0–1.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.
Exit behavior
Section titled “Exit behavior”- Success: exit code
0. - A single-image
run,detect, orrecognizefailure: 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.