drift Docs
Start
What is Drift?
The tour, if you are new here.
Why Drift?
The case for a smaller cloud.
Getting started
Nothing to deployed, in one command.
Architecture
How a slice is put together.
What it costs
The free grant, five unit prices, two rules.
Build
Canvas
Static sites, same origin as your API.
Tools
Operate
Auth
Accounts, tokens and scopes.
Security
Boundaries, sandboxing and hardening.

drift file

Driftfile questions answered on your laptop. Every subcommand is offline, with no account, no slice and no network, so “is line 9 a typo?” costs milliseconds instead of a failed deploy.

Command Description
drift file lint [path]Validate a Driftfile exactly as a deploy would. Exits non-zero on the first invalid file, so it can gate a CI job.
drift file explain [path]Print the shape the file resolves to, inherited defaults included. Pass --env staging to apply that environment's overlay first.
drift file fmt [path]Rewrite in canonical key order and 2-space indentation. --write updates in place; comments and short forms survive.
drift file new [path]Write a starter Driftfile with the knobs a first deploy needs filled in. --name, --canvas <dir>, --force.

A bare path argument defaults to ./Driftfile, and a directory argument means the Driftfile inside it.

explain is the one that pays for itself. An environment block that sets three knobs looks like it describes the slice, when it describes three knobs on top of a base you're holding in your head. It prints no price: the server is the single authority on cost, and drift project deploy --plan is where that number comes from. It prints names of secrets, never values.

The platform owns the format, so the CLI needs a copy of it.

The Driftfile schema is fetched on first contact and cached at ~/.drift/driftfile.schema.json. On a machine that has never run an online command, lint refuses rather than printing a tick it can't stand behind so run drift account login or drift slice list once and it's cached permanently.

Every key the file accepts is in the Driftfile reference.