@e-labus/cli
v1.0.0
Published
E-Labus Health API CLI — analyze lab results, generate clinical insights, and manage your API account from the terminal
Downloads
12
Maintainers
Readme
@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/cliOr use without installing:
npx @e-labus/cli analyze --file labs.jsonQuick Start
# 1. Save your API key
elabus auth login --key elab_sk_YOUR_KEY
# 2. Analyze a lab file
elabus analyze --file labs.json
# 3. Generate clinical insights
elabus insights --file labs.json --age 45
# 4. Check credit usage
elabus usageCommands
elabus auth
elabus auth login --key elab_sk_YOUR_KEY # Save API key
elabus auth whoami # Show account details
elabus auth status # Quick health check
elabus auth logout # Remove saved keyelabus 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 jsonInput 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 jsonCost: 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 45Cost: 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 jsonCategories: 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 jsonCost: 15 credits
elabus trends
Analyze longitudinal trends across multiple lab sessions with 6- and 12-month projections.
elabus trends --file timeline.jsonInput 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 # Standardize names
elabus normalize biomarkers --file labs.json --target-unit mmol/L # Convert units
elabus normalize text --file report.txt # Extract from OCR textCost: 1 credit/biomarker (normalize) · 2 credits (text extraction)
elabus usage
elabus usage # Show credits remaining, plan, reset date
elabus usage --format jsonOutput Formats
All commands support --format:
| Format | Description |
|--------|-------------|
| pretty | Human-readable with colors and tables (default) |
| json | Raw JSON — pipe to jq for processing |
| table | ASCII table without colors |
# Pipe JSON to jq
elabus analyze --file labs.json --format json | jq '.biomarkers[] | select(.flag == "high")'
# Save to file
elabus insights --file labs.json --format json > insights.jsonEnvironment Variables
| Variable | Description |
|----------|-------------|
| ELABUS_API_KEY | API key (overrides config file) |
| ELABUS_API_URL | Custom API base URL (optional) |
ELABUS_API_KEY=elab_sk_YOUR_KEY elabus usageCI / Scripting Example
#!/bin/bash
# Auto-analyze labs and exit non-zero if critical values found
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
| Plan | Credits/mo | Price | HIPAA BAA | |------|-----------|-------|-----------| | Sandbox | 500 | Free | ❌ | | Starter | 5,000 | $49/mo | ✅ | | Growth | 25,000 | $199/mo | ✅ | | Scale | 150,000 | $799/mo | ✅ | | Enterprise | Unlimited | Custom | ✅ + MSA |
Related
- MCP Server — Use E-Labus tools directly inside Claude Code:
@e-labus/mcp - REST API Docs — docs.e-labus.com/api
- Developer Portal — developers.e-labus.com
