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.
orion init my-app --client-id <your-oauth-client-id>Flags
| Flag | Default | Purpose |
|---|---|---|
--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> | smart | App template. smart is the modern SMART-on-FHIR scaffold; legacy-graphql is for legacy apps still using the older GraphQL API. |
--typescript | true | Use 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 entryThe 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:
cd my-app
npm install
orion config host
orion loginorion config host
Set or update the home tenant URL (used by login, publish, and every read command).
orion config host
# ? Home tenant URL: https://your-tenant.staging.orionsoftware.ioThis is your real, production-like tenant — see Host vs Sandbox.
orion config sandbox
Set or update the sandbox URL (used by orion dev only).
orion config sandbox
# ? Sandbox URL: https://sandbox-acmemedical.orion.localThe 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.
orion config showCurrent 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