Skip to content

Sharing: cross-device OpenCode config & session sync via GitHub #18102

Closed

Description

@lazyalex616

I switch between a MacBook and a couple of Windows machines daily, and keeping OpenCode config/sessions in sync was driving me nuts. Ended up writing a set of scripts that merge four local directories into one private GitHub repo:

  • ~/.config/opencode/ → repo root (config, skills, MCP settings, etc.)
  • ~/.local/share/opencode/ → _data/ (auth, SQLite db via Git LFS)
  • ~/.local/state/opencode/ → _state/ (frecency, kv store, model cache)
  • ~/.agents/skills/ → _agents/ (skills CLI installs + lock file)

It works through simple wrapper commands (opencode-push, opencode-pull) that let you choose config / sessions / both. Session sync kills running OpenCode first and uses sqlite3 .backup for a safe db copy. There's also force mode, auto-stash, and a migration auto-repair mechanism for when you pull an older db to a machine running newer OpenCode.

Cross-platform: macOS (zsh) + Windows (PowerShell 7). No dependencies beyond Node.js, git, git-lfs, and sqlite3.

Repo: https://github.com/doomsday616/opencode-github-sync

If anyone else juggles multiple machines with OpenCode, hope this saves you some time. Happy to hear feedback or suggestions.

Activity

  1. github-actions commented on Mar 18, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • No issue template was used. This project requires one of three templates: Bug Report, Feature Request (title must start with [FEATURE]:), or Question. This appears to be a community sharing post, which doesn't fit any of the required templates.
    • If you'd like to share this as a feature request or discussion, please reopen using the Feature Request template with a title like [FEATURE]: Cross-device config & session sync support and describe the problem you're solving and what native support you'd like to see.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. lazyalex616 commented on Mar 18, 2026

    @lazyalex616
    Author

    Closing — wrong place for this. Apologies for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs:complianceThis means the issue will auto-close after 2 hours.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions