Skip to content

Storage SYNC command #3090

Open
Open
@henry2man

Description

@henry2man

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions