driftless sync is an optional team-wide digest. You almost never need it, and never to start. Drift already reaches you as a freshness badge when you driftless context get the area you’re working on. Reach for sync only when you want to scan everything that moved at once.
It does not inspect your local diff and it does not retrieve file-specific context. It pulls the repo memory state from Driftless Cloud and answers one question:
What changed around this repo’s topics since I last looked?
Command
| Command | Flags | Description | Example |
|---|---|---|---|
sync | --json | Show stale topics, recent PR activity, and tracked branches | driftless sync |
What sync checks
| Signal | Source | What to do |
|---|---|---|
| Stale topics | GitHub push events on tracked branches | Review the changed code and update the topic if the behavior changed |
| Recent PR activity | GitHub App observations | Read the touched topics before working in the same area |
| Tracked branches | Repo settings in Driftless Cloud | Use driftless branches to see or change drift scope |
When to use sync
The everyday loop doesn’t needsync. Go straight to retrieval, which carries the freshness badge inline:
sync only when you want the whole team-wide picture at once:
JSON output
Use--json when an agent or script needs structured output:
| Field | Meaning |
|---|---|
repo | GitHub org/repo resolved from the current remote |
workspace | Driftless workspace slug |
tracking | Default branch and extra tracked branches |
stale_topics | Topics whose anchored code changed |
pr_activity | Recent PR observations and touched topics |
Branches
Staleness is scoped to tracked branches. If a push happens on an untracked branch, Driftless records the activity but does not mark topics stale from that branch.| Command | Flags | Description | Example |
|---|---|---|---|
branches | --json | View tracked branches | driftless branches |
branches add | <branch> | Track a branch | driftless branches add staging |
branches rm | <branch> | Stop tracking branch | driftless branches rm staging |
