ReboFilesDocs
Start3
What is ReboFiles
Getting started
Demos to run
Put it in your app6
React component
Headless: your own UI
Without a framework
Styling and themes
Keyboard and accessibility
Languages
Files9
Uploads
Previews and the viewer
Search
Live changes and large folders
Comments
Starred and fields
Versions, trash and space
Download as .zip
Word documents
The server14
The route
Frameworks and sign-in
Who may do what
Storage: S3, GCS, Azure and disk
Checking uploads
Metadata: SQLite and Postgres
Database schema
Sharing and links
Activity and notifications
Hooks, logs and limits
Retention, holds and export
Desktop and other origins
Sync a folder
Going to production
Together1
AI assistants (MCP)
Reference5
Packages
Components and hooks
Client API
HTTP routes
Status and roadmap
↑↓ to move↵ to openEsc to close38 pages

The server Sync a folder

Sync a folder

@rebofiles/sync keeps a folder of the disk the same as one of the drive. Each run lists both and compares them with what they were when last the same, so it knows which side changed.
Desktop

In the desktop application

Server → Sync a Folder… (⇧⌘S) asks which folder, ~/ReboFiles unless said, and keeps it while the window is open: when it starts, when the drive tells a change, when the window comes back to the front, and every half a minute. The chip at the bottom says how it went. The disk is read and written by the application’s own commands, which never leave that folder.

CLI

As a command

On any computer with Node, also as a service.

npx rebofiles-sync ~/ReboFiles --server https://app.example.com/api/files --token "$TOKEN"
npx rebofiles-sync ./Clients --server … --folder <id of a folder of the drive> --once
API

In your code

import { createDriveClient } from '@rebofiles/drive';
import { watchSync } from '@rebofiles/sync';

const client = createDriveClient({ base: 'https://app.example.com/api/files', headers: () => ({ authorization: `Bearer ${token}` }) });
const sync = watchSync({ client, folder: '/Users/ana/ReboFiles', onAction: (action) => console.log(action) });
// sync.stop()
Rules

What it does

WhenIt
New on one sideMade on the other: a folder, or the file sent or taken.
Changed on one sideA new version in the drive, or the file on the disk written again.
Changed on bothThe drive’s at its name; the disk’s beside it as “name (conflict 2026-10-26 14.05).ext”, sent as a file of its own.
Gone from the diskInto the drive’s trash, from where it comes back; unless it changed in the drive since, when it is taken again.
Gone from the driveAside on the disk, in .rebofiles/removed/; unless it changed on the disk since, when it is sent again.
Moved or renamed in the driveMoved on the disk, a folder with what is in it.
A file moved on the diskMoved in the drive, the same file with its versions, found by its size and time.
Limits

What it does not do

  • A folder renamed on the disk is sent again as a new one, and the old one goes to the trash: the files are the same, their versions start again.
  • An empty folder of the disk where there were files is taken for a disk not there, and nothing is done until it is told (allowEmpty).
  • The files of the systems (.DS_Store, Thumbs.db, ~$ files of Office) are left out, and so is its own .rebofiles folder.
  • A file goes whole each time, not the part of it that changed.
Parts

Only what changed is sent

A file changed a little goes as a new version of only the parts that changed: each version keeps the SHA-256 of its parts of 8 MiB, and the parts that are the same are copied in the storage from the version before (S3’s UploadPartCopy, a copy on the disk), never sent again. A video of a gigabyte with its title changed sends 8 MiB. Any upload can, with partHashes: true.