drift Docs
Pages
drift Docs
Start
What is Drift?
The tour, if you are new here.
Use cases
Whether Drift does your thing.
Getting started
Nothing to deployed, in one command.
Architecture
How a slice is put together.
What it costs
The free grant, four unit prices, two rules.
Moving off Azure
Estimate, snapshot and transform a resource group.
Build
Canvas
Static sites, same origin as your API.
Tools
Operate
Auth
Route gates, API keys and your account.
Teams
More than one person on one account.
Security
Boundaries, sandboxing and hardening.
Troubleshooting
Error codes
What went wrong, and what to do about it.
Legal
Acceptable use
What a slice may not be used for.
Data processing
The DPA, and every sub-processor.

The CLI surface

Write and test locally:

Command What it does
drift atomic new [name]Scaffold a handler in any of the six languages, with its dependency manifest, and print the function block to declare it with in your Driftfile. Flags make it non-interactive: -l python -m post, or -q jobs for a queue handler, -b ml to place it in a backend, -a apikey to include an auth block in the printed declaration.
drift atomic run <folder>Run one function locally with hot reload: every save kills the child, regenerates the wrapper and rebuilds.
drift atomic fetch [path]Resolve dependencies for every function under a path, in each language's own package manager.

Shipping is drift apply, which builds and uploads every function and worker whose source or declaration changed and leaves the rest alone. Operate what is live:

Command What it does
drift atomic redeploy <name>Re-deploy the last artifact without rebuilding.
drift atomic listEvery deployed function, one line per method and path.
drift atomic backend listBackends and the functions inside them.
drift atomic logs <name>Recent log lines. -n to tail, -f to follow, logs purge to clear.
drift atomic metrics <name>Total and error request counts, error rate and average duration.
drift atomic history <name>Past deploys kept for rollback.
drift atomic rollback <name> <position>Restore one of them.
drift atomic authSet, list and revoke API keys outside the Driftfile; see Authentication.
drift atomic alertList the alerts a slice holds. They are declared in the Driftfile; see Limits and alerts.
drift atomic egressInspect, test and refresh the outbound allowlist.
drift atomic triggerList the triggers the slice runs, and unregister one the Driftfile no longer declares. Nothing here registers one: a QUEUE label or a cron in the Driftfile does.
drift atomic workersThe slice's workers: state, uptime, restarts and how each last stopped. drift atomic workers restart <name> restarts one.

To remove a function or worker, delete its block from the Driftfile and run drift apply: the plan names the removal and the code, triggers and history that go with it, and apply asks you to agree. redeploy, rollback and history all take --method/-m to disambiguate get:x from post:x at the same path. Or declare every function in a Driftfile and ship them all at once with drift apply, after drift plan has shown what it will change.

Every drift atomic subcommand, with its flags and output, is in the CLI reference →