Skip to content

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.

DeviceManufacturerPK Support
AladdinTopcon
AnterionHeidelbergYes
ArgosAlcon
EyeStar ES900Haag-StreitYes
IOLMaster 700ZeissYes
Lenstar LS 900Haag-Streit
MS-39CSOYes
OA-2000Tomey
Pentacam AXLOculusYes

PK Support = posterior keratometry extraction for toric IOL formulas.


Download biomapi.py — no pip, no dependencies, pure Python 3.11+:

Terminal window
python biomapi.py status
python biomapi.py process report.pdf
Terminal window
/plugin marketplace add mglraimundo/biomapi-cli
/plugin install biomapi-cli@mglraimundo-biomapi-cli
Terminal window
cp -r skills/biomapi ~/.codex/skills/

Source repo: mglraimundo/biomapi-cli


Interactive setup (saves to ~/.config/biomapi/config):

Terminal window
python biomapi.py configure

Or set directly:

Terminal window
python biomapi.py configure --key biom_your_key_here
python biomapi.py configure --gemini-key AIza_your_key
python biomapi.py configure --show

Priority: CLI flags > environment variables (BIOMAPI_KEY, GEMINI_API_KEY) > config file.


Terminal window
python biomapi.py process report.pdf
python biomapi.py process *.pdf # Multiple files (concurrent)
python biomapi.py process report.pdf --no-pin

Output includes patient name (as acronym), BiomPIN, BiomAPI URL, and ESCRS IOL Calculator link.

Terminal window
python biomapi.py retrieve lunar-rocket-731904

Generate a by-eye CSV from one or more BiomPINs:

Terminal window
python biomapi.py csv lunar-rocket-731904 solar-river-482910 > export.csv
Terminal window
python biomapi.py usage
python biomapi.py usage --validate # Also verifies your Gemini key
Terminal window
python biomapi.py status
Terminal window
python biomapi.py configure --key biom_...
python biomapi.py configure --gemini-key AIza_...
python biomapi.py configure --show

BIOMAPI_KEYGEMINI_API_KEYprocess limitretrieve limit
30/day per IP1,000/day per IP
Custom quotaCustom quota
Unlimited (your Gemini quota)1,000/day per IP
Unlimited (your Gemini quota)Custom quota