Reference
Every command, its flags, and the config
file schema. Run driftwood help <command> for
the same text in your terminal.
Commands
| Command | What it does | Common flags |
|---|---|---|
driftwood deploy |
Builds and ships the current directory as a new deploy. | --prod, --project <name> |
driftwood dev |
Runs the function locally with the same routing rules as production. | --port <n>, --watch |
driftwood domains add |
Attaches a domain to a project, optionally pinned to a deploy. | --project <name>, --pin <hash> |
driftwood domains rm |
Detaches a domain. | --project <name> |
driftwood logs |
Streams live request logs for a project. | --project <name>, --since <dur> |
driftwood retire |
Marks a deploy hash as retired; its URL stops resolving. | <hash>, --force |
driftwood env |
Lists, sets, or removes environment variables for a project. | set, rm, --secret |
driftwood whoami |
Prints the authenticated account and active team. | — |
Config file
An optional driftwood.json at the project root
overrides defaults. Without one, Driftwood infers the entry file
and route from the folder contents.
{
"project": "hello",
"entry": "index.js",
"routes": ["/*"],
"regions": ["auto"],
"env": {
"LOG_LEVEL": "info"
}
}
Config fields
| Field | Type | Default |
|---|---|---|
project | string | directory name |
entry | string | index.js |
routes | string[] | ["/*"] |
regions | string[] | ["auto"] |
env | object | {} |
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Build failed |
2 | Not authenticated — run driftwood login |
3 | Deploy rejected (over plan limits) |