Storage SYNC command
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
Research direction
Start by reading the existing supabase storage cp and supabase storage rm command entry points to understand current recursive transfers and deletion behavior. Define the supabase storage sync interface for linked projects and local instances, then verify that new or modified local files upload correctly and that --delete removes remote files absent locally.
Written by the indexing model from the issue text.
Description
Feature Request: Add supabase storage sync command to CLI
Is your feature request related to a problem? Please describe.
Currently, uploading multiple files and directories to Supabase Storage requires manually using supabase storage cp with --recursive or scripting solutions with the API. This is tedious and not as efficient as other cloud storage providers, which offer native synchronization commands.
For example, S3 has aws s3 sync, and Firebase Storage has firebase deploy. These tools allow users to quickly sync local directories with their cloud storage, improving usability and automation.
Describe the solution you'd like
I propose adding a supabase storage sync command to the Supabase CLI, similar to AWS S3's sync. The expected behavior:
supabase storage sync ./local-folder bucket-name[/remote/folder/path]
- Uploads all new and modified files in
./local-foldertobucket-name[/remote/folder/path] - Deletes remote files that no longer exist locally (optional flag
--delete) - Uses parallel uploads for performance (optional
flag --jobs <N>) - Other advances features like custom cache control and content-type headers could be considered (like
supabase storage cp) - Works with both linked projects and local Supabase instances
Example with flags:
supabase storage sync ./assets media/assets --delete
Describe alternatives you’ve considered
- Using a combination of
supabase storage rmandsupabase storage cpwith--recursive, but this is suboptimal and slow.
Additional context
This feature would significantly improve developer experience and streamline file management in Supabase Storage. In our case we want sync important metadata product definitions, stored as plain text files in Storage, using https://github.com/supabase/setup-cli
Would love to see this in the roadmap! 🚀
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 523
- Avg merge
- 20h 47m
- Merged PRs (30d)
- 243
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/cli
-
🐛 Bug supabase/cli
-
🐛 Bug supabase/cli
-
🐛 Bug supabase/cli
-
Local Kong keeps idle upstream connections longer than PostgREST, causing sporadic 502 on POST/PATCH Open🐛 Bug supabase/cli
-
✨ Feature supabase/cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·