CLI
Overview of the rayfin CLI — root options, the Fabric development workflow, and links to every visible command in Rayfin 1.36.2.
Use @microsoft/rayfin-cli from a Rayfin project root to scaffold projects, run the local
Fabric-backed development session, deploy to Microsoft Fabric, and query version-locked
Rayfin documentation. The binary is rayfin; scaffolded projects call it through
npx rayfin or package scripts.
Typical workflow
npm create @microsoft/rayfin@latest my-app
cd my-app
npx rayfin login
npm run dev
npx rayfin upnpm run dev in the bundled templates runs rayfin dev, which prepares the Fabric
backend and starts the local frontend. Use rayfin up when you want to deploy static
content and Functions to Fabric.
Root options
These options are declared on the root rayfin program.
| Option | Default | Description |
|---|---|---|
-V, --version | — | Output the version number. |
-y, --yes | false | Auto-accept all confirmation prompts. |
--output <mode> | — | Output format for the invoked subcommand. Choices: interactive, plain, json. |
--verbose | false | Enable verbose output for the invoked subcommand. |
--json | false | Emit machine-readable JSON output from the invoked subcommand. |
-h, --help | — | Display help for rayfin or a subcommand. |
Many subcommands redeclare --json, --verbose, or -y, --yes so they also work after
the subcommand name.
Visible commands
| Command | Purpose |
|---|---|
init | Create a new Rayfin project, add Rayfin to an existing directory, list templates, or manage agent files. |
dev | Start a local development session against a Fabric Rayfin backend. |
up | Deploy the application to Fabric as a Rayfin item. |
secret | Manage secrets for deployed Rayfin items. Changed in 1.36 |
functions | Manage Rayfin Functions. Changed in 1.36 |
connector | Manage external data connectors. Changed in 1.36 |
env | Emit framework-specific .env.local values from rayfin/.env. |
login | Sign in to the Rayfin platform. |
logout | Sign out and clear cached credentials; see Login. |
docs | Query Rayfin docs from installed packages, or discover packages not yet installed. |
Reference pages
| Page | What it covers |
|---|---|
| CLI installation | Install and update @microsoft/rayfin-cli. |
| Init | rayfin init, npm create @microsoft/rayfin, templates, services, and generated files. |
| rayfin dev | Fabric-backed local development and dev functions apply. |
| Up | Full deploy, dry runs, service exclusions, status, switch, and deploy-only subcommands. |
| Env | Framework .env.local generation. |
| Docs | CLI documentation search and symbol lookup. |
| Ai-files | AGENTS.md, .mcp.json, and Rayfin skills management. |
| Templates | Built-in, local, git, and registered template sources. |
| Telemetry | CLI telemetry and opt-out variables. |
Configuration reference
The CLI reads and writes rayfin/rayfin.yml, rayfin/.env, and
rayfin/.deployments.json. See Configuration.
Run `npx rayfin --help` in my Rayfin project, then summarize every visible top-level
command and tell me which command starts local development against the Fabric backend.Changelog
What changed in each Rayfin release these docs cover — new features, behavior changes, and step-by-step upgrade instructions, linked to the pages that document them.
CLI installation
Install @microsoft/rayfin-cli for a project, verify the version, and keep the CLI aligned with the Rayfin packages in package.json.