@e-labus/cli — E-Labus Health API CLI
Analyze lab results, generate clinical insights, predict disease risk, and manage your API account from the terminal.
Get a free API key (500 credits, no credit card): developers.e-labus.com
Install
npm install -g @e-labus/cli
Or use without installing:
npx @e-labus/cli analyze --file labs.json
Quick Start
elabus auth login --key elab_sk_YOUR_KEY
elabus analyze --file labs.json
elabus insights --file labs.json --age 45
elabus usage
Commands
elabus auth
elabus auth login --key elab_sk_YOUR_KEY
elabus auth whoami
elabus auth status
elabus auth logout
elabus analyze
Score biomarkers against reference ranges. Flags abnormalities and returns an overall risk score.
elabus analyze --file labs.json
elabus analyze --biomarkers '[{"name":"Glucose","value":112,"unit":"mg/dL","refLow":70,"refHigh":99}]'
cat labs.json | elabus analyze --stdin
elabus analyze --file labs.json --format json
Input format (labs.json):
[
{ "name": "Glucose", "value": 112, "unit": "mg/dL", "refLow": 70, "refHigh": 99 },
{ "name": "HbA1c", "value": 6.1, "unit": "%", "refLow": 4.0, "refHigh": 5.7 },
{ "name": "LDL", "value": 145, "unit": "mg/dL", "refLow": 0, "refHigh": 100 },
{ "name": "Creatinine","value": 1.1, "unit": "mg/dL", "refLow": 0.6, "refHigh": 1.2 }
]
Cost: 5 credits
elabus insights
Generate prioritized clinical insights with recommendations.
elabus insights --file labs.json
elabus insights --file labs.json --age 45 --context "Type 2 diabetes, hypertension"
elabus insights --file labs.json --format json
Cost: 25 credits
elabus narrative
Generate a plain-English health summary suitable for patients.
elabus narrative --file labs.json
elabus narrative --file labs.json --name "Jane Smith" --age 45
Cost: 20 credits
elabus score
Calculate an aggregate health score (0–100) with category breakdown.
elabus score --file labs.json
elabus score --file labs.json --format json
Categories: Metabolic · Cardiovascular · Kidney · Liver · Thyroid
Cost: 5 credits
elabus risk
Predict risk for 10 chronic diseases: Diabetes, Cardiovascular, Metabolic Syndrome, Thyroid, CKD, NAFLD, Anemia, Inflammation, Vitamin D, Insulin Resistance.
elabus risk --file labs.json
elabus risk --file labs.json --format json
Cost: 15 credits
elabus trends
Analyze longitudinal trends across multiple lab sessions with 6- and 12-month projections.
elabus trends --file timeline.json
Input format (timeline.json):
[
{
"biomarker": "HbA1c",
"unit": "%",
"ref_low": 4.0,
"ref_high": 5.7,
"readings": [
{ "date": "2024-01-15", "value": 5.4 },
{ "date": "2024-06-20", "value": 5.9 },
{ "date": "2025-01-10", "value": 6.4 }
]
}
]
Cost: 10 credits
elabus normalize
elabus normalize biomarkers --file labs.json
elabus normalize biomarkers --file labs.json --target-unit mmol/L
elabus normalize text --file report.txt
Cost: 1 credit/biomarker (normalize) · 2 credits (text extraction)
elabus usage
elabus usage
elabus usage --format json
Output Formats
All commands support --format:
pretty | Human-readable with colors and tables (default) |
json | Raw JSON — pipe to jq for processing |
table | ASCII table without colors |
elabus analyze --file labs.json --format json | jq '.biomarkers[] | select(.flag == "high")'
elabus insights --file labs.json --format json > insights.json
Environment Variables
ELABUS_API_KEY | API key (overrides config file) |
ELABUS_API_URL | Custom API base URL (optional) |
ELABUS_API_KEY=elab_sk_YOUR_KEY elabus usage
CI / Scripting Example
#!/bin/bash
RESULT=$(elabus analyze --file labs.json --format json)
CRITICAL=$(echo "$RESULT" | jq '[.biomarkers[] | select(.flag == "critical")] | length')
if [ "$CRITICAL" -gt "0" ]; then
echo "⚠️ $CRITICAL critical value(s) detected!"
echo "$RESULT" | jq '.biomarkers[] | select(.flag == "critical") | {name, value, unit, flag}'
exit 1
fi
echo "✔ No critical values found"
API Plans
| Sandbox | 500 | Free | ❌ |
| Starter | 5,000 | $49/mo | ✅ |
| Growth | 25,000 | $199/mo | ✅ |
| Scale | 150,000 | $799/mo | ✅ |
| Enterprise | Unlimited | Custom | ✅ + MSA |
Get started free →
Related