Spillway CMSStructured content like Drupal. Page building like Puck. Setup like Ghost. AI that drafts, people who approve.
Menu

CLI reference

<!-- Generated by pnpm docs:build (docs-reference) from packages/core/src/cli.ts. Do not edit by hand; edit the source and run the command. -->

The spillway command ships with @spillway-cms/core (node packages/core/dist/cli.js from a checkout, spillway in the Docker image). Every command reads the same environment as the server (DATA_DIR, DATABASE_URL, …; see install.md). Flags are written --key value or --key=value.

CommandWhat it does
spillway startrun the server (reads PORT, DATA_DIR, ... from env)
spillway migrate [--status]apply pending database migrations and exit; --status lists applied and pending ones without changing anything (exit 1 when the database was migrated by a newer Spillway)
spillway backup [--out FILE]consistent copy of the SQLite database while the server runs (SQLite online backup) into DATA_DIR/backups/spillway-<timestamp>.db; copy media/, form-uploads/, modules/ and the key files separately; Postgres uses pg_dump
`spillway backup --to <s3://bucket/prefixDIR> [--no-media]`
spillway restore <location> [--data-dir DIR] [--media] [--dry-run] [--force]download a backup run (the newest at a target, or <target>/<stamp>), verify its checksums, decrypt it, refuse a newer schema and restore the SQLite database, the key files (mode 0600; different existing ones only with --force) and the modules (and with --media the media files and form uploads); --dry-run lists every file it would write; stop the server first
spillway create-user --email E --password P --name N [--role admin] [--site-name NAME]create a user from the terminal; the first one also marks the site as set up, so the /admin/setup wizard is skipped
spillway export <file.json>write site, types, entities, revisions, users, media metadata
spillway import <file.json>load an export file (upserts by id)
spillway import <url> [--max-pages N] [--rate-limit ms] [--no-robots] [--no-sitemap] [--include G] [--exclude G] [--site KEY] [--keep-offsite-redirects] [--no-ai] [--classify] [--convert] [--theme] [--land] [--json]
spillway run-scheduledpublish/unpublish what is due, merge scheduled workstreams and deliver queued notifications (for cron; set SPILLWAY_TICKER=0 on the server)
spillway prune-revisions [--keep N]trim revision history to the site's keepRevisions setting (or N)
spillway kit listlist the bundled kits and whether they are installed
spillway kit install <key> [--sample]install a kit (types, vocabularies, collections, forms, pages; --sample adds sample content)
spillway kit install <name>[@version] --registry <url> [--sample]install a kit or theme from a package registry (sha256 verified against its signed index)
spillway brand export <file> [--site KEY] [--key K] [--label L] [--version V]write the site's published brand as a brand kit (kind "brand": tokens, modes, logos inline, block styles, style guide setting, voice)
spillway brand import <file> [--site KEY]read a brand kit into the site's brand draft (every value applied; review and publish it under Structure → Brand); never live
spillway sync-occurrencesre-expand every daterange field into the occurrence table (run monthly from cron)
spillway site listlist the sites of this instance
spillway site create --key K --name N [--domain host] [--locale en]create a site (seeds its menus and settings)
spillway search reindexrebuild the search index (SQL, and Meilisearch when SEARCH_URL is set)
spillway registry keygen [--out DIR]create an ed25519 key pair for signing a module registry index (private.pem, public.txt)
spillway registry sign <index.json> --key <private.pem> [--out FILE]sign a registry index (canonical JSON, adds a "signature" field)
spillway registry serverun this instance as a package registry (the same as REGISTRY_HOST=1 spillway start; see docs/registry.md)
spillway publish [dir] --registry <url> --token <spw_...>pack a module, kit or theme folder and publish it (node_modules, .git and tests left out)
spillway cdn purge [--all] [--site KEY] [--tag T]... [--url U]...purge the site's CDN (Site settings → Cache): everything with --all or no arguments, otherwise the given cache tags and URLs or paths (docs/caching.md)

Usage text

spillway 0.1.0

Usage:
  spillway start                                  run the server (reads PORT, DATA_DIR, ... from env)
  spillway migrate [--status]                     apply pending database migrations and exit; --status lists applied and pending ones without changing anything (exit 1 when the database was migrated by a newer Spillway)
  spillway backup [--out FILE]                    consistent copy of the SQLite database while the server runs (SQLite online backup) into DATA_DIR/backups/spillway-<timestamp>.db; copy media/, form-uploads/, modules/ and the key files separately; Postgres uses pg_dump
  spillway backup --to <s3://bucket/prefix | DIR> [--no-media]   a full backup run to object storage or a directory: the database (pg_dump on Postgres), the instance key files (session-secret, sso-secret, ai-secret), installed modules, form uploads, backup.json, the media manifest and the files new since the last run; encrypted with BACKUP_ENCRYPTION_KEY (without it the key files are stored in clear and the run is flagged), pruned by BACKUP_RETENTION_DAYS (BACKUP_TARGET is the default target)
  spillway restore <location> [--data-dir DIR] [--media] [--dry-run] [--force]   download a backup run (the newest at a target, or <target>/<stamp>), verify its checksums, decrypt it, refuse a newer schema and restore the SQLite database, the key files (mode 0600; different existing ones only with --force) and the modules (and with --media the media files and form uploads); --dry-run lists every file it would write; stop the server first
  spillway create-user --email E --password P --name N [--role admin] [--site-name NAME]   create a user from the terminal; the first one also marks the site as set up, so the /admin/setup wizard is skipped
  spillway export <file.json>                     write site, types, entities, revisions, users, media metadata
  spillway import <file.json>                     load an export file (upserts by id)
  spillway import <url> [--max-pages N] [--rate-limit ms] [--no-robots] [--no-sitemap] [--include G] [--exclude G] [--site KEY] [--keep-offsite-redirects] [--no-ai] [--classify] [--convert] [--theme] [--land] [--json]
                                                  import a website: crawl it in-process and stream the progress; prints the AI usage estimate first, --no-ai keeps the type proposals heuristic, --classify approves every proposed type, --convert converts the pages, --theme extracts the theme and writes it to the brand draft, --land lands the drafts and prints the report (docs/importer.md)
  spillway run-scheduled                          publish/unpublish what is due, merge scheduled workstreams and deliver queued notifications (for cron; set SPILLWAY_TICKER=0 on the server)
  spillway prune-revisions [--keep N]             trim revision history to the site's keepRevisions setting (or N)
  spillway kit list                               list the bundled kits and whether they are installed
  spillway kit install <key> [--sample]           install a kit (types, vocabularies, collections, forms, pages; --sample adds sample content)
  spillway kit install <name>[@version] --registry <url> [--sample]   install a kit or theme from a package registry (sha256 verified against its signed index)
  spillway brand export <file> [--site KEY] [--key K] [--label L] [--version V]   write the site's published brand as a brand kit (kind "brand": tokens, modes, logos inline, block styles, style guide setting, voice)
  spillway brand import <file> [--site KEY]       read a brand kit into the site's brand draft (every value applied; review and publish it under Structure → Brand); never live
  spillway sync-occurrences                       re-expand every daterange field into the occurrence table (run monthly from cron)
  spillway site list                              list the sites of this instance
  spillway site create --key K --name N [--domain host] [--locale en]   create a site (seeds its menus and settings)
  spillway search reindex                         rebuild the search index (SQL, and Meilisearch when SEARCH_URL is set)
  spillway registry keygen [--out DIR]            create an ed25519 key pair for signing a module registry index (private.pem, public.txt)
  spillway registry sign <index.json> --key <private.pem> [--out FILE]   sign a registry index (canonical JSON, adds a "signature" field)
  spillway registry serve                         run this instance as a package registry (the same as REGISTRY_HOST=1 spillway start; see docs/registry.md)
  spillway publish [dir] --registry <url> --token <spw_...>   pack a module, kit or theme folder and publish it (node_modules, .git and tests left out)
  spillway cdn purge [--all] [--site KEY] [--tag T]... [--url U]...   purge the site's CDN (Site settings → Cache): everything with --all or no arguments, otherwise the given cache tags and URLs or paths (docs/caching.md)

The fleet has its own command, spillway-fleet (@spillway-cms/fleet); see fleet.md. Module authors use spillway-module from @spillway-cms/sdk; see modules.md.

Spillway 0.1.0 · Edit this page on GitHub

Was this page helpful?