image2text
/install image2text
image2text
Extract text from images without needing a vision-capable AI model.
Usage
python3 scripts/ocr.py \x3Cimage path|URL|base64> [--lang \x3Clanguages>] [--psm \x3Cmode>] [--raw]
Parameters
--lang: Language codes, comma-separated, defaultchi_sim+engchi_simSimplified Chinese |chi_traTraditional |engEnglish |jpnJapanese |korKorean | and 30+ more- Combine:
chi_sim+eng
--psm: Page segmentation mode, default63Fully automatic |6Block-level |4Single line |11Sparse text
--raw: Output plain text only, no markers
Auto-Detects Input Type
- Local path:
/Users/xxx/Downloads/xxx.png - Web URL:
https://example.com/image.png— OSS temp links work too - Base64: Pasted image data from clipboard — just paste directly
Workflow
- Receive image input → auto-detect type (local path / URL / base64)
- URL → curl downloads to temp file
- Base64 → decode to temp file
- Run tesseract OCR
- Output plain text
Examples
OCR a Chinese receipt:
python3 scripts/ocr.py ~/Downloads/receipt.png --lang chi_sim
English + Chinese mixed:
python3 scripts/ocr.py https://example.com/doc.jpg --lang chi_sim+eng
Plain text only (no markers):
python3 scripts/ocr.py /path/to/image.png --raw
Requirements
- tesseract must be installed:
brew install tesseract - Language packs auto-installed with tesseract
- On Mac: binary at
/opt/homebrew/bin/tesseract - Temp files auto-deleted after execution
- For best accuracy on receipts/screenshots: try
--psm 3
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install image2text - After installation, invoke the skill by name or use
/image2text - Provide required inputs per the skill's parameter spec and get structured output
What is image2text?
Extract text from images using tesseract OCR, supporting local files, URLs, and base64 inputs for text-only AI models without vision capability. It is an AI Agent Skill for Claude Code / OpenClaw, with 86 downloads so far.
How do I install image2text?
Run "/install image2text" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is image2text free?
Yes, image2text is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does image2text support?
image2text is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created image2text?
It is built and maintained by caiming0331 (@caiming0331); the current version is v1.0.0.