DSH Toolbox

DSH Sync Hub

Free · runs on your own machine · needs Node.js 20 or newer · no third-party packages

Sync sessions and the workspace index across machines and DSH builds — web, desktop, terminal. Session files are moved as opaque bytes, never parsed.

Three steps

1

Start the hub

One Node process. Data lands in a directory you choose.

node src/hub/server.mjs
2

Pair each device

A one-time 8-character code, valid for 10 minutes.

node src/agent/cli.mjs pair --hub http://host:7788 --code ABCD2345
3

Sync

First run is full; later runs send only the changed chunks.

node src/agent/cli.mjs sync --hub http://host:7788 --home ~/.dsh

At a glance: what syncs, what does not

What syncs

  • sessions/<workspace>/<session>/session*.jsonl.zstd
  • storages/workspace.json
  • storages/session_projcache.json

Two-way.

What never leaves your machine

  • .credentials.yaml
  • *.pem *.key id_rsa*
  • storages/schedule.json
  • storages/dsh_automation.json
  • logs/ cache/
  • profiles/ skills/

Never read, hashed, or uploaded.

.credentials.yaml, *.pem, *.key, *.p12, id_rsa*, .env, profiles/**/cred* — these paths are skipped during scanning.

Conflicts keep both copies

When two machines write forward from the same version, the later one is stored as a conflict copy and the local file is left untouched. No silent overwrite, ever.

Platform reality

PlatformCapability
Windows / macOS / LinuxFull sync host.
Android (Termux)Works, but you install Node yourself and the OS may kill it in the background.
iOS / HarmonyOSBrowser console only — no Node runtime, so it cannot host a session.

Get it

Source and the bilingual user guide live in the repository. Clone it, read the guide, run the three commands.

git clone https://github.com/FindSomeSkills/Skills.git dsh-skills
cd dsh-skills/dsh-tools/dsh-sync-hub
node src/hub/server.mjs

User guide

User guide (English)

Install, pair, sync, handle conflicts, fix common failures. Step by step.

User guide (Chinese)

The same guide, in Chinese.

Source

View the source on GitHub

FAQ

Does it parse my sessions?

No. It hashes, chunks and moves bytes. Parsing would couple it to an internal format that changes between releases.

What if both machines edited the same session?

Both copies are kept. The hub stores the late arrival as a conflict copy; your local file stays exactly as you wrote it.

Is delta transfer real?

Yes. Sessions are append-only, so a normal turn uploads only the changed tail chunk. A measured 10 KB append cost 28,928 bytes instead of 160,000.

Does it need my DSH version to match?

Keep both sides on the same 0.2.x line. The tool refuses cross-format merging rather than guessing.