Skip to content

[FEATURE]: Move all opencode state to another machine (config, sessions, credentials, MCP, plugins, skills) #54534

Closed as not planned

Description

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Setting up opencode on a new machine today means manually rediscovering and copying state that is scattered across several locations, with no documented or automated way to move it:

  • ~/.config/opencode/opencode.json — settings, including MCP server definitions
  • ~/.local/share/opencode/opencode.db — V2 SQLite store holding sessions, messages and credentials (V1 kept credentials in ~/.local/share/opencode/auth.json, which V2 imports once)
  • per-project .opencode/plugin/ and .opencode/skill/ directories
  • desktop-only state in the Electron userData directory (drafts.sqlite, which holds the app's persisted settings/window/workspace stores, plus the main-process opencode.settings file)

The roots differ per OS (XDG dirs on Linux/macOS, %APPDATA% on Windows) and the desktop stores live in yet another place, so a user moving between e.g. Windows and macOS has no single flow that carries everything over.

Proposal: one portable export/import flow — e.g. opencode migrate export <file> / opencode migrate import <file> in the CLI, mirrored by a backup entry in desktop Settings — that bundles the pieces above into a single archive and restores them on another machine, skipping machine-specific values (window ids, absolute paths that no longer exist) instead of importing them blindly.

Related

Activity

  1. liudongyan13701205717-source commented on Oct 11, 2026

    @liudongyan13701205717-source
    Author

    I'd like to implement this. Plan: opencode migrate export / opencode migrate import producing one portable archive of the pieces listed above, with machine-specific values (window ids, stale absolute paths) skipped on import, plus a matching backup entry in desktop Settings. Happy to split into smaller PRs if preferred.

  2. opencode-agent commented on Oct 11, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed write-up! You're asking for a single portable export/import flow, in the CLI and in desktop Settings, that moves all of your OpenCode state (config and MCP servers, sessions and credentials, plugins and skills, desktop settings) to another machine. It would skip machine-specific values instead of copying them blindly. Maintainers will consider it.

    Related issues, in case they help:

  3. grze-gorz commented on Oct 21, 2026

    @grze-gorz

    +1 for the feature. I moved Opencode from my Macbook Laptop to Mac Mini - since username changed the absolute paths to repositories changed too, as a result even after copying everything I lost ... memories (however its sounds) ;)

    So, my point - even such simple usecase, moving from one mac to another, or simply one user to another (on same laptop) breaks the memories...

  4. muety commented on Oct 23, 2026

    @muety

    Would love to have this! 🙌

  5. Addin commented on Oct 23, 2026

    @Addin

    +1 to this, this is needed in OpenCode.

  6. jacobverdesi commented on Oct 28, 2026

    @jacobverdesi

    Another +1 , trying to figure out how to do this across sandboxed enviroments as well. A cli where i can go into sandbox export all sessions and re import somewhere else would be desirable

  7. neriousy commented on Nov 12, 2026

    @neriousy
    Member

    Thanks for the suggestion. This isn't something we plan to build, so closing to keep the tracker focused.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions