Skip to content

Add Custom Config File Support - #3092

Closed
StoneTapeStudios wants to merge 10 commits into
supabase:developfrom
StoneTapeStudios:develop
Closed

StoneTapeStudios wants to merge 10 commits into
supabase:developfrom
StoneTapeStudios:develop

Conversation

@StoneTapeStudios

@StoneTapeStudios StoneTapeStudios commented Jan 31, 2025 •

Copy link
Copy Markdown

Add Custom Config File Support

Introduces a new --config-file flag to the Supabase CLI, enabling users to specify alternative configuration files. This enhancement allows running multiple parallel local development environments with different configurations (#2139).

Example Usage

supabase start --config-file=supabase/config.test.toml

Benefits

  • Supports multiple local database instances with different configurations
  • Simplifies management of different environment setups (e.g., testing, staging)
  • Maintains backwards compatibility with default config path

@StoneTapeStudios
StoneTapeStudios requested a review from a team as a code owner January 31, 2025 16:00
@coveralls

coveralls commented Jan 31, 2025 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 13083225214

Details

  • 0 of 6 (0.0%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.05%) to 58.128%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/utils/flags/config_path.go 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
internal/storage/rm/rm.go 2 89.53%
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 13077628442: -0.05%
Covered Lines: 7609
Relevant Lines: 13090

💛 - Coveralls

@sweatybridge sweatybridge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally agree to add this functionality. However, the current implementation doesn't handle changing workdir based on the given config path.

StoneTapeStudios and others added 2 commits February 10, 2025 12:55
Adds support for setting the working directory based on the provided config file path:
- Handles both absolute and relative config paths
- Normalizes paths across platforms
- Maintains Windows compatibility by handling drive letters
- Preserves existing behavior when no config file is specified

This addresses the feedback about workdir handling in the CLI by ensuring the
working directory is properly set based on the config file location.

Tests added:
- Relative config paths
- Absolute config paths
- Non-existent config paths
- Malformed config files
feat(cli): handle workdir based on config file path
@StoneTapeStudios

Copy link
Copy Markdown
Author

Generally agree to add this functionality. However, the current implementation doesn't handle changing workdir based on the given config path.

Thanks for the feedback! I think I have addressed the issues with my latest changes.

@github-actions

Copy link
Copy Markdown
Contributor

Hi! Thanks for contributing to Supabase CLI.

We're closing this pull request because it has not had any activity for 60 days, and we try to keep the PR queue focused on changes that are still active.

If this change is still relevant, please update it against the current develop branch and reopen it if GitHub allows, or leave a comment and a maintainer can help reopen it. You're also welcome to open a fresh PR with updated changes.

@github-actions github-actions Bot closed this Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants