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 serverNote
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:
| Flag | Description |
|---|---|
-y, --yes | Auto-accept all confirmation prompts. |
--verbose | Enable verbose output for the invoked subcommand. |
--json | Emit machine-readable JSON output from the invoked subcommand. |
-V, --version | Print the installed CLI version. |
-h, --help | Show help for rayfin or any subcommand. |
Most subcommands also declare their own -v/--verbose and --json for backward
compatibility — either form works.
Command index
| Page | Commands | What it's for |
|---|---|---|
| CLI installation | — | Installing the CLI as a dev dependency, globally, or via npx; updating it. |
| Init | npm create @microsoft/rayfin@latest, rayfin init | Scaffold a new project, or add/reconfigure Rayfin in an existing one. |
| Login | rayfin login, login status, logout | Authenticate with Entra ID for Fabric operations. |
| Up | rayfin up, up status, up db apply, up staticapp deploy, up functions deploy, up list, up switch | Deploy the project to Microsoft Fabric. |
| Secret | rayfin secret set, secret list | Manage secrets on a deployed Rayfin item. |
| Env | rayfin env | Emit a framework-specific .env.local from rayfin/.env. |
| rayfin functions | rayfin functions init | Scaffold and maintain serverless Functions. |
| Connector | rayfin connector add, list, remove | Connect external Fabric data sources. |
| Docs | rayfin docs search, get, list, discover, catalog show | Query version-locked Rayfin documentation from the terminal. |
| Ai-files | rayfin init ai-files install, status | Install 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. |
| Telemetry | — | What 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.
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.Reference overview
Landing page for the complete Rayfin reference — CLI commands, configuration schema, SDK packages, rules for coding agents, known limitations, deprecations, and troubleshooting.
CLI installation
Install the Rayfin CLI as a project dev dependency, globally, or run it ad hoc with npx — plus how to verify the install and update it.