Skip to content

Getting Started

This guide takes you from a fresh terminal to a published marketplace app. For a longer end-to-end walkthrough that ends in a rendered widget, see the tutorial. For the conceptual picture, see concepts.

Requirements

  • Node.js 20+
  • An Orion EMR developer account with a registered OAuth client. Your tenant's developer-portal admin creates the client and gives you the clientId.

Install

bash
npm install -g @orion-ehr/cli
orion --version

Scaffold a new app

bash
orion init my-app --client-id <your-oauth-client-id>
cd my-app
npm install

This creates ./my-app/ with a SMART-on-FHIR template, an orion.config.ts, and an orion-app.json manifest.

Configure your tenant

bash
orion config host

You'll be prompted for your home tenant URL (e.g. https://acme.staging.orionsoftware.io). This is the tenant orion login and orion publish target.

If you'll also use orion dev for live-reload tunneling, set the sandbox URL:

bash
orion config sandbox

See Host vs Sandbox for the distinction.

Authenticate

bash
orion login

A browser opens to the OAuth authorize page. Approve it, the CLI catches the callback, stores tokens, and you're done. Confirm with:

bash
orion auth whoami

You should see your identity with developer, develop:apps scopes.

Develop

bash
orion dev

Vite runs locally. The CLI opens a Cloudflare tunnel and registers it with your sandbox tenant so you can preview the live-reloading app inside the host EMR.

Validate

bash
orion validate

Catches manifest schema issues, bundle problems, and scope-list mismatches before you ever touch the network. orion publish calls this internally too — but running it explicitly during development gives you faster feedback than waiting for orion publish to fail.

Publish

bash
orion build
orion publish

publish re-runs validation, archives dist/ + source, prompts for a changelog, and uploads to the marketplace. On success, the CLI prints the new version's App ID, Version, and Status (typically pending_review for a new submission).

Inspect

bash
orion apps list                 # all apps you own
orion apps info my-app
orion versions list             # version history for the cwd's app
orion versions show 1.0.0       # detail + review thread

What's next

Documents @orion-ehr/cli v0.0.15 — released under the MIT License.