snoozestackdocs

CLI reference

snoozestack CLI v0.108.0 · Install or upgrade

The core loop is four commands — init, dev, check, publish — over the committed snoozestack/ folder. Project-scoped commands use the [project] name declared in snoozestack/project.toml (written by snoozestack link), or an explicit --project <ref>. Most resource groups accept --dev / --preview <name> to scope an operation to that namespace. Add --help to any command for the full detail.

Nearly every command below has a counterpart tool on the project's MCP endpoint, so an AI client can do this work directly instead of shelling out to the CLI on your behalf.

the project lifecycle
snoozestack init [name] # scaffold project.toml + a starter function + schema.mjs
snoozestack check # validate the manifest — file and line on failure
snoozestack dev [--port <n>] # run the whole runtime natively; prints the dashboard link
snoozestack dev reset # throw away local state, rebuild + reseed
snoozestack publish # validate, push every declared resource in order, go live
snoozestack publish --preview staging # same, into the "staging" namespace instead of live
snoozestack versions # every recorded publish, newest first
snoozestack versions diff <a> <b> # added/removed/changed across two versions
snoozestack promote <version-id> # point live at a recorded version (also: rollback)
account, linking & projects
snoozestack user login # prompts for email/password (or APP_EMAIL/APP_PASSWORD)
snoozestack user # who this machine is signed in as
snoozestack user logout # forget + revoke the stored token
snoozestack link --project my-app # record the project in snoozestack/project.toml
snoozestack projects list
snoozestack projects create <name> # provision a hosted project
snoozestack projects keys [<ref>] # SNOOZESTACK_URL + API keys
snoozestack projects tokens create <name> # project-scoped credential for CI
snoozestack projects delete <ref> [--yes]
schema & migrations
snoozestack schema build # schema.mjs → snoozestack/schema.json (offline)
snoozestack schema push # build, then publish it to the project
snoozestack migration generate <name> # diff against the last build → SQL migration file
snoozestack migration create <name> # blank file, for hand-written SQL
snoozestack db push # apply .sql migrations (legacy database-server projects)
secrets
snoozestack secrets set KEY=value # hosted default — running runtimes pick it up
snoozestack secrets set KEY=value --dev # local-only override for snoozestack dev
snoozestack secrets set KEY=value --preview staging
snoozestack secrets list # names + which namespaces override; never values
snoozestack secrets unset KEY
storage
snoozestack storage push # create/update declared [[storage]] buckets (never deletes)
snoozestack storage list
snoozestack storage create <name> [--public] | public <name> | private <name>
snoozestack storage delete <name> [--yes] # the only file-destroying command
queues, triggers & webhooks
snoozestack queues push # create/update declared [[queues]] + their triggers
snoozestack queues list # depth gauges per queue
snoozestack queues send <name> <message> # enqueue a test message
snoozestack queues dead-letters <name> # what exhausted its retries
snoozestack queues delete <name> [--yes]
snoozestack triggers create <name> --queue <q> --function <fn> [--notify <service>]
snoozestack triggers list | enable <name> | disable <name> | delete <name>
snoozestack webhooks push # create declared [[webhooks]]
snoozestack webhooks create <name> --queue <q>
# → https://<ref>.snoozestack.com/api/webhooks/<name>/<token>
snoozestack webhooks list | delete <name> [--yes]
push notifications
snoozestack notifications push # create declared [[push]] services
snoozestack notifications enable [<name>] # imperative shortcut
snoozestack notifications devices # registered device tokens
snoozestack notifications register-device --token <hex> # let dev send to a real device
snoozestack notifications test --service <name> --device <id> --title --body
sites & domains
snoozestack sites push # publish every declared [[sites]] entry, live
snoozestack sites publish <name> --dir ./dist [--no-promote] # ad-hoc one-off
snoozestack sites versions <name> # version history + preview URLs
snoozestack sites promote <name> <version-id> # go live (also: rollback)
snoozestack sites primary <name> # serve this one at the project host root
snoozestack sites list | delete <name> [--yes]
snoozestack domains claim <domain> # start connecting (idempotent)
snoozestack domains status [<domain>] # the setup checklist
snoozestack domains primary platform|custom # which URL generated links use
snoozestack domains records list|add|delete <domain>
snoozestack domains list | retry <domain> | delete <domain> [--yes]
auth
snoozestack auth push # send the declared [auth] config (publish runs this)
snoozestack auth pull [--force] # write the email/page templates into the project as files
observe
snoozestack signals # hosted event stream, newest first
snoozestack signals --range 24h --event page_view --lines 100
snoozestack signals tail [--type log] # the LOCAL dev store, live
snoozestack signals query | clear # read / empty the local store
snoozestack logs functions --lines 100 # auth | storage | functions | queues | sites | postgres
snoozestack audit # who changed what — console, CLI, and MCP
snoozestack audit --area auth --actor mcp

Function code lives at ./snoozestack/functions/<name>/index.ts, migrations at ./snoozestack/migrations/*.sql, table definitions in ./snoozestack/schema.mjs. The login token is stored in ~/.snoozestack/config.json (APP_CONFIG_DIR overrides it); CI should skip login entirely and pass a project token via --token or APP_SERVICE_TOKEN. snoozestack update upgrades the CLI in place.