Syncing
Syncing is what makes teamrc useful across multiple machines. Here's how it works.
On this page
The relay
The relay is a server that stores your team's canonical state. Every connected machine pushes to and pulls from the relay. The web UI reads and writes to the relay too.
Machines don't talk to each other directly. They all go through the relay. This keeps the sync model simple: there's always one source of truth, and you always know where it is.
The relay is optional. Teams created with
teamrc init --local
work
entirely offline. You can define agents, apply to platforms, and edit your team without any server
connection. When you're ready to sync across machines, run
teamrc push
to connect.
Sync flow
Local-only teams
Not every team needs a relay. If you're the only person using a team, or you're just trying
teamrc out, a local-only team is simpler. Run
teamrc init --local
or decline the relay prompt during interactive init.
Local teams support
apply
,
import
,
status
,
delete
,
add-member
,
and all catalog commands. Sync-related commands
(
sync
,
pull
,
diff
,
invite
)
require a relay connection.
To connect a local team later, run
teamrc push
. This registers
the team on teamrc.ai and enables all sync and collaboration features.
What sync actually does
When you run
teamrc sync
, the CLI performs these steps in order:
Read local state
Reads
.teamrc.yaml
and the knowledge file from disk, then computes content hashes.
Check server state
Fetches the relay's content hashes (members, skills, knowledge).
Compare
Determines if local changed, server changed, both, or neither since the last sync.
Transfer
If only local changed, pushes. If only server changed, pulls. If both changed, pulls remote first.
Merge knowledge
Append-only dedup of local and remote knowledge, so insights from all machines are combined.
Apply to platforms
Regenerates config files for all detected platforms (Claude Code, Cursor, etc.).
Conflict resolution
Sync uses hash-based conflict detection. Each push includes
a
base_hash
so the relay can tell whether the server state has
changed since your last sync. The CLI compares content hashes for members, skills, and
knowledge independently to determine who changed what.
If only knowledge differs on both sides, the CLI performs a server-side merge using append-only deduplication. Knowledge from different machines is always combined, never overwritten.
If members or skills differ on both sides, the CLI pulls the
remote version and overwrites your local
.teamrc.yaml
.
A warning is printed so you know the remote version took priority. To restore your
local changes, edit
.teamrc.yaml
and run
teamrc push
.
To see what's different before syncing, use
teamrc diff
.
If something goes wrong,
teamrc pull
gets you back to the relay's version.
Invite codes
Invite codes are how you connect machines to a team. An invite is a time-limited token
(format:
trc_inv_...
, default: 24 hours) that grants access
to join the team on the relay.
Invites are not just for teammates
An invite code connects any machine to the same team. Use it for:
- Your own second machine (laptop + desktop)
- A cloud VM or CI runner
- A different project directory that uses the same team
- A collaborator's workstation
- An agent on a different platform (e.g., OpenClaw research team alongside Claude Code devs)
Multi-project teams
A team isn't locked to one project. Run
teamrc join
from a different project directory and you get the same team. Same agents, same skills,
same config. Change something, sync, and all projects pick it up.
The reverse is also true. Two people on the same project can use different teams. You might work with a fullstack team while your colleague has a research team on OpenClaw. Same repo, different agent setups, no conflict. Teams and repos are independent by design.
Daemon mode
teamrc daemon
runs a background process that keeps the team knowledge file in sync across machines in real-time via WebSocket.
It watches your local knowledge file for changes and pushes updates to the relay, and receives remote changes and merges them locally.
The daemon syncs knowledge only. It does not sync team config (members, skills, instructions). Use
teamrc sync
for full team config sync.
Authentication
There's no signup. When you run
teamrc init
or
teamrc join
,
the CLI generates an ed25519 keypair and stores it in
~/.teamrc/key
.
That's your identity. Every request to the relay is signed with your private key.
No passwords, no cookies, no session tokens.
Tokens
Your token (
trc_ak_...
) is just your public key with a prefix.
It identifies your machine. The relay verifies every request by checking the signature against this key.
Optional accounts
You can optionally link your machine to an account with
teamrc login
.
It works like
gh auth login
. Opens a browser, you confirm, done.
This gives you:
- A web dashboard to manage your machines and teams
- Recovery if you lose a keypair
- A single view of all your teams
But it's optional. Everything works without it.