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 upWhat it does
- 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 declared connector configuration.
- Builds and deploys Functions when
services.functions.enabled: true. - Writes
rayfin/.deployments.jsonand public values inrayfin/.env. - Builds and deploys static hosting when enabled and not excluded.
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. |
-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 |
--provider <provider> | fabric | Reserved; 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-runIn 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 and Data schema, but does not build or upload static assets. |
npx rayfin up --exclude-services functions | Applies backend settings, Data schema, 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. |
up staticapp deploy
npx rayfin up staticapp deployBuilds, packages, and deploys static content to the remote Rayfin item.
| 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.
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.
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
| 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. |
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.