rayfin up
Deploy a Rayfin project to Fabric, resolve workspace and capacity, apply schema and settings, and run deploy-only up subcommands.
rayfin up deploys the project to Microsoft Fabric as a Rayfin item. It applies
rayfin.yml runtime settings, applies Data schema and Storage folder declarations,
deploys Functions when enabled, and builds and deploys static hosting unless excluded.
npx rayfin upWhat it does
- Validates local inputs before any remote call. Since 2.0 that includes connector
additionalPayloadblocks, custom audiences declared on Functions, and the dynamic claims contract, which is regenerated from theudf.authClaimsprovider. A failure stops the deploy before anything changes in Fabric. New in 2.0 - Resolves the target workspace from flags,
RAYFIN_WORKSPACE_ID, recorded deployments, or prompt. - Creates or reuses a Fabric AppBackend item.
- Applies runtime settings from
rayfin.yml. - Applies the Data API Builder configuration when
services.data.enabled: true. - Applies Storage folder declarations when
services.storage.enabled: true. Changed in 2.0 - Writes
rayfin/.deployments.jsonand public values inrayfin/.env. - Applies declared connector configuration.
- Builds static hosting when enabled and not excluded, and uploads it unless nothing changed since the last successful deployment. New in 2.0
- Builds and deploys Functions when
services.functions.enabled: true, then updates the stored dynamic claims contract if the deployed provider changed it. New in 2.0
Options
| Option | Default | Description |
|---|---|---|
-t, --tenant <id> | signed-in tenant | Entra ID tenant GUID. |
-w, --workspace <name> | My Workspace when no other target is recorded | Fabric workspace display name, resolved to an ID. |
--item-name <name> | project id in rayfin.yml | Fabric item display name. New in 1.36 |
--workspace-id <id> | — | Fabric workspace GUID to deploy into. |
--capacity-id <id> | — | Fabric capacity ID to assign when the target workspace has no usable capacity. New in 1.36 |
--workspace-uri <uri> | — | Fabric portal workspace URL, for example https://app.fabric.microsoft.com/groups/<id>/list; derives workspace ID and environment. |
--force | false | Allow destructive data schema changes that may result in data loss. When Storage is enabled, it also lets Storage remove undeclared folders that still contain objects. |
-n, --dry-run | false | Validate local inputs and resolve the workspace without deploying or modifying resources. Changed in 1.36 |
--env-file <path> | rayfin/.env | .env file containing Fabric app properties and interpolation variables. |
-v, --verbose | false | Enable verbose output. |
--json | false | Output deployment result as JSON. |
-y, --yes | false | Auto-accept confirmation prompts. |
--encryption-fallback-enabled | false | Allow plaintext token storage when the OS keychain is unavailable. |
--exclude-services <names> | — | Comma-separated services to skip during deployment. Supported: staticHosting, functions. Runtime settings remain unchanged. functions is new in 1.36. Changed in 1.36 |
--force-static-deploy | false | Upload static content even when it is unchanged since the last successful deployment. New in 2.0 |
--provider <provider> | fabric | Reserved; only fabric is supported. |
Warning
--force permits destructive schema changes and the removal of non-empty Storage
folders. Review what can be dropped before passing it.
Skip unchanged static content
A full rayfin up still runs the static build, then compares a fingerprint of the built
files, workspace, item, backend URL, and publishable key with the one recorded for the
last successful static deployment. When they match, it skips the upload, keeps the
recorded hosting URL, and prints:
ℹ️ Static app re-deployment skipped: the built static files, workspace, and backend are unchanged since the last successful deployment.
To upload it anyway, run `rayfin up --force-static-deploy`.With --json, the result includes staticHostingSkip with reason and hint fields.
Pass --force-static-deploy to upload anyway. rayfin up staticapp deploy always uploads.
Plan before deploying
Use --dry-run when an agent or CI job needs to prove the local project and target
workspace are valid without changing Fabric resources.
npx rayfin up --workspace "My Workspace" --dry-runSince 1.36, a dry run validates local inputs and resolves the workspace. It does not deploy, apply schema, modify runtime settings, upload Functions, upload static content, or write a new Fabric item.
Use JSON for automation:
npx rayfin up --workspace-id <workspace-id> --dry-run --jsonDeploy only selected services
--exclude-services skips only the build/package/deploy phase for the named service. The
CLI still applies runtime settings from rayfin.yml, so backend service configuration does
not drift.
| Example | What it does |
|---|---|
npx rayfin up --exclude-services staticHosting | Applies backend settings, Data schema, and Storage declarations, but does not build or upload static assets. |
npx rayfin up --exclude-services functions | Applies backend settings, Data schema, Storage declarations, and static hosting, but does not package or upload Functions. |
npx rayfin up --exclude-services staticHosting,functions | Applies backend state only. |
Prefer rayfin dev for the interactive local loop. Keep --exclude-services for scripts
that need a deploy without one or more artifact uploads.
up status
npx rayfin up statusDisplays cloud deployment status.
| Option | Default | Description |
|---|---|---|
--json | false | Output status in JSON format. |
-v, --verbose | false | Enable verbose output. |
up status exits 0 when the recorded deployment is healthy. It exits non-zero when no
deployment is recorded, the endpoint is unreachable, or authentication fails. Use --json
when a script needs to branch on the returned status instead of parsing formatted text.
up list
npx rayfin up listLists Fabric deployments recorded in rayfin/.deployments.json.
| Option | Description |
|---|---|
--json | Output as JSON. |
up switch
npx rayfin up switch [workspace]Switches the active recorded deployment and rewrites rayfin/.env.
| Option | Description |
|---|---|
[workspace] | Workspace name or slug to activate. |
--workspace-id <id> | Activate by Fabric workspace ID. |
-l, --list | List recorded deployments instead of switching. |
--no-emit-env | Skip framework .env.local regeneration. |
up db apply
npx rayfin up db apply [--force]Generates and applies Data API Builder configuration to the remote Rayfin item workload endpoint.
| Option | Default | Description |
|---|---|---|
-v, --verbose | false | Enable verbose output. |
--force | false | Allow destructive schema changes that may result in data loss. |
--json | false | Output result as JSON. |
--drift-file <path> | ~/.rayfin/drift | Save detected schema drift CSV at this path. New in 2.0 |
--overwrite | false | Replace the --drift-file if it already exists. New in 2.0 |
--skip-drift-check | false | Skip the schema drift check (escape hatch if it blocks an unchanged database). New in 2.0 |
up storage apply
npx rayfin up storage apply [--force]Generates and applies Storage configuration to the remote Rayfin item workload endpoint,
without running the rest of the deploy. Use it to retry Storage after a full rayfin up
reported a Storage warning, or to deploy only folder changes. In 1.36 this subcommand was
experimental and registered only when the storage feature flag was on
(RAYFIN_FEATURE_FLAGS=storage or services.storage.enabled: true).
| Option | Default | Description |
|---|---|---|
--force | false | Force the storage controller to accept configuration that may result in data loss. |
--json | false | Output result as JSON. |
The subcommand needs an existing deployment record from rayfin up and Data enabled in
rayfin.yml. It applies the @blob folders registered in rayfin/storage/schema.ts;
when none are declared, it prints
⚠️ No @blob folder declarations found. Storage configuration was not applied. See
Storage for folder declarations.
Warning
Removing a folder declaration makes that folder unavailable as soon as the apply
succeeds, and permanently deletes its objects and metadata in the background. When a
removed folder still contains objects, the apply stops with
Storage apply blocked (409) until you pass --force.
up staticapp deploy
npx rayfin up staticapp deployBuilds, packages, and deploys static content to the remote Rayfin item. Unlike a full
rayfin up, it uploads even when the content is unchanged.
| Option | Default | Description |
|---|---|---|
-v, --verbose | false | Enable verbose output. |
--skip-build | false | Skip the build command and deploy existing content. |
--json | false | Output result as JSON. |
up functions deploy
npx rayfin up functions deployBuilds, packages, and deploys Functions to the remote Rayfin item. See
rayfin functions. After the code deploys, it updates the
stored dynamic claims contract when the udf.authClaims
provider changed it, and clears the stored contract when the provider was removed.
New in 2.0
Note
Functions are not available in every Fabric region or tenant.
| Option | Default | Description |
|---|---|---|
-v, --verbose | false | Enable verbose output. |
--skip-build | false | Skip the build command and deploy existing content. |
--json | false | Output result as JSON. |
up connector apply
npx rayfin up connector apply [--name <name>]Generates and applies Data API Builder configuration for declared GraphQL connectors. See Connector.
| Option | Default | Description |
|---|---|---|
--name <name> | all connectors | Apply only the named connector. |
-v, --verbose | false | Enable verbose output. |
--json | false | Output result as JSON. |
Managing secrets
Secrets are managed by the top-level rayfin secret command,
not by rayfin up. They target the same deployed workload endpoint that rayfin up
records.
npx rayfin secret set API_KEY --describe="API key used by payment functions"
npx rayfin secret listSecret values are stored in the deployed Rayfin item. rayfin.yml stores only the
metadata declaration used for typing and documentation.
Troubleshooting
| Message | Meaning | Fix |
|---|---|---|
RAYFIN_WORKSPACE_ID and --capacity-id cannot be used together. | Capacity assignment requires Rayfin to select or create a workspace, but an ambient workspace was already fixed. | Unset RAYFIN_WORKSPACE_ID, or remove --capacity-id. |
Dialect is required when Data module is enabled | services.data.enabled is true but services.data.dialect is missing. | Set services.data.dialect: mssql. |
Invalid services.functions.auth: authentication is required when Functions are enabled. Set services.functions.auth.type to "application". | Functions are enabled without the required 1.36 auth block. | Add services.functions.auth.type: application. |
No remote endpoint configured. Run `rayfin up` first to deploy and register connectors. | A deploy-only subcommand needs an existing deployment record. | Run npx rayfin up once, then retry the subcommand. |
Storage requires the Data service. | services.storage.enabled is true but Data is not enabled. | Enable services.data, or disable services.storage. |
Storage configuration was not applied: <reason>. Run `rayfin up storage apply` to retry. | The rest of the deploy continued, but the Storage step failed for a reason other than a blocked folder removal. | Fix the reported reason, then run npx rayfin up storage apply. |
Storage apply blocked (409): the following folder(s) are no longer declared but still contain objects and were not removed: | A folder you removed from the schema still holds objects. | Restore the declaration, or rerun with --force to delete the folder and its objects. |
connectors block in rayfin.yml has validation errors: | A connector entry is invalid. An additionalPayload on a Category A connector, or one over 64 KiB or nested deeper than 32 levels, stops the deploy before any remote call. Changed in 2.0 | Fix the listed entries. --json output includes the invalid-connectors code and a hint. |
'<audience>' is not a valid custom audience. Use an application ID (GUID) or an https:// or api:// resource URI without a scope, query, or wildcard. | A Functions connection declares an invalid custom audience. The deploy stops before any remote call. New in 2.0 | Use an application ID or a resource URI. See Connections. |
services.auth.dynamicClaims.enabled is true, but services.functions is not enabled. | Dynamic claims need a deployed udf.authClaims provider. New in 2.0 | Enable services.functions, or set services.auth.dynamicClaims.enabled: false. See Dynamic claims. |
Run `npx rayfin up --exclude-services functions --dry-run` in my Rayfin project to verify
the target workspace and local configuration, then run `npx rayfin up --exclude-services
functions` to deploy everything except the Functions package.In my Rayfin 2.0 project I changed the @blob folders registered in the schema array of
rayfin/storage/schema.ts. Run `npx rayfin up storage apply --json` against the recorded
deployment. If it fails with "Storage apply blocked (409)", list the folders it would
remove and ask me before rerunning with --force, because removing a folder permanently
deletes its objects.rayfin login
Sign in to Rayfin for Fabric operations, inspect status, sign out, recover from network failures in WSL2 or dev containers, and understand token cache storage.
rayfin secret
Command reference for setting, listing, deleting, describing, bulk importing, and typing Rayfin secrets for Functions.