Storage SYNC command

Open
#3,090 5 comments 0 reactions 0 assignees View on GitHub

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
Domain
cli, cloud

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 supabase/cli

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-folder to bucket-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 rm and supabase storage cp with --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

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.