Skip to Content

Install

Install the floor CLI, sign in, and set up Cargo and Postgres to build backends.

At the end of this page you have the floor CLI signed in to Floor, Rust set up to build backends with the usefloor crate from crates.io, and a local Postgres for floor dev and floor test. You need a Floor account and a terminal on Linux, macOS or Windows.

1. Install the CLI

On Linux and macOS:

curl -fsSL https://usefloor.dev/install.sh | sh

On Windows, in PowerShell:

irm https://usefloor.dev/install.ps1 | iex

The installer needs no sign-in. It downloads the newest floor for your machine, checks it against the version's SHA256SUMS, puts it in ~/.local/bin (Windows: %LOCALAPPDATA%\Programs\floor) and adds that folder to your PATH. Open a new terminal and check it:

floor --version

There are builds for Linux (x86_64 and aarch64, glibc 2.35 or newer), macOS on Apple silicon and Windows on x86_64. On anything else, build it with Cargo once Rust is installed (step 3):

cargo install usefloor --features cli

To upgrade, run the install command again. For a given version: curl -fsSL https://usefloor.dev/install.sh | sh -s -- --version 0.2.0, or on Windows set $env:FLOOR_VERSION = "0.2.0" first.

2. Sign in

floor login --endpoint https://usefloor.dev --email you@example.com

It asks for your password and saves the endpoint and a token in floor/credentials.toml under your config folder (~/.config on Linux, ~/Library/Application Support on macOS, %APPDATA% on Windows). Later commands use them. Check who you are:

floor whoami

3. Install Rust

Backends build with stable Rust. Install it with rustup if you don't have it:

rustup toolchain install stable

Each backend floor new makes has a rust-toolchain.toml that picks stable.

4. Run a local Postgres

floor dev and floor test use a Postgres on your machine: floor dev keeps a <backend>_dev database there, and each test makes a database of its own and drops it after. By default they connect to postgres://floor:floor@127.0.0.1:5432/postgres. With Docker:

docker run -d --name floor-postgres -e POSTGRES_USER=floor -e POSTGRES_PASSWORD=floor -p 127.0.0.1:5432:5432 postgres:17

To use another server, point FLOOR_DEV_POSTGRES at it. The role needs to create databases:

export FLOOR_DEV_POSTGRES=postgres://me:secret@127.0.0.1:5432/postgres

5. Check it all works

floor new hello
cd hello
floor test

floor new prints the files it made. floor test builds the backend (the first build fetches usefloor from crates.io) and runs its one test, which calls GET /api/health. A passing run ends with test result: ok.

Next: Build your first backend.

On this page