cli
cli copied to clipboard
Save value file on start flag
What kind of change does this PR introduce?
Add an --value-file flag to supabase start. This will add the ability to export values from supabase start to an .env.local file as discussed in #451.
What is the new behavior?
The config.toml now has support for the following section
[value_file]
path = "./.env.local"
type = "env"
anon_key = "NEXT_PUBLIC_SUPABASE_ANON_KEY"
service_role_key = "SUPABASE_SERVICE_ROLE_KEY"
api_url = "NEXT_PUBLIC_SUPABASE_URL"
This config is used when you use the --value-file to make a new file. in this case it would output a file like the following
# ./.env.local
NEXT_PUBLIC_SUPABASE_ANON_KEY=some_anon_key
SUPABASE_SERVICE_ROLE_KEY=some_service_role_key
NEXT_PUBLIC_SUPABASE_URL=some_api_url
At the moment I have only added support for env files. Also this is the first time I have used golang so any suggestions for improvements or corrections would be appreciated.