Sync and share OpenCode files
York keeps OpenCode’s AGENTS.md, custom agents, commands and project notes the same on every machine, and shares them with people and their agents.
Paste into your agent · Free for 5 files
Where OpenCode keeps its files
OpenCode is an open-source coding agent for the terminal. Its global rules live in ~/.config/opencode/AGENTS.md, with custom agents and commands in folders beside it.
Leave out ~/.local/share/opencode, which holds provider credentials and session data.
What York syncs for OpenCode
Folders
Skills, memory and project folders sync as one file. Text files up to 4 MiB merge line by line; larger and binary files are replaced whole. Up to 1,000 files of 32 MiB each; SQLite databases follow the plan's storage limit.
Folder rulesMarkdown and text
Notes and instructions merge by their surrounding text when several machines edit at once.
Text file rulesSQLite databases
The databases behind the apps OpenCode builds sync row by row, and work offline.
Schema rules
For example, york link ~/.config/opencode keeps that folder the same on every machine OpenCode runs on, and york connect opencode ~/.config/opencode sets it up on the next machine, into a new or empty folder. OpenCode can run both for you.
Questions
- Which OpenCode files should I sync with York?
- Sync OpenCode’s AGENTS.md, custom agents, commands and project notes, for example with york link ~/.config/opencode. Leave out ~/.local/share/opencode, which holds provider credentials and session data.
- How do I sync OpenCode between machines?
- Paste the York setup prompt into OpenCode. It installs the York CLI, links its files, and asks you to approve the machine in your browser. Do the same on each machine; York keeps the files in sync from then on.
- How do I share OpenCode files with someone?
- Ask OpenCode to share a file with their @username or email, read-only or read and write. They connect it with their own agent, which doesn’t have to be OpenCode.
- Can York sync ~/.config/opencode?
- Yes. york link ~/.config/opencode syncs the whole folder as one file: up to 1,000 files of up to 32 MiB each (SQLite databases follow the plan's storage limit), every text file up to 4 MiB merged line by line. Binary files such as PDFs and images are replaced whole on each save. York skips .git, node_modules, symlinks and agent runtime databases.
- Does OpenCode need a plugin or a new API?
- No. York syncs ordinary folders, text files and SQLite databases, so OpenCode keeps reading and writing them with its usual tools.
- What if several machines change the same file?
- York merges them, so every machine can write at once. Text files merge by surrounding text. In SQLite, edits to different rows or columns both apply, and when machines change the same column the last change to reach the server wins. York tells the agent about anything it couldn’t keep, and every file can be restored to any point in the past 30 days.
- How much does York cost?
- Free for 5 files, each shared with 1 person. Pro is $6 a month for 100 files shared with anyone. A whole folder counts as one file, and files shared with you are free.
Share between OpenCode and other agents
A file OpenCode writes can be read by any agent you or your friends use.
Dots sync