Rayfin

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, deploys Functions when enabled, and builds and deploys static hosting unless excluded.

npx rayfin up

What it does

  1. Resolves the target workspace from flags, RAYFIN_WORKSPACE_ID, recorded deployments, or prompt.
  2. Creates or reuses a Fabric AppBackend item.
  3. Applies runtime settings from rayfin.yml.
  4. Applies the Data API Builder configuration when services.data.enabled: true.
  5. Applies declared connector configuration.
  6. Builds and deploys Functions when services.functions.enabled: true.
  7. Writes rayfin/.deployments.json and public values in rayfin/.env.
  8. Builds and deploys static hosting when enabled and not excluded.

Options

OptionDefaultDescription
-t, --tenant <id>signed-in tenantEntra ID tenant GUID.
-w, --workspace <name>My Workspace when no other target is recordedFabric workspace display name, resolved to an ID.
--item-name <name>project id in rayfin.ymlFabric 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.
--forcefalseAllow destructive data schema changes that may result in data loss.
-n, --dry-runfalseValidate 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, --verbosefalseEnable verbose output.
--jsonfalseOutput deployment result as JSON.
-y, --yesfalseAuto-accept confirmation prompts.
--encryption-fallback-enabledfalseAllow 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
--provider <provider>fabricReserved; only fabric is supported.

Warning

--force permits destructive schema changes. Review what can be dropped before passing it.

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-run

In 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 --json

Deploy 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.

ExampleWhat it does
npx rayfin up --exclude-services staticHostingApplies backend settings and Data schema, but does not build or upload static assets.
npx rayfin up --exclude-services functionsApplies backend settings, Data schema, and static hosting, but does not package or upload Functions.
npx rayfin up --exclude-services staticHosting,functionsApplies 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 status

Displays cloud deployment status.

OptionDefaultDescription
--jsonfalseOutput status in JSON format.
-v, --verbosefalseEnable 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 list

Lists Fabric deployments recorded in rayfin/.deployments.json.

OptionDescription
--jsonOutput as JSON.

up switch

npx rayfin up switch [workspace]

Switches the active recorded deployment and rewrites rayfin/.env.

OptionDescription
[workspace]Workspace name or slug to activate.
--workspace-id <id>Activate by Fabric workspace ID.
-l, --listList recorded deployments instead of switching.
--no-emit-envSkip 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.

OptionDefaultDescription
-v, --verbosefalseEnable verbose output.
--forcefalseAllow destructive schema changes that may result in data loss.
--jsonfalseOutput result as JSON.

up staticapp deploy

npx rayfin up staticapp deploy

Builds, packages, and deploys static content to the remote Rayfin item.

OptionDefaultDescription
-v, --verbosefalseEnable verbose output.
--skip-buildfalseSkip the build command and deploy existing content.
--jsonfalseOutput result as JSON.

up functions deploy

Changed in 1.36

npx rayfin up functions deploy

Builds, packages, and deploys Functions to the remote Rayfin item. See rayfin functions.

Note

Functions are not available in every Fabric region or tenant.

OptionDefaultDescription
-v, --verbosefalseEnable verbose output.
--skip-buildfalseSkip the build command and deploy existing content.
--jsonfalseOutput result as JSON.

up connector apply

Changed in 1.36 Preview

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

Generates and applies Data API Builder configuration for declared GraphQL connectors. See Connector.

OptionDefaultDescription
--name <name>all connectorsApply only the named connector.
-v, --verbosefalseEnable verbose output.
--jsonfalseOutput 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 list

Secret values are stored in the deployed Rayfin item. rayfin.yml stores only the metadata declaration used for typing and documentation.

Agent-files drift nudge

At startup, rayfin up checks Rayfin-managed agent files. If the CLI ships changed skills or MCP configuration, or a managed item is missing or modified, it prints:

ℹ️  Your project's Rayfin agent files have changes available. Run `rayfin init ai-files install` to refresh.

Refresh with rayfin init ai-files install. The nudge is content-based, not version-based.

Troubleshooting

MessageMeaningFix
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 enabledservices.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.
PromptDeploy without publishing Functions
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.
Something wrong on this page?Report an issueEdit this page

On this page