Rayfin

CLI

Overview of the rayfin CLI — installation, the typical scaffold-to-deploy workflow, and an index of every command page in this reference.

@microsoft/rayfin-cli scaffolds Rayfin projects, deploys them to Microsoft Fabric, and manages the configuration and agent files that ship with a project. The binary is rayfin, invoked as npx rayfin <command> from a project root (or directly as rayfin <command> when installed globally).

Typical workflow

npm create @microsoft/rayfin@latest my-app   # 1. Create a project from a template
cd my-app
npx rayfin login                              # 2. Sign in with Entra ID
npx rayfin up                                  # 3. Deploy backend services to Fabric
npm run dev                                    # 4. Run the frontend dev server

Note

Use npx rayfin init instead of npm create to add Rayfin to a project that already has source code, or to reconfigure a project that already has a rayfin/rayfin.yml. See Init.

Global flags

These are declared on the root rayfin program and apply to every subcommand:

FlagDescription
-y, --yesAuto-accept all confirmation prompts.
--verboseEnable verbose output for the invoked subcommand.
--jsonEmit machine-readable JSON output from the invoked subcommand.
-V, --versionPrint the installed CLI version.
-h, --helpShow help for rayfin or any subcommand.

Most subcommands also declare their own -v/--verbose and --json for backward compatibility — either form works.

Command index

PageCommandsWhat it's for
CLI installationInstalling the CLI as a dev dependency, globally, or via npx; updating it.
Initnpm create @microsoft/rayfin@latest, rayfin initScaffold a new project, or add/reconfigure Rayfin in an existing one.
Loginrayfin login, login status, logoutAuthenticate with Entra ID for Fabric operations.
Uprayfin up, up status, up db apply, up staticapp deploy, up functions deploy, up list, up switchDeploy the project to Microsoft Fabric.
Secretrayfin secret set, secret listManage secrets on a deployed Rayfin item.
Envrayfin envEmit a framework-specific .env.local from rayfin/.env.
rayfin functionsrayfin functions initScaffold and maintain serverless Functions.
Connectorrayfin connector add, list, removeConnect external Fabric data sources.
Docsrayfin docs search, get, list, discover, catalog showQuery version-locked Rayfin documentation from the terminal.
Ai-filesrayfin init ai-files install, statusInstall and refresh AGENTS.md, .mcp.json, and the Rayfin skill.
Templates(used via -t/--template on init)Where project templates come from, and how to author your own.
TelemetryWhat the CLI collects and how to opt out.

Configuration reference

The CLI reads and writes rayfin/rayfin.yml and rayfin/.env. See Configuration for the complete schema and environment variable reference.

PromptExplain a rayfin command
Run `npx rayfin --help` in my project, then explain what each top-level command does and which one I need to redeploy just my database schema after I add a field to an entity.
Something wrong on this page?Report an issueEdit this page

On this page