Skip to content

Test changes without publishing

Goal: see changes in the host EMR within seconds of saving a file, without touching the marketplace.

Prerequisites:

  • A scaffolded app with manifest and bundle config.
  • Logged in (orion login).
  • A sandbox tenant configured — see First-time setup below if you've never run orion dev against this app.

First-time setup

If orion sandbox:status reports No sandbox configured, the CLI doesn't yet know which sandbox tenant to tunnel into. The full first-time tenant setup is covered in the tutorial; the abbreviated form below is enough to unblock this recipe.

Run:

bash
orion config sandbox

The command prompts for your sandbox tenant URL — typically https://sandbox-<tenant>.orion.local for local development, or whatever sandbox-prefixed URL your Orion admin assigned. The CLI validates that the URL starts with https:// and contains sandbox- somewhere in it, then calls the sandbox to fetch the tenant UUID automatically. If that fetch fails, you'll be prompted to paste the UUID manually — it lives in the Orion admin panel under the tenant detail page.

The values land in your global CLI config (managed by Conf, not a checked-in file), so re-running this only matters when you switch sandbox targets.

Verify the result:

bash
orion sandbox:status

You should now see the sandbox URL, the configured app id, and a healthy status line. If the sandbox is unreachable, double-check the URL and that the host EMR sandbox is running.

Steps

  1. Why not just publish? Each orion publish consumes a version slot, kicks off a marketplace review, and isn't reversible without admin help. Publish is for stable releases. For iteration, use orion dev.

  2. Start the dev server:

    bash
    orion dev

    Three things happen: Vite starts on localhost:5173, the CLI opens a Cloudflare tunnel exposing it via HTTPS, and it registers the tunnel URL with your sandbox tenant. The host EMR's iframe pulls your bundle from the tunnel instead of the CDN.

  3. Open the host EMR's sandbox UI and navigate to a surface where your app is mounted — a patient sidebar if you have a widget, a route if you have a page. The iframe loads the live tunnel content. Save a file in your editor and HMR reloads inside the iframe.

  4. Inspect manifest changes. If you change orion-app.json, the CLI auto-restarts the dev server (it watches the manifest and re-registers with the sandbox). Code changes hot-reload through Vite as usual.

  5. Reset the sandbox between test runs if your manual interactions left data behind. Reseed from the Orion UI afterwards:

    bash
    orion sandbox:reset
  6. Check what's currently registered with the sandbox. The output shows the sandbox URL, health status, your configured app id, and (when registered) the dev URL the sandbox is pointing at:

    bash
    orion sandbox:status
  7. Validate locally before stepping up to publish. This runs everything publish runs except the actual upload. Clean here usually means clean publish:

    bash
    orion validate

Verify

Edit a component file, save, and watch the host EMR iframe refresh within about a second. No publishing happened.

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