Metadata-Version: 2.4
Name: ocrhero
Version: 0.1.0
Summary: OCR Hero CLI — AI-powered OCR for math, science, and technical documents
Home-page: https://ocrhero.com
Author: OCR Hero
Author-email: support@ocrhero.com
Project-URL: Documentation, https://ocrhero.com/developers
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Requires-Dist: click>=8.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# OCR Hero CLI

AI-powered OCR for math, science, and technical documents — from the command line.

## Install

```bash
pip install ocrhero
```

## Quick Start

```bash
# 1. Get your API key at https://ocrhero.com/developers
# 2. Login
ocrhero login --api-key ocrhero_sk_your_key_here

# 3. Process a single document
ocrhero process -i document.pdf -o output/

# 4. Batch process a folder
ocrhero batch -i ./documents/ -o ./results/
```

## Commands

| Command | Description |
|---------|-------------|
| `ocrhero login --api-key KEY` | Save your API key |
| `ocrhero logout` | Remove saved API key |
| `ocrhero whoami` | Check authentication status |
| `ocrhero process -i FILE` | Process a single document |
| `ocrhero batch -i DIR` | Batch process all files in a folder |
| `ocrhero jobs` | List recent processing jobs |

## Options

```bash
# Output as Markdown only
ocrhero batch -i ./documents/ -o ./results/ -f md

# Output as Word document only
ocrhero batch -i ./documents/ -o ./results/ -f docx

# Both Markdown and Word (default)
ocrhero batch -i ./documents/ -o ./results/ -f both

# Merge all results into one file
ocrhero batch -i ./documents/ -o ./results/ --merge
```

| Option | Values | Default | Description |
|--------|--------|---------|-------------|
| `-i, --input` | file or directory | required | Input file or folder |
| `-o, --output` | directory | `.` or `./results` | Output directory |
| `-f, --format` | md, docx, both | both | Output format |
| `--merge` | flag | off | Merge all results into one file |

## Environment Variables

| Variable | Description |
|----------|-------------|
| `OCRHERO_API_KEY` | API key (overrides saved config) |
| `OCRHERO_API_URL` | Custom API URL |

## Supported Formats

PDF, JPG, JPEG, PNG, BMP, TIFF

## Python SDK

```python
from ocrhero.client import OCRHeroClient

client = OCRHeroClient(api_key="ocrhero_sk_...")

# Process and get result
result = client.process_and_wait("document.pdf")
print(result["text"])

# Download DOCX
job = client.process("document.pdf")
client.wait_for_completion(job["job_id"])
client.download_docx(job["job_id"], "output.docx")
```

## Links

- Website: https://ocrhero.com
- Developers: https://ocrhero.com/developers
- Support: support@ocrhero.com
