Skip to content

feat(cli): discover function env files (CLI-2184) - #6182

Merged
7ttp merged 1 commit into
developfrom
7ttp/cli-2184-automatic-discovery-of-edge-functions-env-when-running
Aug 13, 2026
Merged

feat(cli): discover function env files (CLI-2184)#6182
7ttp merged 1 commit into
developfrom
7ttp/cli-2184-automatic-discovery-of-edge-functions-env-when-running

Conversation

@7ttp

@7ttp7ttp commented Aug 13, 2026

Copy link
Copy Markdown
Member

TL;DR

Automatically discover supabase/functions/<function-name>/.env files when running supabase functions serve.

Without --env-file, supabase/functions/.env continues to provide shared values, while each Function's .env overrides matching values for that Function only.
An explicit --env-file remains the highest-priority source and disables automatic discovery...

This is scoped to functions serve
supabase start retains its existing behavior(will consider it as a followup, if needed)

Ref:

@7ttp7ttp self-assigned this Aug 13, 2026
@7ttp
7ttp requested a review from a team as a code ownerAugust 13, 2026 12:34
@github-actions

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@5df8e0d579902d3658d992cb0349e0439a2fa5ff

Preview package for commit 5df8e0d.

@7ttp
7ttp added this pull request to the merge queueAug 13, 2026
Merged via the queue into develop with commit 7fae1f6Aug 13, 2026
37 checks passed
@7ttp
7ttp deleted the 7ttp/cli-2184-automatic-discovery-of-edge-functions-env-when-running branch August 13, 2026 20:13
avallete added a commit that referenced this pull request Aug 13, 2026
… files)
Resolves 3 conflicts with develop's function env-file discovery (CLI-2184,
#6182). The Go serve template modification lands on a file this branch
deleted (functions serve is fully native; the Go functions/serve package is
gone) — deletion stands, and the TS-side implementation auto-merged. The
porting-status tracker note moves to go-cli-divergences.md per this branch's
docs restructure; SIDE_EFFECTS.md keeps develop's new per-function .env row
and precedence note in this branch's de-Go-ified wording.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic discovery of edge functions .env when running supabase functions serve`

2 participants

@7ttp@jgoux