Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage SYNC command #3090

Open
henry2man opened this issue Jan 31, 2025 · 0 comments
Open

Storage SYNC command #3090

henry2man opened this issue Jan 31, 2025 · 0 comments

Comments

@henry2man
Copy link

henry2man commented Jan 31, 2025

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! 🚀

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

No branches or pull requests

1 participant