Getting Started
Install Epic CLI and complete your first Epic integration in 5 minutes
Prerequisites
Node.js & Epic account
Install CLI
npm install command
Setup
Interactive wizard
First Call
Test integration
Quick Start (30 seconds)
Prerequisites
Before installing Epic CLI, ensure you have:
- Node.js 16+ - Download from nodejs.org
- Epic Developer Account - Sign up free at fhir.epic.com
- 5 minutes - That's all the time you need!
Installation
Install Epic CLI globally using npm:
npm install -g @securecloudnetworks/epic-cli@latest
Verify the installation:
epic --version
# Should output: 1.0.9 or later
Setup Options
Epic CLI offers three setup methods. Choose the one that fits your workflow:
Option 1: Interactive Setup (Recommended)
The setup wizard guides you through the entire process:
epic setup
The wizard will: 1. Configure Epic app settings (Client ID, environment) 2. Generate RSA key pair (automatic 2048-bit keys) 3. Create X.509 certificate (RFC 5280 compliant for Epic) 4. Provide upload instructions (step-by-step Epic Developer Portal guide) 5. Test integration (verifies everything works end-to-end)
Option 2: Initialize with License
If you already have a license key:
epic init --license=YOUR-LICENSE-KEY
This method handles already-activated licenses gracefully and sets up your configuration automatically.
Option 3: Environment Variables
For automated deployments or CI/CD:
# Set environment variables
export EPIC_CLIENT_ID="your-client-id"
export EPIC_API_URL="https://fhir.epic.com/interconnect-fhir-oauth"
export EPIC_PRIVATE_KEY_PATH="./private-key.pem"
export EPIC_CLI_LICENSE="your-license-key"
# Initialize
epic init
Your First Commands
Once setup is complete, try these commands:
# Check overall status
epic status
# Test Epic authentication
epic auth test
# Search for patients (works in trial mode)
epic patients search --family Lopez
# Get patient details
epic patient PATIENT_ID
# Check your license and usage
epic license status
X.509 Certificate Generation
Epic CLI automatically generates proper X.509 certificates for Epic integration:
epic-private.key
- RSA-2048 private keyepic-public.key
- SPKI public key (for reference)epic-cert.pem
- X.509 certificate (upload this to Epic!)
- ✅ Format: X.509 Certificate (RFC 5280)
- ✅ Algorithm: RSA-2048 with SHA-256
- ✅ Type: Self-signed certificate
- ✅ Extensions: Proper certificate structure for Epic compatibility
Important: Upload the epic-cert.pem
file (X.509 certificate) to Epic Developer Portal, not the public key file.
Next Steps
Now that Epic CLI is installed and configured:
1. Explore Commands - Check out the CLI Commands reference 2. Understand Pricing - Review License Tiers to choose your plan 3. Join the Community - Get support and share experiences
- Trial users: Community support via GitHub
- Licensed users: Email support at support@ehrcli.com
- Enterprise users: 24/7 phone support with dedicated account manager
What's Next?
Need Help?
Installation Issues: Make sure you have Node.js 16+ installed
Setup Problems: Run epic setup --force
to restart the wizard
Epic Integration: Verify your Epic Developer Portal app configuration
Still Stuck? Contact support at support@ehrcli.com