Sync private scratch/ folders across machines using Syncthing over Tailscale
Project description
scratch-sync
Sync private scratch/ folders across multiple machines using Syncthing over Tailscale.
The Problem
Working across multiple machines (Linux workstation, Mac laptop, Windows desktop) with code repositories in different locations:
| Machine | Example Repo Paths |
|---|---|
| Linux | ~/code/sleap-io, ~/repo1 |
| Mac | ~/sleap-io, ~/code/my-repo |
| Windows | D:\sleap-io, C:\Users\me\code\repo1 |
Each repo has a scratch/ subfolder that's .gitignored — notes, experiments, temp files, WIP that shouldn't be in version control but should sync privately across machines.
Solution
- Sync
scratch/folders without git - Single CLI command to add folders to sync
- Works across Linux, macOS, and Windows
- Uses Tailscale for secure direct connections (no cloud relay)
- Minimal ongoing maintenance
Quick Start
Prerequisites
- Tailscale installed and connected on all machines
- All machines on the same Tailnet
Install
macOS / Linux:
curl -LsSf https://scratch.tlab.sh/install.sh | sh
Windows (PowerShell):
iwr -useb https://scratch.tlab.sh/install.ps1 | iex
The installer will download Syncthing, set up auto-start, and show you the status of all dependencies:
Dependencies
uv installed 0.9.18 ~/.local/bin/uv
tailscale running 1.92.3 your-tailnet.org / you@example.com
syncthing running v2.0.12 ~/.local/bin/syncthing / autostart: launchd
After installation, remember to set up a password for the Syncthing dashboard at http://127.0.0.1:8384/.
Uninstall (macOS / Linux):
curl -LsSf https://scratch.tlab.sh/install.sh | sh -s -- --uninstall
Uninstall (Windows):
$env:UNINSTALL=1; iwr -useb https://scratch.tlab.sh/install.ps1 | iex
Check dependency status:
curl -LsSf https://scratch.tlab.sh/install.sh | sh -s -- --status
Install the CLI
The scratch-sync CLI helps you manage synced folders. Choose your preferred installation method:
Permanent install (recommended):
uv tool install scratch-sync
This installs scratch-sync globally so you can run it from anywhere.
Run without installing:
uvx scratch-sync --help
If you prefer not to install permanently, use uvx to run the latest version on-demand.
Update to latest version:
uv tool upgrade scratch-sync
Uninstall:
uv tool uninstall scratch-sync
Usage
# Inside a git repo with a scratch/ folder
scratch-sync init
# Add a specific scratch folder
scratch-sync add ~/code/myrepo/scratch
How It Works
Syncthing folder IDs just need to match across devices. The actual filesystem paths can be different:
scratch-sleap-ioon Linux at~/code/sleap-io/scratch- Same folder ID on Windows at
D:\sleap-io\scratch
┌─────────────────┐ Tailscale ┌─────────────────┐
│ Linux Box │◄──────────────────►│ Mac Laptop │
│ ~/code/sleap-io │ │ ~/sleap-io │
│ └── scratch/ │ folder-id: │ └── scratch/ │
│ │ "scratch-sleap-io"│ │
└────────┬────────┘ └────────┬────────┘
│ Tailscale │
└──────────────┬───────────────────────┘
▼
┌─────────────────┐
│ Windows PC │
│ D:\sleap-io │
│ └── scratch/ │
└─────────────────┘
Documentation
Full documentation at scratch.tlab.sh.
Development
Setup
Clone the repository and install dependencies:
git clone https://github.com/talmolab/scratch-sync.git
cd scratch-sync
uv sync
This creates a virtual environment and installs all dependencies.
Running in development
Run the CLI directly from source:
uv run scratch-sync --help
Install from GitHub
Install the latest development version from the main branch:
uv tool install git+https://github.com/talmolab/scratch-sync.git
Or run without installing:
uvx --from git+https://github.com/talmolab/scratch-sync.git scratch-sync --help
Local editable install
For development, install as an editable tool from your local checkout:
uv tool install --editable .
This installs scratch-sync globally but uses your local source files, so changes take effect immediately.
To uninstall and reinstall after making changes to entry points:
uv tool uninstall scratch-sync
uv tool install --editable .
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scratch_sync-0.2.0.tar.gz.
File metadata
- Download URL: scratch_sync-0.2.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75821776d11526a1e16f5f3626e01e3e7330bfe2c4a617454883c54752544327
|
|
| MD5 |
58d1fc477a6cf1448cb62945cf3bbe35
|
|
| BLAKE2b-256 |
a30cb36b804c6f7db18ed6b74ed8633b677ca189422b0e5028f070720723af38
|
Provenance
The following attestation bundles were made for scratch_sync-0.2.0.tar.gz:
Publisher:
publish.yml on talmolab/scratch-sync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scratch_sync-0.2.0.tar.gz -
Subject digest:
75821776d11526a1e16f5f3626e01e3e7330bfe2c4a617454883c54752544327 - Sigstore transparency entry: 785345844
- Sigstore integration time:
-
Permalink:
talmolab/scratch-sync@d83ae8685621a11ee06139ac0d0d2eb2cb4d736c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/talmolab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d83ae8685621a11ee06139ac0d0d2eb2cb4d736c -
Trigger Event:
release
-
Statement type:
File details
Details for the file scratch_sync-0.2.0-py3-none-any.whl.
File metadata
- Download URL: scratch_sync-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfc3cb4b6aa1c0e75f8ebe22a8aff4c4c3d19cfbefe4a634162799469b621ee5
|
|
| MD5 |
0f52a79b7278277cb767ddf0c439b4c5
|
|
| BLAKE2b-256 |
a2df50e68581c2477ca16dda369ffafd8357325ec8795607a990aedc069f8a90
|
Provenance
The following attestation bundles were made for scratch_sync-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on talmolab/scratch-sync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scratch_sync-0.2.0-py3-none-any.whl -
Subject digest:
dfc3cb4b6aa1c0e75f8ebe22a8aff4c4c3d19cfbefe4a634162799469b621ee5 - Sigstore transparency entry: 785345868
- Sigstore integration time:
-
Permalink:
talmolab/scratch-sync@d83ae8685621a11ee06139ac0d0d2eb2cb4d736c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/talmolab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d83ae8685621a11ee06139ac0d0d2eb2cb4d736c -
Trigger Event:
release
-
Statement type: