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 project

The whole-project verbs: ship everything the Driftfile declares, or run the same thing on your laptop.

CommandDescription
drift project deploy [env]Deploy everything declared in your Driftfile. Unchanged functions are skipped.
drift project deploy --planPrint the slice diff and the cost, then exit. Nothing is applied and no hooks run.
drift project diff [env]The same diff as its own verb: resource counts, envelope shape, and the cost change a deploy would apply. Never applies; exits non-zero if the manifest would abort the deploy.
drift project run [env]Build and run the whole project locally in Docker, with no account and no cloud
drift project test [env]Run it locally, wait for health, then run the Driftfile's tests.e2e commands against it
drift project stop [env]Stop the local run
drift project logs [env]Tail logs from the local run

The four local verbs are one loop: run boots the whole project in Docker, test runs the Driftfile's tests.e2e commands against it, logs tails it, and stop tears it down.

Deploy flags

FlagWhat it does
--planDry run: render the diff and the monthly cost, apply nothing. Exits non-zero if the deploy would abort.
--forceRedeploy every function, even ones whose source is unchanged
--yes, -yAuto-confirm the cost prompt (for CI)
--env <name>Same as the positional environment argument; also sets ${ENV}
--secret KEY=valueOverride one variable for ${VAR} / $ENVREF resolution. Repeatable.
--no-env-fileDon't read the .env / .env.<env> file beside the Driftfile
--no-slice-reconcileSkip the slice diff entirely and deploy code into the active slice as it stands
--billing-period-months NBilling period for a slice this deploy creates or grows

A deploy only ever creates or grows a slice.

To lower a limit or drop a resource, use drift slice resize --from Driftfile --allow-destructive. Secrets declared in a Driftfile can pull values from your shell with $ENV references, resolved at deploy time.

Testing before you ship

drift project test is run plus your own e2e commands. It starts the project locally, waits for it to report healthy, exports the instance URL as DRIFT_TEST_URL (the port is chosen at runtime, so read it rather than hardcoding one), and runs every command under tests.e2e. The first non-zero exit fails the run, and the instance is torn down either way.

Driftfile
# Driftfile
tests:
  e2e:
    - npx playwright test

# then, with no account and no cloud:
$ drift project test