GoodMem
ReferenceCLI

Ocr

Ocr CLI command reference

goodmem ocr

Run OCR on a document or image

Synopsis

Run layout-aware OCR against a document or image and return a structured response.

Input can be provided from a file or via stdin. By default the response is emitted as JSON.

goodmem ocr [flags]

Examples

  # OCR a PDF and emit JSON
  goodmem ocr --file document.pdf

  # OCR a TIFF and request markdown output
  goodmem ocr --file scans.tiff --format markdown

  # Pipe input via stdin
  cat document.pdf | goodmem ocr --input-format pdf --format json

Options

      --end-page int          0-based inclusive end page
      --file string           Path to input file (use - to read from stdin)
      --format string         Output format: json or markdown (default "json")
  -h, --help                  help for ocr
      --include-markdown      Include markdown rendering in response
      --include-raw-json      Include raw OCR JSON payload
      --input-format string   Input format: auto, pdf, tiff, png, jpeg, bmp (default "auto")
      --markdown-raw          Disable markdown formatting and emit raw OCR output
      --markdown-width int    Wrap markdown output to N columns (0 disables wrapping) (default 80)
  -o, --output string         Write output to file (default stdout)
      --start-page int        0-based inclusive start page
      --timeout duration      Request timeout (0 for no timeout) (default 2m0s)

Options inherited from parent commands

      --api-key string   API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
      --server string    GoodMem server address (gRPC API) (default "https://localhost:9090")

SEE ALSO

  • goodmem - GoodMem CLI provides command-line access to memory APIs