CLI Reference

Every npm run script and make target in one place.

npm scripts

Command What it does
npm run dev Astro dev server on $GRAVITY_HOST_PORT (default 3001), hot reload
npm run build astro build with the default (node) adapter
npm run build:node / :vercel / :cloudflare / :netlify Build with a specific deploy adapter — see Deploying
npm run preview Preview a production build locally
npm run start Run a built server directly (node ./dist/server/entry.mjs) — no dev server
npm run content -- <cmd> Import/manage block-driven page content
npm run blog -- <cmd> Import/manage blog posts
npm run events -- <cmd> Import/manage events
npm run courses -- <cmd> Import/manage portal courses
npm run links -- <cmd> Import/manage the /links page
npm run shop -- <cmd> Import/manage shop catalog items
npm run contact -- <cmd> Manage contact form provisioning — see below

Every <feature> -- import <file> command reads a JSON file and writes it through that feature’s *Store.ts, which goes through getStore() — see Storage. Sample files for all of them live under docs/gravity/examples/.

npm run contact -- create-adhara-form

Provisions and publishes the real Adhara “Contact” form (name/email/message, each field mapped to a CRM lead field, create_lead: true) via the real Adhara SDK. Needs ADHARA_API_KEY + ADHARA_WORKSPACE_ID + the SDK installed. A one-time setup step — checks first and no-ops if the form already exists. Submitting /contact before running it just means the Adhara sync silently no-ops; the local copy always still saves. See Overview for the “always local, additively synced” pattern this is part of.

make targets

Local development

Target What it does
make dev-native npm run dev — fast hot-reload inner loop, no Docker (recommended)
make dev docker compose up — foreground, matches the prod container
make up docker compose up -d
make down docker compose down
make logs docker compose logs -f
make run-local npm run build:node, then run the built server directly (no Docker)
make build docker compose build

Editor / content

Target What it does
make editor Build + run with admin/portal bypass ON, seed sample pages/blog/events/courses/links/shop
make editor-off Admin bypass OFF
make seed [SEED=f] [SEED_BLOG=f] [SEED_EVENTS=f] [SEED_COURSES=f] [SEED_LINKS=f] [SEED_SHOP=f] Import content into the running container (defaults: sample files under docs/gravity/examples/)

Themes

Target What it does
make theme-list List themes under public/themes/
make theme-create THEME=<name> Not yet implemented — prints guidance, see Theming
make theme-extract ZIP=<file> Not yet implemented — prints guidance

Deploy

Target What it does
make setup Interactive menu: run locally, or deploy anywhere
make deploy PLATFORM=<name> gcp | vercel | cloudflare | netlify (default: vercel)
make deploy-gcp / deploy-vercel / deploy-cloudflare / deploy-netlify Run one platform’s deploy script directly

Git (optional)

Target What it does
make push-repo Create a GitHub/GitLab repo and push this code (PROVIDER=github|gitlab)

Pair with make deploy PLATFORM=vercel VERCEL_LINK_GIT=1 to connect the repo in Vercel too — see Deploying.

Docker image / misc

Target What it does
make push / pull / tag Docker image ops against $(IMAGE_NAME)
make generate-key openssl self-signed cert under ./security/

Run make help any time for the same reference, printed from the terminal.