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.

atomic

Functions, one at a time. drift project deploy covers the whole project; these are for working on a single function and for operating what is live.

Develop

Command Description
drift atomic new [name]Scaffold a function: one flat source file in an element, not a folder. Interactive, or drive it with -l go, -m post, -q <queue>, -a jwt, -e <element>.
drift atomic deploy <dir> [-e element]Deploy a function (Go, Python, Node, Ruby, PHP, Rust)
drift atomic run <dir> [--port N]Run locally with hot reload
drift atomic fetch [path]Resolve dependencies for every function under a path

Operate

Command Description
drift atomic listList deployed functions (flat or grouped by element)
drift atomic logs <name> [-n N] [-f]Fetch function logs (-f streams new lines)
drift atomic logs purge <name>Clear a function's in-memory logs
drift atomic metrics <name>Request count, error rate, and average duration
drift atomic delete <name>Delete a deployed function

Roll back

Command Description
drift atomic history <name>Show a function's deployment history
drift atomic rollback <name> <position>Roll back to an earlier deployment (positions from history)
drift atomic redeploy <name>Re-deploy the last known artifact

A function is addressed by method and path.

delete, redeploy, rollback and history all take --method/-m. A function is addressed by method and path, so without it get:x and post:x are indistinguishable by name.

Authentication

Command Description
drift atomic auth set <fn> <key> [-m method]Set or rotate a function's API key
drift atomic auth list <fn>List the API keys configured for a function (fingerprints, not raw keys)
drift atomic auth revoke <fn> [-m method]Revoke a function's API key

A key set without --method get protects nothing.

set and revoke default to --method post. Setting a key for a GET route without --method get reports success and protects nothing. A configured key also overrides the declaration, making a route apikey-protected even if it shipped as auth=none. See Authentication.

Elements & triggers

Command Description
drift atomic element listList functions grouped by element
drift atomic trigger listList registered triggers
drift atomic trigger register queue <name> --queue Q --target URLPoll a Backbone queue and invoke a function on each message
drift atomic trigger register schedule <name> --cron "..." --target URLFire a function on a 5-field cron schedule
drift atomic trigger unregister <name>Remove a trigger

Alerts

Command Description
drift atomic alert add <name> <function>Register an alert (function errors trigger a webhook notification)
drift atomic alert listList alerts on the active slice
drift atomic alert remove <name>Remove an alert

Alerts can also be declared per-function in the Driftfile, which the deploy reconciles against this registry so removing one from the manifest removes it from the slice.

Egress

Command Description
drift atomic egress listShow the slice's active mode, declared hosts, and the IPs last resolved for them
drift atomic egress refreshRe-resolve DNS and re-apply the allowlist
drift atomic egress test <host>Does this host match the active allowlist? A local pattern match, with no DNS, no cluster call. A “did I spell it right” tool.

There is no add or remove. The Driftfile's atomic.egress block is the source of truth; these commands are for inspection. Note that the allowlist is declared, not yet enforced: the Atomic guide says what that means.