---
title: "Installation"
description: "Install Node.js 20+ and the GitHub CLI on Windows, macOS, or Linux, then verify and update the Rayfin CLI."
url: https://rayfin.ai/docs/start/installation
markdown_url: https://rayfin.ai/docs/start/installation.md
section: start
product: Rayfin
sdk_version: 1.34.0
cli_version: 1.33.2
last_updated: 2026-08-22T22:51:33-07:00
source: start/installation.mdx
---

# Installation

> Install Node.js 20+ and the GitHub CLI on Windows, macOS, or Linux, then verify and update the Rayfin CLI.

Rayfin needs the same prerequisites whether you're scaffolding a new project or deploying
to Microsoft Fabric: **Node.js 20 or later** and the **GitHub CLI**. Install these before
you scaffold a project.

## Windows [#windows]

Install the latest LTS Node.js:

```powershell
winget install -e --id OpenJS.NodeJS.LTS
```

Install the GitHub CLI:

```powershell
winget install --id GitHub.cli -e
```

Add it to `PATH` if it is not already there:

```powershell
where gh
# If there are no results, add the GitHub CLI to your PATH:
$env:PATH += ";C:\Program Files\GitHub CLI"; [Environment]::SetEnvironmentVariable("PATH", $env:PATH, "User")
```

Sign in and verify every tool:

```powershell
gh auth login
node --version
gh --version
```

> [!NOTE]
> If prompted during `gh auth login`, authorize GitHub to access Microsoft.

## macOS [#macos]

```bash
brew install node@lts
brew install gh
```

Verify the GitHub CLI is on `PATH`, sign in, and check versions:

```bash
which gh
gh auth login
node --version
gh --version
```

> [!NOTE]
> If prompted during `gh auth login`, authorize GitHub to access Microsoft.

## Linux (Ubuntu or Debian) [#linux-ubuntu-or-debian]

Install the latest LTS Node.js using the
[official Node.js download instructions](https://nodejs.org/en/download).

Install the GitHub CLI:

```bash
type -p curl >/dev/null || sudo apt install -y curl
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install -y gh
```

Verify the GitHub CLI is on `PATH`, sign in, and check versions:

```bash
which gh
gh auth login
node --version
gh --version
```

## Install the Rayfin CLI [#install-the-rayfin-cli]

You do not usually install `@microsoft/rayfin-cli` directly — scaffolding a project
installs it for you as a dev dependency.

**New project:**

```bash
npm create @microsoft/rayfin@latest my-app
cd my-app
```

**Existing project** — install the CLI, then run the interactive setup to create the
`rayfin/` directory with starter configuration files:

```bash
npm install --save-dev @microsoft/rayfin-cli
npx rayfin init
```

## Verify the installation [#verify-the-installation]

```bash
npx rayfin --version
```

List every available command:

```bash
npx rayfin --help
```

## Update the CLI [#update-the-cli]

```bash
npm update --save
npm install
```

Confirm the update:

```bash
npx rayfin --version
```

```prompt title="Install Rayfin's prerequisites"
Check whether this machine has Node.js 20 or later and the GitHub CLI installed, and
install or update whichever are missing for this operating system. Then run `gh auth
login` to sign in, and print the output of `node --version` and `gh --version` so I can
confirm everything is ready before I scaffold a Rayfin project.
```

## Next [#next]

* [Quickstart](/docs/start/quickstart) — scaffold your first project.
* [Project structure](/docs/start/project-structure) — what the scaffold generates.
* [CLI installation reference](/docs/reference/cli/installation) — every install-related
  command and flag.
