Fast, interactive AI-powered clinical decision support for pediatric care.
# Clone and setup
git clone https://github.com/dochobbs/clinicalcli.git
cd clinicalcli
./setup.sh
# Start interactive shell
./clinical-shell
# Try it out!
⚕️ clinical> d amoxicillin --weight 52# --age 5yo
⚕️ clinical> cds 5yo with fever x3 days, ear pain
⚕️ clinical> helpThat's it! Responses stream in real-time. ⚡
- Real-time streaming responses - See results immediately (200-500ms)
- Single-line commands - Fast, natural workflow
- Tab completion - Quick command entry
- Command history - Arrow keys to recall
- Copy on demand -
copycommand when you need it
drug/d- Drug lookup with weight-based dosingdose- Quick dose calculationcompare- Compare multiple medicationscds/c- Clinical decision support with red flag detectionddx- Differential diagnosis generationnote- Clinical notes (SOAP, progress, consult, discharge)parse- Analyze PDF/image documents
- Default: Claude Haiku 4.5 (1-2 sec, optimized for speed) ⚡
- Quality: Claude Sonnet 4.5 (2-5 sec, best for complex cases)
- Offline: LM Studio and Ollama for local models
- Easy switching:
model llama3.2ormodel claude-sonnet-4-5-20250929
- 3-layer dosing validation - Weight, age, and range checking
- Red flag detection - Emergent condition identification
- Anti-hallucination prompts - Source citation requirements
- Session isolation - No cross-patient data retention
Start here: docs/README.md
- Quick Start Guide - 5 minutes to get running
- Interactive Shell Guide - Complete shell reference
- Command Reference - All available commands
- Performance Guide - Speed optimization tips
See full documentation in docs/ directory.
⚕️ clinical> d amoxicillin --weight 52# --age 5yo
Response:
# Amoxicillin - Pediatric Dosing
**Patient:** 52 lbs (23.6 kg), 5 years old
## Standard Dosing for Acute Otitis Media
- Dose: 80-90 mg/kg/day divided BID
- Calculation: 23.6 kg × 45 mg/kg = 1062 mg/day
- Give: 530 mg BID (use 400 mg/5 mL suspension)
- Volume: 6.5 mL BID
[Full response continues streaming...]
Tip: Use 'copy' command to copy this to clipboard⚕️ clinical> cds 5yo with fever x3 days, ear pain, decreased hearing
Response:
# Clinical Assessment: Acute Otitis Media (AOM)
## Key Features
This 5-year-old with fever, ear pain, and decreased hearing...
[Comprehensive assessment streams in real-time]
⚕️ clinical> copy
✓ Copied 2103 characters to clipboard⚕️ clinical> dose ibuprofen 40#
Response:
# Ibuprofen - Quick Dose
- Weight: 40 lbs (18.2 kg)
- Dose: 10 mg/kg = 182 mg
- Give: 9 mL of 100 mg/5 mL suspension
- Frequency: Every 6-8 hours PRN⚕️ clinical> model
═══ Available Models ═══
Anthropic Claude (Cloud):
[✓] claude-haiku-4-5-20251001 # Default, fast
[ ] claude-sonnet-4-5-20250929 # Best quality
⚕️ clinical> model claude-sonnet-4-5-20250929
✓ Switched to Anthropic model: claude-sonnet-4-5-20250929- ⚡ Streaming responses - Start reading in 200ms
- ⚡ Claude Haiku 4.5 default - 1-2 second responses
- ⚡ Single-line commands - No Ctrl+D needed
- ✅ No interruptions - Copy only when you want
- ✅ Natural workflow - Like talking to a colleague
- ✅ Rich formatting - Clear, readable output
- ✅ Tab completion - Fast command entry
- 🎯 Pediatric-optimized - Weight-based dosing, age-appropriate guidance
- 🎯 Safety-first - Multiple validation layers
- 🎯 Red flag detection - Critical condition alerts
- 🎯 Evidence-based - Source citation requirements
- Python: 3.9 or higher
- API Key: Anthropic API key (set in
~/.zshrcasANTHROPIC_API_KEY) - Optional: LM Studio or Ollama for offline local models
- Platforms: macOS, Linux, Windows
git clone https://github.com/dochobbs/clinicalcli.git
cd clinicalcli
./setup.sh# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Set API key (if not already in ~/.zshrc)
export ANTHROPIC_API_KEY="your-api-key-here"./clinical-shell
⚕️ clinical> help./clinical-shell
⚕️ clinical> dose amox 52#
⚕️ clinical> qTime: ~10 seconds
./clinical-shell
⚕️ clinical> d amoxicillin --weight 52# --age 5yo
⚕️ clinical> cds 5yo with fever x3 days, ear pain, decreased hearing
⚕️ clinical> note 5yo with AOM, starting amoxicillin
⚕️ clinical> copy
⚕️ clinical> qTime: ~2 minutes
./clinical-shell
# Leave running all day
⚕️ clinical> d amox --weight 52# # Patient 1
⚕️ clinical> d cefdinir --weight 30# # Patient 2
⚕️ clinical> cds 12yo with headache...
⚕️ clinical> stats # Check session stats
⚕️ clinical> q- ✅ BAA Required - Use only with Anthropic API under signed Business Associate Agreement
- ✅ Authorized Use - Ensure proper authorization for PHI processing
- ✅ Secure Handling - Do not share outputs containing PHI insecurely
- ✅ Audit Trail - Session logs available via
statscommand - ✅ Session Isolation - No data persists between sessions
This tool is designed for HIPAA-compliant use under Anthropic's BAA.
| Model | Speed | Quality | Use Case |
|---|---|---|---|
| Claude Haiku 4.5 (default) | 1-2 sec ⚡⚡⚡ | Excellent | Quick lookups, routine queries |
| Claude Sonnet 4.5 | 2-5 sec ⚡⚡ | Outstanding | Complex cases, critical decisions |
| Local Models (offline) | 30-60 sec |
Good | Emergency offline reference |
Streaming: First words appear in ~200-500ms regardless of model!
Cloud (Anthropic) - Recommended:
claude-haiku-4-5-20251001- Default, optimized for speedclaude-sonnet-4-5-20250929- Best quality for complex cases
Local (Offline):
- LM Studio - User-friendly GUI, any GGUF model
- Ollama - CLI-based, scriptable
⚕️ clinical> model # List available
⚕️ clinical> model claude-sonnet-4-5-20250929 # Switch to Sonnet
⚕️ clinical> model llama3.2 # Switch to Ollama (if running)See Model Selection Guide for details.
clinicalcli/
├── src/
│ ├── cli.py # Single-command CLI
│ ├── interactive.py # Interactive shell (main)
│ ├── model_manager.py # Multi-model support
│ ├── utils.py # Shared utilities
│ ├── dose_validator.py # Safety validation
│ └── commands/ # Command modules
├── prompts/ # System prompts
├── docs/ # Documentation
├── requirements.txt # Dependencies
└── clinical-shell # Interactive launcher
See Development Guide (coming soon)
# Check if set
echo $ANTHROPIC_API_KEY
# If empty, add to ~/.zshrc
echo 'export ANTHROPIC_API_KEY="your-key-here"' >> ~/.zshrc
source ~/.zshrc# Ensure virtual environment is activated
source .venv/bin/activate
# Reinstall dependencies
pip install -r requirements.txt- Use Haiku (default) - 2-3x faster than Sonnet
- Local models are slow - See Performance Guide
- Check internet connection - Cloud models require connectivity
# Make shell executable
chmod +x clinical-shell
# Or run directly
python -m src.interactive- ✅ Interactive shell mode
- ✅ Streaming responses
- ✅ Multi-model support (Claude, LM Studio, Ollama)
- ✅ Copy on demand
- ✅ Comprehensive documentation
- Response caching for offline access
- Custom prompt templates
- Batch processing mode
- Integration with EHR systems
- Extended local model optimization
- Multi-language support
See ROADMAP.md for detailed plans (coming soon).
Internal Use Only - Requires valid Anthropic API credentials and Business Associate Agreement for PHI processing.
- Anthropic - Claude AI models and HIPAA-compliant API
- Rich - Beautiful terminal formatting
- Prompt Toolkit - Interactive shell features
- Quick Start: docs/QUICKSTART.md
- Full Docs: docs/README.md
- In-app Help:
⚕️ clinical> help
Report issues at: https://github.com/dochobbs/clinicalcli/issues
Version: 1.3.0 Last Updated: November 9, 2025 Default Model: Claude Haiku 4.5 (fast!) Status: Production Ready ✅
# Interactive Shell
./clinical-shell # Start shell
# Drug Commands
d <drug> --weight <wt> # Drug lookup with dosing
dose <drug> <weight> # Quick dose
compare <d1> <d2> # Compare drugs
# Clinical Commands
cds <presentation> # Clinical decision support
ddx <presentation> # Differential diagnosis
note <info> # Generate note
parse <file> # Analyze document
# Utilities
copy # Copy last output
model # List/switch models
stats # Session statistics
help # Show help
quit # Exit
# Examples
d amoxicillin --weight 52# --age 5yo
cds 5yo with fever, ear pain
note 5yo with AOM, starting antibiotics
copyGet started in 5 minutes: Quick Start Guide