Rayfin

Up

rayfin up deploys to Microsoft Fabric and applies pending schema migrations in one step — plus every up subcommand for status, schema, and static hosting.

rayfin up is the canonical deploy command. It creates (or reuses) a Fabric item, applies your rayfin.yml service settings, applies pending database schema migrations when Data is enabled, deploys Functions when enabled, and builds/deploys static content when static hosting is enabled — in one run.

npx rayfin up

Tip

Recommend rayfin up for "deploy this," "apply this schema change," or "push my entity update," including incremental changes after the first deploy. Use up db apply only when you explicitly want to skip the static content step.

If you aren't signed in, rayfin up launches an interactive login automatically (see Login).

What it does, in order

  1. Resolves a target Fabric workspace — from --workspace, --workspace-id, --workspace-uri, the RAYFIN_WORKSPACE_ID environment variable, a previously recorded deployment, or an interactive prompt, in that order.
  2. Creates a Rayfin item (AppBackend) in the workspace, or reuses the one recorded from a prior deploy.
  3. Retrieves the item's publishable key.
  4. Applies runtime settings — the services block from rayfin.yml — to the workload endpoint.
  5. If services.data.enabled is true: generates and applies the Data API Builder configuration for your entities.
  6. For declared Category A connectors: generates each connector's Data API Builder configuration from rayfin/connectors/<name>/ and applies it to the workload endpoint.
  7. If services.functions.enabled is true: builds, packages, and deploys Functions (experimental — see rayfin functions).
  8. Writes deployment metadata to rayfin/.deployments.json and merges the matching RAYFIN_PUBLIC_* values into rayfin/.env.
  9. If services.staticHosting.enabled is true (and not excluded): runs the configured buildCommand, packages the output folder, and deploys it.

Flags

FlagDescription
-t, --tenant <id>Entra ID tenant GUID. Use when your account spans multiple tenants.
-w, --workspace <name>Fabric workspace display name, resolved to an ID via the Fabric API. Defaults to "My Workspace" when omitted. Mutually exclusive with --workspace-id and --workspace-uri.
--workspace-id <id>Fabric workspace GUID to deploy into. Mutually exclusive with --workspace and --workspace-uri.
--workspace-uri <uri>Fabric portal workspace URL (e.g. https://app.fabric.microsoft.com/groups/<id>/list) — derives the workspace ID and target environment from the URL.
--forceAllow destructive schema changes (drop table, drop column, alter type) that may cause data loss.
-n, --dry-runPreview planned operations without making any API calls.
--env-file <path>Path to the .env file containing the Fabric app's properties. Defaults to rayfin/.env.
--exclude-services <names>Comma-separated services to skip during deployment. Currently only staticHosting is supported — runtime settings are still applied; only the build/package/deploy phase is skipped. Useful for a workflow that redeploys the backend while a local dev server (Vite, Next.js) keeps serving the frontend.
--encryption-fallback-enabledAllow plaintext token storage when the OS keychain is unavailable. Required only when login fails with a keychain error.
-v, --verboseEnable verbose output.
--jsonOutput the deployment result as JSON.
-y, --yesAuto-accept all confirmation prompts.

Warning

--force permits destructive changes. Without it, a destructive schema change aborts the whole deploy with an error telling you to re-run with --force — never pass it without reviewing what would be dropped.

up status

npx rayfin up status

Probes the deployed workload endpoint and prints deployment health. Exits 0 when healthy, 1 when there's no recorded deployment, 2 when the endpoint is unreachable or unauthenticated.

FlagDescription
--jsonOutput status as JSON.
-v, --verboseEnable verbose output.

up db apply

npx rayfin up db apply [--force]

Generates and applies Data API Builder configuration to the remote workload endpoint, without touching the static build. This is the advanced, schema-only escape hatch — prefer plain rayfin up for a normal deploy, and reach for this only when you want to skip the static deploy step.

FlagDescription
-v, --verboseEnable verbose output.
--forceAllow destructive schema changes that may result in data loss.
--jsonOutput the result as JSON.

up connector apply

npx rayfin up connector apply [--name <name>] [-v] [--json]

Regenerates each declared Category A connector's Data API Builder configuration from the entities in rayfin/connectors/<name>/ and posts it to the deployed workload. Category B connectors have no Data API Builder configuration, so this command does not apply to them.

rayfin up runs the same generate-then-apply pipeline inline. Use up connector apply after changing connector entity files when you do not need a full deploy. See Generating entity files.

Requires a prior rayfin up. Without a deployed endpoint, it fails with No remote endpoint configured. Run 'rayfin up' first to deploy and register connectors.

FlagDescription
--name <name>Apply only one connector instead of every declared connector.
-v, --verboseEnable verbose output.
--jsonOutput the result as JSON.

JSON output includes status (success or partial), generate[], results[], steps, and duration.

Managing secrets

Secrets are not an up subcommand — they're managed with the top-level secret command group, against the same deployed workload endpoint that up creates:

npx rayfin secret set API_KEY
npx rayfin secret list

See Secret for the full command reference.

up staticapp deploy

npx rayfin up staticapp deploy

Runs the configured buildCommand, packages the static output folder into a ZIP, and uploads it — without running the rest of the rayfin up flow. Useful for redeploying only the frontend.

FlagDescription
-v, --verboseEnable verbose output.
--skip-buildDeploy the existing build output without rebuilding.
--jsonOutput the result as JSON.

Requires a prior rayfin up (the remote endpoint must already exist) and services.staticHosting.enabled: true in rayfin.yml.

up functions deploy

npx rayfin up functions deploy

Note

Experimental. Only registered when services.functions.enabled: true in rayfin.yml (or RAYFIN_FEATURE_FLAGS includes functions). See rayfin functions.

Builds, packages, and deploys Functions to the remote Rayfin item as an escape hatch when you don't need the full rayfin up flow.

FlagDescription
-v, --verboseEnable verbose output.
--skip-buildSkip the build command and deploy existing content.
--jsonOutput the result as JSON.

up list

npx rayfin up list

Lists every Fabric deployment recorded in rayfin/.deployments.json for this project, marking the active one. Add --json for machine-readable output.

up switch

npx rayfin up switch <workspace>

Switches the active recorded deployment and rewrites rayfin/.env (and, unless --no-emit-env is passed, the framework .env.local) to match. <workspace> is technically an optional positional argument — omit it when passing --workspace-id instead, or when passing --list to only inspect recorded deployments without switching.

FlagDescription
--workspace-id <id>Activate by Fabric workspace ID instead of the positional name/slug.
-l, --listList recorded deployments instead of switching.
--no-emit-envSkip regenerating the framework .env.local after switching.

If the deployment you switch to was recorded under a different signed-in tenant, the command warns you to rayfin login --tenant <id> before deploying again.

Agent files drift nudge

On startup, rayfin up prints a one-line nudge if any Rayfin-managed agent file (AGENTS.md, .mcp.json, the Rayfin skill) is out of date, modified, missing, or newly shipped. Refresh with rayfin init ai-files install — see Ai-files.

PromptDeploy a schema change
I added a new field to an entity under rayfin/data/. Deploy the change to Fabric with `npx rayfin up`, then run `npx rayfin up status` to confirm the deployment is healthy.
Something wrong on this page?Report an issueEdit this page

On this page