feat: allow customization of the supabase root directory name and config paths

Open
#2,139 15 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Start in internal/utils/misc.go around line 169 and trace how --workdir determines the Supabase root directory and related config paths. Check the existing CLI initialization flow and tests, then verify that a --rootname value works with --workdir and consistently changes the expected paths.

Written by the indexing model from the issue text.

Description

✨ Feature do-not-close supabase/cli

Is your feature request related to a problem? Please describe.
I have a monorepo that has a very specific naming structure with /apps and /libs folders. The option for --workdir is great when initializing a new project, however I would love to specify the name of the root directory alongside this.

Describe the solution you'd like
Having a cli flag for --rootname <folder name> would be great.

Describe alternatives you've considered
The alternative is to place a parent folder with the desired name before initializing a project. Eg: apps/testproject/supabase.
Something like this is required for multiple projects to exist within a monorepo.

Additional context
This appears to currently be hardcoded in internal/utils/misc.go.
I am unsure whether other considerations are needed such as an indicator for what is a supabase directory or not. Maybe the CLI can automatically detect this based off --workdir or the contents of the cwd.

Dominant language
TypeScript
Stars
2.4k
Forks
523
Avg merge
20h 47m
Merged PRs (30d)
243

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/cli

All issues in supabase/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.