cli icon indicating copy to clipboard operation
cli copied to clipboard

Allow to pass config file to "projects create" command

Open actraiser opened this issue 7 months ago • 2 comments

Is your feature request related to a problem? Please describe. When I create a new project via command line, i can only specify a plan and region but I also would like to pass settings I right now have to update manually in the dashboard UI after the project has been created.

Describe the solution you'd like Support a config file when creating a new project from command line. Ideally it would support all options/settings one is currently required to edit in the UI. Actually, this is already supported for local supabase development as shown at https://supabase.com/docs/guides/cli/customizing-email-templates . Could this be expanded to live projects?

Example config.toml

[auth.email.template.invite]
subject = "You are invited to Acme Inc"
content_path = "./supabase/templates/invite.html
[any.other.setting]
key = value

Then we could create a new fully configured project with all bells and whistles by executing

supabase projects create my-project --config=./config.toml

Describe alternatives you've considered Right now I can create a basic project with "supabase projects create" but need to go through many nested menus in the UI for final configurations.

Additional context This would help to fully automate project creation without visiting the supabase dashboard ui.

greets -act

actraiser avatar Nov 28 '23 10:11 actraiser

Please help me check this pr, now you can create project using config file with supabase projects create my-project --config config.toml, the example config file like:

db_password = "xxxx"
org_id = "xxx"
region = "ca-central-1"
plan = "pro"

S96EA avatar Nov 29 '23 08:11 S96EA

@S96EA The scope of this ticket also includes syncing auth.email configs which requires additional api changes. I think the ideal end goal would be an IaaS compatible solution that allows remote project to be created with fine grained configs from a file.

We will likely work on this early 2024.

sweatybridge avatar Dec 04 '23 02:12 sweatybridge