This release is a pre-release and may not be stable for production use.
Mistral OCR CLI
Modern, polished CLI to extract text from PDFs using the Mistral OCR API.
Features
- Elegant TUI with progress bars and rich output
- Single file or batch processing
- Output in text, JSON, or Markdown
- Parallel batch processing with
--jobs - Config helper and
.envsupport
Quickstart
- Install
uv tool install mistral-ocr-cli # via pipx-like tool install
# or
uv pip install mistral-ocr-cli # into current environment
- Configure API key
export MISTRAL_API_KEY=your_key_here
# or
echo "MISTRAL_API_KEY=your_key_here" >> .env
- Extract text
ocr extract file.pdf -o out.txt
ocr extract file1.pdf file2.pdf --batch --output-dir outputs --jobs 4
Usage
ocr extract [OPTIONS] FILES...
Options:
-o, --output PATH Output file (single-file mode)
-f, --format [text|json|markdown]
-b, --batch Enable batch mode
-O, --output-dir PATH Directory for batch outputs
-j, --jobs INTEGER RANGE Parallel jobs for batch [default: 1]
-v, --verbose Verbose logs
-q, --quiet Only errors
--version Show version
--help Show help
Programmatic use
from ocr.pdf2text import pdf_to_text
text = pdf_to_text("/path/file.pdf")
Development
uv pip install -e .[dev]
uv run pre-commit install
uv run pytest -q
Releasing is handled via standard tags and GitHub Releases.
License
MIT
Test coverage
# Terminal report
make coverage
# HTML report in htmlcov/
make coverhtml
Metadata
Release files for upspawn-ocr-cli 0.1.0b4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| upspawn_ocr_cli-0.1.0b4.tar.gz | 14.1 kB | Without provenance | Details for upspawn_ocr_cli-0.1.0b4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| upspawn_ocr_cli-0.1.0b4-py3-none-any.whl | Python 3 | none | any | Details for upspawn_ocr_cli-0.1.0b4-py3-none-any.whl |
Total release size: 24.6 kB
Release files / upspawn_ocr_cli-0.1.0b4.tar.gz
| Download URL | upspawn_ocr_cli-0.1.0b4.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1523557c27256f324146a437bb428e1f225e71ffd68cd2da7159a54ccc841407
|
|
BLAKE2b-256 checksum How to use checksums |
07cb212b9a8f41da3de5baa3187281e05851c5239f063f53c9b7180cf182e2c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / upspawn_ocr_cli-0.1.0b4-py3-none-any.whl
| Download URL | upspawn_ocr_cli-0.1.0b4-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e70bae6bc212b885c79684fe0a07192f6e0b104db1fe5086190a40e918e9ddc5
|
|
BLAKE2b-256 checksum How to use checksums |
e7075817618e71c8cd0dd39178efb7ac1cbdf0b05de3ec4be4854829fb1bfa4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for upspawn-ocr-cli 0.1.0b4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.