Create a project
A Flux project is the unit you provision: database surface, API, routing identity, and auth configuration. Creating one should leave you with a Service URL and enough credentials to continue.
What you will learn
- The basic
flux createflow - How
flux listgives the slug and hash the CLI expects for project-scoped commands - How
flux pushtargets a project with--projectand--hash(orflux.json)
The idea
flux create talks to the control plane, which schedules provisioning for your engine (v1 dedicated or v2 shared depending on tier/configuration). You do not pick “a different product”—you get a project; the engine describes how infrastructure is shared.
After create, you apply SQL from your repo with flux push. For any command that mutates an existing project, the CLI needs to know which project: pass --project <slug> and --hash <7hex> (or put the same fields in repo-root flux.json so you can omit the flags). Those values always come from flux list (or the dashboard), not from guesswork.
flux push updates the tenant database and triggers PostgREST reload so new tables appear in the API (for v2 pooled, tables belong in the tenant API schema—see Migrations).
How it works
Create a project (name becomes the slug unless your host normalizes it):
flux create "percept"List projects and copy the slug and hash for the row you care about:
flux listPush a migration file using the documented project selector (replace slug/hash with your flux list output):
flux push db/migrations/0001_moods.sql --project percept --hash b915ec8The same pattern applies to other project-scoped commands that accept --project / --hash—see flux push --help and related subcommands.
The CLI and dashboard also print the Service URL for your app. Canonical v2 host shape is under Service URLs.
Example
Minimal schema.sql (illustrative only—your tenant schema name on v2 is assigned by the platform):
-- On v2 shared, tables belong in your tenant API schema (t_<shortId>_api).-- Use the schema name from errors, dashboard, or gateway profile headers.CREATE TABLE IF NOT EXISTS notes ( id uuid PRIMARY KEY DEFAULT gen_random_uuid(), body text NOT NULL);