Skip to content

Scripts Reference

ScriptPurposeBranch
devStart Astro dev serverBoth
buildBuild for productionBoth
previewPreview production buildBoth
checkRun astro check (type checking)Both
lintRun ESLintBoth
testRun VitestBoth
db:generateGenerate Drizzle migrationBoth
db:migrateApply Drizzle migrationsBoth
db:studioOpen Drizzle StudioBoth
deploy:pagesDeploy to Cloudflare Pagesspike/cf-runtime
deploy:pages:stagingDeploy to testingspike/cf-runtime
deploy:pages:prodDeploy to productionspike/cf-runtime
deploy:workerDeploy via wrangler CLIspike/cf-runtime
seed:localSeed DB from local JSON/mJS filesspike/cf-runtime
ScriptPurposeBranch
register-portal-domain.mjsRegister portal custom hostname via Cloudflare for SaaSspike/cf-runtime
ci-default-project-id.mjsSet default project ID for CIspike/cf-runtime
seed-local-data.mjsSeed agents, units, and pages from local JSON filesspike/cf-runtime

These scripts were used by the legacy Directus/per-client infrastructure and are kept for reference only:

ScriptPurposeReplaced By
dokploy-deploy-client.mjsDeploy Directus via Dokploy APIN/A (Directus retired)
setup-directus-schema.mjsConfigure Directus collectionsBuilt-in CRM
seed-directus.mjsSeed Directus dataseed:local npm script
configure-directus-rbac.mjsDirectus roles/permissionsBuilt-in CRM (Phase 6)
export-directus-snapshot.mjsExport Directus schema snapshotN/A
verify-directus-oidc.mjsVerify Directus OIDCN/A
cloudflare-tunnel-setup.mjsConfigure tunnel ingressfor SaaS replaces tunnels
cloudflare-access-setup.mjsCreate Access app/policyCloudflare Dashboard
deploy-pages.mjsDeploy to Cloudflare PagesN/A (merged into deploy scripts)
deploy-compose.shDocker Compose deploymentN/A
deploy-client.shFull client provisioningN/A
provision-client-postgres.shCreate client DB + userMulti-tenant schema phase
seed-test-buyer.mjsSeed test buyerHandled by portal registration