Repository navigation
v3.0.0 — plugin, overrides, selective session sync
Complete rewrite. The published scripts had fallen four months behind the version in daily use, and the whole-database session sync they shipped stops being viable once opencode.db passes a gigabyte.
npm install -g opencode-github-sync
Highlights
OpenCode plugin. Startup pull, optional push on idle, and an opencode_sync tool. The CLI stays, because a plugin cannot repair the configuration that stops the plugin from loading.
Per-machine overrides. opencode-sync.overrides.jsonc is merged into the config after a pull and subtracted again before a push, using git show HEAD: as the baseline rather than the working copy. An overridden key is invisible to sync in both directions, and the machine keeps its own settings throughout.
Selective session sync. Sessions export individually as gzipped JSON shards, chosen by time window, include list, project directory and per-session size cap. Different sessions are different files, so git merges them unaided; the same session edited twice resolves by time_updated. Import is a transactional upsert.
One-command setup. opencode-sync init creates the private repository and configures the machine through the GitHub CLI.
Correctness
- Pushes are verified by reading the remote head back —
git pushcan exit zero without the remote moving. - Symlinks and Windows junctions are refused rather than followed.
- File and directory replacements are atomic.
- A cross-process lock covers the plugin, the CLI and every OpenCode window.
- Line endings pinned to LF;
text=autoalone rewrote skill shell scripts to CRLF on Windows. - Commit messages use a stable pseudonym, so a corporate asset-tag hostname cannot reach the repository.
- Credentials are opt-in and refused on public repositories.
Breaking changes
Session sync no longer commits the database, and Git LFS is no longer used. The shell and .cmd wrappers are replaced by a real bin entry — install from npm instead of copying scripts.
Full notes in CHANGELOG.md.