atomic
Functions, one at a time. drift file apply 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 apikey, -e <element>. |
drift atomic deploy <dir> | Build and ship every function the Driftfile declares in <dir>, leaving the rest of the project alone (Go, Python, Node, Ruby, PHP, Rust) |
drift atomic run <dir> [--function name] [--port N] | Run one declared function locally with hot reload. --function picks which one when the folder declares several. |
drift atomic fetch [path] | Resolve dependencies for every function under a path |
Operate
| Command | Description |
|---|---|
drift atomic list | List 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 list | List functions grouped by element |
drift atomic trigger list | List registered triggers |
drift atomic trigger register queue <name> --queue Q --target URL [--poll-ms N] [--max-retry N] | Poll a Backbone queue and invoke a function on each message. Defaults: --poll-ms 500, --max-retry 3 before a message moves to its dead-letter queue. |
drift atomic trigger register schedule <name> --cron "..." --target URL | Fire 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> [--on errors] [--threshold N] [--window 5m] [--notify webhook=URL] | Register an alert (v1: an error-count trigger, a webhook notification) |
drift atomic alert list | List alerts on the active slice |
drift atomic alert remove <name> | Remove an alert |
Alerts can also be declared per-function in the Driftfile. The deploy writes every alert the manifest declares; one that is live and no longer declared is left in force and named in apply's closing report, not removed. Take it away with drift atomic alert remove <name>.
Egress
| Command | Description |
|---|---|
drift atomic egress list | Show the slice's active mode, declared hosts, and the IPs last resolved for them |
drift atomic egress refresh | Re-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 and no call to the platform. 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. In open mode every public host is reachable; in allowlist mode only the resolved IPs behind the declared hosts are, and a host that is not declared is refused. Either way, private RFC-1918, link-local and CGNAT ranges are always blocked. See the Atomic guide for the full model.