Skip to content

feat(cli): select local stack commands by project backend - #6516

Closed
jgoux wants to merge 3 commits into
feat/experimental-stack-restartfrom
feat/stack-command-routing
Closed

feat(cli): select local stack commands by project backend#6516
jgoux wants to merge 3 commits into
feat/experimental-stack-restartfrom
feat/stack-command-routing

Conversation

@jgoux

@jgoux jgoux commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Expose the new local runtime as supabase stack start|stop|status|list|logs|prepare|restart, replacing supabase experimental stack.

Projects can set [experimental] stack = true in supabase/config.toml to make top-level start, stop, and status use the corresponding new commands. Backend selection happens before argument parsing and completion, so each implementation retains its own flags. Explicit supabase stack commands always use the new backend. SUPABASE_EXPERIMENTAL_STACK=1 or 0 overrides the config setting for top-level aliases; unset or empty values fall back to config, and other values are rejected. Without an environment override, absent or false configuration preserves the legacy aliases.

The backends retain separate state and databases. Switching the flag does not migrate or reuse legacy data. The flag is local CLI configuration and is excluded from hosted project configuration. Other local-stack command families remain unchanged.

Routing follows the same working-directory and TOML-file selection as the lifecycle handlers, including both shell completion modes. Command telemetry retains the invoked command path and a unique run identifier.

New routing code stays within the Effect-linted stack command directory. This follows the command implementations through #6512.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@629364a73726145605eec64352439464af2e777d

Preview package for commit 629364a.

@jgoux
jgoux force-pushed the feat/stack-command-routing branch from 2254c94 to 629364a Compare September 8, 2026 12:32
@jgoux

jgoux commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

/ai-review

pull Bot pushed a commit to oogalieboogalie/cli that referenced this pull request Sep 9, 2026
Expose the new local runtime as `supabase stack start|stop`. Projects
can opt top-level `start` and `stop` into that runtime with
`[experimental] stack = true` in `supabase/config.toml`, or override it
with `SUPABASE_EXPERIMENTAL_STACK=1|0`. Selection happens before
argument parsing and completion, preserving each implementation’s flags
and the invoked command’s telemetry identity. Unreadable or invalid
routing config defaults to the legacy command tree; explicit environment
overrides take precedence, and each command retains its own
execution-time config validation.

The shared experimental flag resolver is reusable for the later workers
migration. `status` keeps its existing implementation and `experimental
workers` remains available. The two stack backends retain separate state
and databases; enabling the flag does not migrate existing data. The
flag is excluded from hosted project configuration and accepted as a
TypeScript-owned field by the Go sidecar.

Extracts the start/stop portion of supabase#6516 onto `develop` after supabase#6507, so
it can merge independently of the remaining stack commands.

Regenerates the published configuration schemas, including previously
stale auth fields already present in the source schemas. Refreshes stale
Go config fixtures to match the current serializer and schema.
@jgoux

jgoux commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

The feature flag is on develop so every new commands should already rely on it.

@jgoux jgoux closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant