Skip to main content
Version: 0.9.13

delphi-setup CLI reference

delphi-setup is the setup registry CLI shipped on PATH in the voiceai-db-migrate image (/usr/local/bin/delphi-setup). On a provisioned Ops instance, the delphi-setup.sh wrapper loads proxy and bootstrap vars, fetches service env from SSM/Secrets Manager into process memory, materializes TLS CA bundles, logs into ECR, and runs the one-shot db-migrate container with your flags.

Automatic vs manual

Ops init.sh runs the db-migrate one-shot container during deploy (Prisma migrate deploy + baseline prisma db seed) unless --skip-migrations. Registry steps driven by delphi-setup (interactive superuser, update-only steps, dev-only bundles) do not run automatically — see First use (delphi-setup) for the bring-up order.

Wrapper flags (delphi-setup.sh)

FlagBehaviour
--no-pullSkip ECR login and image pull; use a locally cached db-migrate image.
--Everything after is passed straight through to delphi-setup.

All other arguments are forwarded to delphi-setup. Example: ./delphi-setup.sh --no-pull -- --apply-missing.

delphi-setup CLI flags

FlagBehaviour
(none)Interactive wizard — every applicable phase prompts as needed (stdin/stdout must be a TTY).
--apply-missingRun only setup steps introduced or updated since last run — typical after ECR_TAG bumps.
--dev-seedsInclude dev-only seed data (requires a TTY; aborts otherwise).
--non-interactiveNo prompts — answers come from environment variables.
--force-step <stepId>Re-run a single keyed step — e.g. firstUse.superuser.

Production invocation

From the Ops host:

cd /opt/services/ops

# First login / onboarding (interactive; use ssh -t if prompts do not appear)
./delphi-setup.sh

# After upgrading the platform tag
./delphi-setup.sh --apply-missing

# Automation (no TTY)
./delphi-setup.sh --non-interactive

# Dev/demo data — interactive only
./delphi-setup.sh --dev-seeds

# Skip image pull when db-migrate is already present locally
./delphi-setup.sh --no-pull

Use ssh -t when you need the interactive wizard from a non-TTY automation shell.

Raw Compose form (advanced)

Only if you have already replicated the in-memory env that init.sh / fetch-env.sh builds (otherwise ECR_REGISTRY, proxy, and privileged secrets are typically missing):

cd /opt/services/ops
docker compose --profile migration run --rm -it db-migrate delphi-setup

Prefer ./delphi-setup.sh on production hosts.

What the registry covers

The registry includes (non-exhaustive):

  • Register built-in provider catalogues (OpenAI, Azure, Pythia, TOBi).
  • Seed Flow Builder templates where applicable.
  • Apply default surfaces for Feature flags.
  • Platform-settings rows used for billing, registration, notifications, and onboarding.
  • First-use: platform superuser and other guarded steps keyed under firstUse.*.
  • Update migrations outside Prisma's schema migrations when a release introduces them.

Each step persists progress in Postgres; failures print the failing step. Fix the root cause and run ./delphi-setup.sh again.

Output

delphi-setup
✓ provider-catalogue already current
✓ flow-templates seeded 4 new templates
✓ feature-flag-defaults already current
✓ platform-settings seeded 2 new keys
✓ legal-consents already current

5 steps, 2 changed, 3 noop

Operator notes

  • Re-running after a flag change may be necessary to reconcile defaults — coordinate with Feature flags.
  • Registry steps are not user-extensible; they ride with the voiceai-db-migrate image. Persistently failing steps need support from whoever ships your images.
  • The wrapper keeps secrets in process memory only — it does not write fetched SSM/Secrets Manager values to disk.

See also