Adopt a populated machine
Goal: you’ve been using Claude and OpenCode for a while, each hand-configured. Bring it all under agentsync without retyping — and without losing anything.
-
Initialize (if you haven’t) and register your agents:
Terminal window agentsync initagentsync agent add claudeagentsync agent add opencode -
Survey what’s on disk versus what agentsync would write:
Terminal window agentsync status -
Import each agent’s existing config into your canonical source. Preview first:
Terminal window agentsync import claude --dry-runagentsync import claudeagentsync import opencodeImported secrets are re-referenced to
${secret:…}form on the way in, so nothing sensitive lands in your source as cleartext. -
Review the imported source files in
~/.agentsync/and tidy as needed — they’re plain TOML and markdown. -
Apply. The first apply treats any remaining pre-existing native files as a
foreign-collision: it backs each up to~/.agentsync/.state/backups/<timestamp>/before writing.Terminal window agentsync apply --dry-run # see exactly which files get backed upagentsync apply
Import vs. apply, at a glance
Section titled “Import vs. apply, at a glance”flowchart LR
NATIVE["existing native config<br/>~/.claude.json, opencode.json"]
NATIVE -->|import| SRC["~/.agentsync/<br/>(canonical source)"]
SRC -->|apply| ALL["all enabled agents<br/>(fanned out)"]
Import pulls each agent’s config in to one canonical source; apply pushes that source back out to every agent — so a server you only had in Claude now also lands in OpenCode.