Repository navigation
feat(cli): add experimental supabase env set - #7888
Draft
kanadgupta wants to merge 1 commit into
Draft
kanadgupta wants to merge 1 commit into
kanadgupta wants to merge 1 commit into
Conversation
Add an opt-in `env` command family, enabled with SUPABASE_EXPERIMENTAL_ENVIRONMENTS=1 or `environments = true` under [experimental], with one leaf: `supabase env set`. It writes a secret or variable to a project environment (`production` or `development`) through the Management API's environment endpoints. Values are stored as write-only secrets unless `--visible` is passed. A secret value is never accepted as an argument: it is read from a hidden prompt or from stdin. Names and values are checked against the API's rules before any request, and errors never echo the value. The command acts on the parent project and asks for hosted-mutation consent. Move the parent-project permission block next to `resolveParentScopedProjectRef`, its shared owner, now that `env` uses it alongside `branches`. Generated with AI Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an experimental
supabase env setcommand. It writes a secret or variable to a project'sproductionordevelopmentenvironment through the beta Management API environment endpoints. Branches pick up the value on their next deploy.envfamily only appears withSUPABASE_EXPERIMENTAL_ENVIRONMENTS=1or[experimental] environments = trueinconfig.toml.--visiblestores a readable variable.--remotetakes a project ref, and a linked branch resolves to its parent.--yes.The permission block for parent-project lookup moves from
commands/branches/tocommand-internal/target/parent-scoped-project-ref.ts, next to the code that does the lookup, sinceenv setnow uses it too. Docs are inapps/cli/docs/env-commands.md.🤖 Generated with Claude Code