CLI
The BiomAPI CLI is a zero-dependency Python script that calls the REST API and formats results for the terminal. It also works as an Agent Skill for Claude Code and Codex CLI, letting AI assistants process biometry reports directly in conversation.
Supported devices
Section titled “Supported devices”| Device | Manufacturer | PK Support |
|---|---|---|
| Aladdin | Topcon | — |
| Anterion | Heidelberg | Yes |
| Argos | Alcon | — |
| EyeStar ES900 | Haag-Streit | Yes |
| IOLMaster 700 | Zeiss | Yes |
| Lenstar LS 900 | Haag-Streit | — |
| MS-39 | CSO | Yes |
| OA-2000 | Tomey | — |
| Pentacam AXL | Oculus | Yes |
PK Support = posterior keratometry extraction for toric IOL formulas.
Installation
Section titled “Installation”Standalone
Section titled “Standalone”Download biomapi.py — no pip, no dependencies, pure Python 3.11+:
python biomapi.py statuspython biomapi.py process report.pdfClaude Code plugin
Section titled “Claude Code plugin”/plugin marketplace add mglraimundo/biomapi-cli/plugin install biomapi-cli@mglraimundo-biomapi-cliCodex CLI
Section titled “Codex CLI”cp -r skills/biomapi ~/.codex/skills/Source repo: mglraimundo/biomapi-cli
Configuration
Section titled “Configuration”Interactive setup (saves to ~/.config/biomapi/config):
python biomapi.py configureOr set directly:
python biomapi.py configure --key biom_your_key_herepython biomapi.py configure --gemini-key AIza_your_keypython biomapi.py configure --showPriority: CLI flags > environment variables (BIOMAPI_KEY, GEMINI_API_KEY) > config file.
Commands
Section titled “Commands”process
Section titled “process”python biomapi.py process report.pdfpython biomapi.py process *.pdf # Multiple files (concurrent)python biomapi.py process report.pdf --no-pinOutput includes patient name (as acronym), BiomPIN, BiomAPI URL, and ESCRS IOL Calculator link.
retrieve
Section titled “retrieve”python biomapi.py retrieve lunar-rocket-731904Generate a by-eye CSV from one or more BiomPINs:
python biomapi.py csv lunar-rocket-731904 solar-river-482910 > export.csvpython biomapi.py usagepython biomapi.py usage --validate # Also verifies your Gemini keystatus
Section titled “status”python biomapi.py statusconfigure
Section titled “configure”python biomapi.py configure --key biom_...python biomapi.py configure --gemini-key AIza_...python biomapi.py configure --showAccess tiers
Section titled “Access tiers”BIOMAPI_KEY | GEMINI_API_KEY | process limit | retrieve limit |
|---|---|---|---|
| — | — | 30/day per IP | 1,000/day per IP |
| ✓ | — | Custom quota | Custom quota |
| — | ✓ | Unlimited (your Gemini quota) | 1,000/day per IP |
| ✓ | ✓ | Unlimited (your Gemini quota) | Custom quota |