Skip to content

Setup

Commands for scaffolding a new app and configuring its working directory.

orion init <name>

Scaffold a new Orion app in ./<name>/. Generates an orion.config.ts, an orion-app.json manifest, the SMART entry-point template, and a Vite + TypeScript build config.

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

Flags

FlagDefaultPurpose
--client-id <id> (required)OAuth client ID from your developer portal entry. Without this, login and publish can't tell the server which app you are.
-t, --template <smart|legacy-graphql>smartApp template. smart is the modern SMART-on-FHIR scaffold; legacy-graphql is for legacy apps still using the older GraphQL API.
--typescripttrueUse TypeScript. Recommended; leave it on.
-d, --directory <dir>./<name>Target directory if you want it somewhere other than ./<name>.

What it writes

my-app/
├── orion.config.ts            # CLI config (clientId, host, sandboxUrl, tenantUuid, app)
├── orion-app.json             # Marketplace manifest (name, scopes, extensions, entryPoint)
├── package.json               # Vite + TS dev dependencies
├── tsconfig.json
├── vite.config.ts
├── index.html                 # Vite HTML entry
├── .gitignore
├── .env.example
├── README.md
└── src/
    ├── main.tsx               # SMART entry point referenced by manifest.entryPoint
    ├── pages/
    │   └── HomePage.tsx       # Starter page registered in manifest.extensions.pages
    └── styles/
        └── globals.css        # Tailwind CSS entry

The scaffolded orion-app.json includes a one-entry extensions.writableExtensions example (preferred-pharmacy on Patient) so the shape is visible from the start. Delete or replace it; see Use writable extensions for the full flow.

After init, run:

bash
cd my-app
npm install
orion config host
orion login

orion config host

Set or update the home tenant URL (used by login, publish, and every read command).

bash
orion config host
# ? Home tenant URL: https://your-tenant.staging.orionsoftware.io

This is your real, production-like tenant — see Host vs Sandbox.

orion config sandbox

Set or update the sandbox URL (used by orion dev only).

bash
orion config sandbox
# ? Sandbox URL: https://sandbox-acmemedical.orion.local

The CLI rejects URLs that don't start with https:// or don't contain the sandbox- substring — sandbox tenants ship under that naming convention so it doubles as a typo guard.

orion config show

Print the resolved config from ./orion.config.ts. Read-only — useful when sharing setup details on a bug report.

bash
orion config show
Current Configuration

  App Name:     my-app
  App Slug:     my-app
  Host:         https://your-tenant.staging.orionsoftware.io
  Sandbox URL:  https://sandbox-acmemedical.orion.local
  Tenant UUID:  00000000-0000-0000-0000-000000000000

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