Skip to content

Allow for more fine-tuned configuration in local dev environments #2191

Closed
@Matsuuu

Description

@Matsuuu

Is your feature request related to a problem? Please describe.

This is a continuation to what #1518 wants to have added to the CLI interfaces.

When working in local dev environments, a lot of things might differ from the actual prod setups. There might be different environment variable files, there might be multiple different seeding profiles for different data use cases, and so on.

Describe the solution you'd like

Create an easy way for us to expand the API by allowing the addition of different flags to maps varying file mappings in all supabase commands. Some examples of what would be beneficial:

  • a --env-file mapping for ALL commands. This would allow using multiple different env files as well as make it easier to host local setups in OS's that don't have the easiest of ways to add env variables cough windows cough.

  • a --seed-file mapping to db reset etc. commands. This would allow users to have more fine grained control around seeding, as well as allow the seed.sql to be used for actually seeding e.g. staging environment dumps. This would allow more varied usage of seeding with the database without having to overwrite files.

  • I'm sure there's plenty more.

Describe alternatives you've considered

One way of approaching this might be just having the API's take these variables but as with e.g. the env one, it would be easier if there was a general utility that could handle these as they would need to be retrofitted to all endpoints otherwise.

Additional context

I've looked at the CLI database quite a lot before and would like to contribute to it. If this is something that would accept a PR for, I could maybe take a look at it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions