Skip to content

Onboard a teammate

Goal: a teammate clones your repo and their AI agents pick up the project’s MCP servers and conventions with minimal setup.

The lever here is the project source tree: a .agentsync/ directory committed at the repo root, with the same layout as your user ~/.agentsync/.

  1. Scaffold the project tree at the repo root and commit it:

    Terminal window
    cd myrepo
    agentsync init --scope project # creates ./.agentsync/
  2. Declare the project’s agents — required. Project scope renders only to the agents declared here, never each teammate’s user-scope agents, so everyone gets the same render from the committed tree:

    Terminal window
    agentsync agent add claude --scope project
    agentsync agent add opencode --scope project
    myrepo/.agentsync/agentsync.toml
    [agents]
    claude = { enabled = true }
    opencode = { enabled = true }
  3. Add the project’s MCP server as its own file, and reference team secrets rather than embedding them so each teammate supplies their own value locally:

    myrepo/.agentsync/mcp/company-api.toml
    [server]
    type = "stdio"
    command = "npx"
    args = ["-y", "@company/mcp"]
    [server.env]
    COMPANY_TOKEN = "${secret:company.token}"
  4. Disable a noisy user plugin for this repo, if needed:

    myrepo/.agentsync/plugins/screenshot.toml
    [plugin]
    disabled = true
  5. Commit the whole .agentsync/ tree and document the one-time setup in your repo’s README: install agentsync, set the team secret, then apply from inside the repo.

  1. Install agentsync (install guide) and set the shared secret locally:

    Terminal window
    agentsync secrets set company.token --stdin < token.txt
  2. Apply from inside the repo — the overlay merges onto their user config:

    Terminal window
    cd myrepo
    agentsync apply --dry-run
    agentsync apply