Getting Started

Install Epic CLI and complete your first Epic integration in 5 minutes

1

Prerequisites

Node.js & Epic account

2

Install CLI

npm install command

3

Setup

Interactive wizard

4

First Call

Test integration

Quick Start (30 seconds)

# Install Epic CLI
npm install -g @securecloudnetworks/epic-cli@latest
# Run interactive setup
epic setup
# Test your first API call
epic patients search --family Lopez

Prerequisites

Before installing Epic CLI, ensure you have:

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 key
  • epic-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

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