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 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 a Backbone queue and invoke a function on each message |
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> | Register an alert (function errors 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, which the deploy reconciles against this registry so removing one from the manifest removes it from the slice.
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, 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.