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
npm install -g @orion-ehr/cli
orion --versionScaffold a new app
orion init my-app --client-id <your-oauth-client-id>
cd my-app
npm installThis creates ./my-app/ with a SMART-on-FHIR template, an orion.config.ts, and an orion-app.json manifest.
Configure your tenant
orion config hostYou'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:
orion config sandboxSee Host vs Sandbox for the distinction.
Authenticate
orion loginA browser opens to the OAuth authorize page. Approve it, the CLI catches the callback, stores tokens, and you're done. Confirm with:
orion auth whoamiYou should see your identity with developer, develop:apps scopes.
Develop
orion devVite 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
orion validateCatches 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
orion build
orion publishpublish 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
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 threadWhat's next
- Build a real working widget end-to-end: Tutorial.
- Read the full command reference by lifecycle stage.
- Understand the manifest schema for
orion-app.json. - Skim the glossary for project-specific terms.
- Hit an error? Troubleshooting.