Folder sync

Keep a folder on your computer in step with a browser, so AI agents working in it open your files, and you get theirs back.

Every browser has a shared folder, /data/shared. AI agents working in the browser (in ChatGPT, Claude or any other web app) open its files from any page’s file dialog, and can save files into it. The nevazu-sync tool keeps a folder on your computer in step with a folder in there, both ways: what you change goes to the browser, and what changes in the browser comes back. The shared folder is on the browser’s encrypted disk and is kept while it sleeps.

In the console, with no terminal

In Chrome or Edge, open the browser’s Storage tab (or the Agent Connection panel, the robot button on a browser) and go to Sync a folder from your computer. Choose a folder and allow Chrome to edit it. It goes into the shared folder under its own name.

  • Sync now syncs both ways once.
  • Watch for changes keeps syncing while the console’s tab stays open: changes on your computer go within seconds, and the browser is checked every 15 seconds. The status says what it is doing and when it last checked. Closing the tab stops it, and the console asks first.
  • After the tab or Chrome was closed, Chrome asks for the folder again: the console says so and shows Allow access to the folder. Nothing is synced until you allow it.
  • Forget folder stops syncing that folder on this device; no files are deleted on either side.

The console syncs as the tool does: files changed on both sides are kept twice, files deleted in the browser go to the folder’s .nevazu-sync/trash for 30 days, and a sync that would delete most of a side waits for you. Firefox and Safari do not let pages pick folders: there, the same place shows the terminal commands below. To keep syncing without the console open, use the terminal.

In the terminal

The console shows these commands with your browser’s address already filled in: on the browser’s Storage tab under Sync a folder from your computer, and in the Agent Connection panel (the robot button on a browser) in the same section. Copy them from there.

  • Install Node.js 20 or later, then download the tool: curl -fsSLO https://nevazu.com/nevazu-sync.mjs (on Windows, curl.exe -fsSLO https://nevazu.com/nevazu-sync.mjs).
  • Sign in for the browser: node nevazu-sync.mjs login https://nevazu.com/browsers/BROWSER_ID (its page’s address, or its MCP URL). A Nevazu page opens, where you approve it as you approve an AI agent: control to sync both ways, or view only to fetch only, for 1 to 90 days.
  • Sync a folder: node nevazu-sync.mjs sync ./project --remote project --watch. The folder appears in the browser as /data/shared/project, and stays in step while the command runs.
Terminal
curl -fsSLO https://nevazu.com/nevazu-sync.mjs
node nevazu-sync.mjs login https://nevazu.com/browsers/BROWSER_ID
node nevazu-sync.mjs sync ./project --remote project --watch

In the browser, choose the page’s upload button and go to /data/shared/project in the file dialog. To have an agent save a file for you, ask it to save into that folder (Save as in Chrome), or download it and move it there.

Commands

  • sync <folder>: both ways, once; with --watch it keeps going (changes here are sent within seconds, the browser is checked every 15 seconds, or --interval).
  • push <folder> and pull <folder>: one way only.
  • status <folder>: what a sync would do, changing nothing.
  • ls: the browser’s shared folder. logout: ends the sign-in.

How it decides

  • A file changed on one side is copied to the other. A file deleted on one side is deleted on the other, unless it changed there meanwhile.
  • A file changed on both sides is kept twice: your version stays at its name, the browser’s is saved next to it as “name (cloud conflict date time)”, on both sides.
  • Nothing is overwritten that changed after it was looked at. Like Subversion’s out-of-date check, every write names the version it replaces: the browser gives each file a revision that changes on every save (even one that keeps the old size and time) and refuses a write over any other, and on your computer the file is checked again at the last moment before a download replaces it. The next pass looks again and, as in a Git merge, keeps both versions if both sides changed. Newer never simply wins.
  • Before anything is sent, the sync checks that it fits: what it would add to the browser’s disk must fit in its free space with 512 MB to spare for Chrome. If not, nothing starts and both numbers are shown; make the browser’s storage larger on its Storage tab, or leave large folders out. In watch mode every pass checks again and starts by itself once it fits.
  • Files deleted because they were deleted in the browser go to the folder’s .nevazu-sync/trash on your computer, kept for 30 days. A pass that would delete most of a side’s files stops and asks for --allow-mass-delete.
  • Left out: links, .git and node_modules folders, system and editor scratch files, files over 2 GB, and the patterns in the folder’s .nevazusyncignore (written as in a .gitignore). Up to 20,000 files.

Good to know

  • The browser must be awake: the tool waits while it sleeps and goes on when you open it. It does not keep the browser awake.
  • The sign-in shows on the browser’s Agents page, where you can disconnect it. Turning AI agent access off for the browser stops folder sync too.
  • Files on the shared folder count towards the browser’s storage. A browser made before folder sync needs Recover once.