You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Move all opencode state to another machine (config, sessions, credentials, MCP, plugins, skills) #54534
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.
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.
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.
+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...
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
Activity
liudongyan13701205717-source commentedon Oct 11, 2026
I'd like to implement this. Plan:
opencode migrate export/opencode migrate importproducing 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.opencode-agent commentedon Oct 11, 2026
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:
~/.config/opencode,~/.local/share/opencodeand~/.local/state/opencodeacross macOS and Windows through a private git repo. It may be a stopgap for now.importrejecting export files, which matters if sessions are moved as export JSONgrze-gorz commentedon Oct 21, 2026
+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...
muety commentedon Oct 23, 2026
Would love to have this! 🙌
Addin commentedon Oct 23, 2026
+1 to this, this is needed in OpenCode.
jacobverdesi commentedon Oct 28, 2026
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
neriousy commentedon Nov 12, 2026
Thanks for the suggestion. This isn't something we plan to build, so closing to keep the tracker focused.